View previous topic :: View next topic |
Author |
Message |
FatboyBeef Guest
|
What happens during an I2C start when the interrupt is OFF? |
Posted: Sun Apr 16, 2006 6:49 pm |
|
|
If the I2C interrupt in a PIC configured as a I2C slave is turned OFF while the hardware receives a start condition and subsequent write, will it:
1. Catch the write by entering the ISR as soon as the interrupt is re-enabled.
or
2. Miss the write with it being lost forever (also, will the slave send the ACK or miss this too?)
This is specifically in question to the 16F88, however it probably applies to any and all PICs?
Thanks! |
|
|
Ttelmah Guest
|
|
Posted: Mon Apr 17, 2006 2:50 am |
|
|
1).
The interrupt flag is set, when the hardware event occurs. If you enable the interrupt, and the flag is already set, the handler will be called.
There is however a 'caveat'. If a _second_ event occurs before the handler is called, you may get an 'overrun error'.
Best Wishes |
|
|
FatboyBeef Guest
|
|
Posted: Mon Apr 17, 2006 3:36 am |
|
|
Tanks Ttelmah. That answers my question nicely. |
|
|
|