
Originally Posted by
LinkMTech
By the way, the device sends the ACK, or acknowledges, by holding the Data line LOW on the 9th clock cycle. The PIC will see this and continue to send data.
How do I implement this, like this below?
Code:
Main:
High Led : Pause 500: Low Led : PAUSE 500
Addr=$36
I2CWRITE SDA,SCL,ADDR,LOC
Addr=$37 : pause 10 ' OR If SDA=1 then main
I2CREAD SDA,SCL,loc,[VALUE],Fail
PAUSE 25
DEBUG HEX Value,13,10
PAUSE 250
DEBUG "Done....",13,10
WHILE 1 : WEND
Goto Main
Fail:
toggle portc.2
goto main
Bookmarks