While speed-optimizing an IRQ Bit-bang routine i am working on now , i though it would be useful to use the EUSART Synchronous Slave Reception mode (asuming using the 2 EUSART pins of course).
Eg.
On SDA (P/N) /SCL (P only) port change Interrupt :
1. Check if STARTbit
2. If it is STARTbit then Enable the EUSART in Slave RX mode (and stay in IRQ routine ! , don't leave out!)
3. EUSART gets the 8 bit BYTE (done in hardware, no bitbanging and bit-shifting
)
4. Ignore the 9th (N)ACK bit (i don't need it...)
5. Resume
6. In the next interrupt i will check if i get a STOP or a RESTART ...and so on...
I guess i am not mistaken ....![]()
Bookmarks