LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

Read/write data using i2c/spi protocol

Hi everyone,

                 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?

Download All
0 Kudos
Message 1 of 3
(6,989 Views)

Hi, habibi

try to use a delay of about 5 ms

45564.jpg 

 

 

 Now explain what is what:

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.

0 Kudos
Message 2 of 3
(6,986 Views)

Hi,

 

I am trying to do the same thing also, but the data read is always 255 (which is the default value i think?). What should i actually connect to the "write data" port? an array? or other things?

 

Best Regards,

Kent

0 Kudos
Message 3 of 3
(6,482 Views)