Need help with Counter/Timer application


Results 1 to 22 of 22

Threaded View

  1. #10
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default

    Raghunathan,

    Your explaination of using the PICs interrupts is not quite fair. The limitations you mention are mostly a function of PIC BASIC Pro, not the PIC. Darrel touched on it, but here's a little more.

    Quote Originally Posted by ra68gi
    To say all interrupts will vector to only one address location and you can not find which interrupt had called the ISR. Unlike PIC BASIC, BASCOM can have multiple interrupts, and you can determine its priority.
    You can actually "find which interrupt had called the ISR" quite easly by tesing the Interrupt Flag in the ISR for the interrupts you expect. Additionally, the 16-bit PICs (18Fxxxx) have high and low priority interupts (which are usable by PBP). These vector to different locations, and as would be expected, a High Priority event can interrupt a Low Priority Interrupt, but no the other way around.

    Quote Originally Posted by ra68gi
    This sort of feature is not there in PIC BASIC. Some call it software interrupt. THe command is ON INTERRUPT. The PIC BASIC also has tremendous amount of interrupt latency, ie the time taken between when the interrupt had occured and when it actually enters the ISR.
    Yes, this is quite true. And the reason for this is that PIC BASIC Pro will finish executing the BASIC command before going to the ISR. And since each PIC BASIC Pro commands are made up of many ASM commands, there could be quite a large delay (especially if you had something like PAUSE 5000). The advantage though is that you can write your ISR entirely in PIC BASIC Pro, and don't have to worry about what's going on under the hood. But, if you can't afford any delays in your interrupts, you need to work the interrupts in ASM. Or use Darrel's Instant Interrupts.

    As Russ mentioned, he "....walked [himself] through how [Darrel Taylor] does it. This is a worthwhile exercise". If you take the time, it's a great way to learn how to handle PIC interrupts (as well as the other neat tricks Darrel uses ).


    Steve
    Last edited by SteveB; - 5th September 2006 at 06:19.

Similar Threads

  1. Simple TMR1 application example needed
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th February 2010, 10:52
  2. Unusual Interrupts Application Problem
    By Joe Rocci in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th May 2009, 12:55
  3. PIC16F877A for application in mobile robot...
    By mcbeasleyjr in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th January 2009, 15:47
  4. DS1307 automotive application
    By DynamoBen in forum Schematics
    Replies: 10
    Last Post: - 31st August 2006, 01:33
  5. Timer Application
    By charudatt in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 16th February 2004, 07:05

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts