I2Cwrite - ok to use in a program that uses a lo of interrupts?


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2009
    Posts
    653

    Default I2Cwrite - ok to use in a program that uses a lot of interrupts?

    Ok, having established that it's not a good idea to use SEROUT when interrupts are used in the same program - but is this true of the PBP I2Cwrite command too?

    I've just recently got SPI working in PIC hardware (vs bit shifting out a pin) - but I'm having difficulty finding any similar hardware examples for I2C?
    Last edited by HankMcSpank; - 18th September 2010 at 17:31.

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    I2Cread / write are more tolerant of timing requirements as they are clocked synchronously. SEROUT/IN and its variants are async and surely have a problem with anything disturbing their merry timing. Option is use HSERIN etc

  3. #3
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Jerson View Post
    I2Cread / write are more tolerant of timing requirements as they are clocked synchronously. SEROUT/IN and its variants are async and surely have a problem with anything disturbing their merry timing. Option is use HSERIN etc
    Hi Jerson - you've stumped me there!

    I'm wanting to control a MCP4651 (a dual I2C POT) with a 16F690 using I2C (so PIC as master....sending 'wiper' positional data to a pot) .....where does HSERIN come into play?

  4. #4
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    Hehehe

    that came from your first statement. Having established ...... It has no connection with I2cwrite. Just an opinion of mine that was expressed on Serout2 and interrupts

  5. #5
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default

    Also, you can use I2Cwrite when you are in the interrupt routine, when the interrupts are disabled. I ussually do it like that without any problems.

    Robert
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

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