I2C issue


Closed Thread
Results 1 to 17 of 17

Thread: I2C issue

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: I2C issue

    I am being shown the light, I have found the switch and am trying to turn it on WRT DT_INT. My mantra is nothing in the ISR should need any PBP system variables (but I could be wrong there, still trying to figure out what uses them and what doesn't). So all my ISR's are ASM, but using PBP commands ie porta=portb.

    As for the context saving, all the 16f1xxx and maybe all the 18's already do it for me. So as long as I deal with BSR life is good. But the ease of not looking up all the PIR.somebodys for the INT query does appeal to me. So like I said, I found the switch to turn the light on.
    -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
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: I2C issue

    Yes, the 18Fs save context in an ASM int, but of course PBP is another matter. Sooner or later you will find that writing an ASM ISR is just too complicated, or else the PBP routine is already done for you. Then, figuring out what to save / restore gets to be a bit of a problem (unless you brute-force it and always save everything). The beauty of DT-INTs is that you can have one structure for both ASM and PBP interrupts, and it decodes the INT source for you if you have 5 or 6 of them like I often do.
    Because more registers are saved, PBP ints take about twice as long to get into/out of than ASM ints, but if you most always run at 40MHz +, like I usually do, it seldom matters.
    Charles Linquist

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