PIC18 timer0 interrupt handler, still not getting it


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: PIC18 timer0 interrupt handler, still not getting it

    Are you sure you are in the correct bank when you try to BCF and BSF the port? When you are setting them in the setup, PBP is tending to the banks. but when you BCF or BSF, YOU must ensure the correct bank.

    PBP will leave you in bank 0, so if the LAT is not (highly likely) you are setting and clearing something else.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  2. #2
    Join Date
    Apr 2010
    Location
    Walnut Creek, CA
    Posts
    17


    Did you find this post helpful? Yes | No

    Default Re: PIC18 timer0 interrupt handler sort of working, whoops! My mistake, of course.

    Interrupts are now occurring! I discovered that I was clearing the TMR0 interrupt enable elsewhere in my code. Now interrupts are occurring but at the wrong rate, 7ms between interrupts instead of 25us. Hopefully that'll be a simple fix. Sorry!

    Where's the embarrassed icon when I need it? ( :$ )

  3. #3
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: PIC18 timer0 interrupt handler, still not getting it

    We will surely need more info for that. I would still check the banks. What 18 are you using at a min. OSC settinmgs? things going on in other parts that we can't see?
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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