Building an I2C monitor ... but i think it is not Slave....


Results 1 to 9 of 9

Threaded View

  1. #5
    Join Date
    Feb 2010
    Posts
    30


    Did you find this post helpful? Yes | No

    Default Re: Building an I2C monitor ... but i think it is not Slave....

    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 ....
    Last edited by LakisFM1; - 4th March 2012 at 09:40.

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