Skip to main content
Visitor II
October 18, 2004
Question

I2C timed xmit

  • October 18, 2004
  • 2 replies
  • 657 views
Posted on October 18, 2004 at 17:18

I2C timed xmit

    This topic has been closed for replies.

    2 replies

    jones2Author
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:03

    Hello.

    I tried to use the timer0 interrupt to call i2c xmit function.

    but it does not work properly.

    The i2c function works fine except in this way.

    my purpose is to xmit in a constant time interval.

    Is there a way, and not just for i2c, to have the timer0 ISR

    activate a large function (relavite to common ISR functions).

    thanx.
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:03

    std,

    I am by no means familiar with the i2c interface on the uPSD series, but there is a fundamental concern with what you're doing. If you're actually CALLING a large function from the ISR for timer 0, you need to keep in mind that any other ISRs at the same priority level or lower will NOT execute until that function returns and you then return from the ISR. As such, if you're depending on some i2c interrupt to do the transmitting for you, you'll need to make it a higher priority than t0 or (ideally), just have the t0 isr set a flag and have a constantly running scheduler loop actually call the function from main code.

    Best Regards,

    pHaze426