I am trying to read/write data from rtc ds1307 using i2c protocol but i am unable to read or write data.Here i am posting my code.I have tried both the codes but none of them are working.Can anyone please guide me?
1 -. address of the location at which to begin writing data. 2 -. directly to the data itself. we find that the F7 is written in a cell with address 0, F0 in a cell with address 1, F8 is written in the cell with address 2, etc. 3 -. address of the location at which to begin reading data. 4 -. number of cells that must be read pursuant to paragraph 3 and 4 we read 2,3,4,5,6,7,8 cell 5 -. a slave address of your device (in this case, the memory chips). on page 5 of the above datasheet this address is given: 1010hhh (where x - depending on how you connect the memory. I 0). Then this is the address: 1010000, if translated into a 16-SS get 50.