Microcontroller › PIC › INTERFACING DS1307 RTC WITH PIC16F887 VIA I2C. › you need to follow this
January 11, 2019 at 10:13 am
#15006
Participant
you need to follow this sequence as given in the datasheet –
Send Start condition
Transmit address to slave as a write command
Check for ACK from slave
Send data pointer address
Check for ACK from slave
Send Repeated Start condition
Transmit address to slave as a read command
Check for ACK from slave
Set receive enable on PIC
Generate ACK after byte is received
(repeat the previous 2 steps for every byte you want to receive)
Send Stop condition