Go Down

Topic: change int to byte to store in external storage(DS3231) and back to int (Read 119 times) previous topic - next topic

LingSN

hello guys, I need help on to change the int to byte to store to external storage(DS3231) and change the byte back to int to display the data again..... how should i type the coding????

thank you

GolamMostafa

Please, be clear in your expression what you want; only then, you can get some help.

You have an integer data like 0x1234. Correct? Do you want to separate it into its constituent bytes? If so, the upper byte is 0x12, and the lower byte is 0x34.

Now, search google/Arduino Reference Manual to find functions/instructions to get the bytes of the integer data. To get the integer data back, you join the bytes.

You are talking about external storage of DS3231. DS3231 is the RTC Chip which has some internal registers. The RTC also comes as a module, shown below, which consists of : a small PCB, the Ds3231 chip, and 24C32 EEPROM. Here, the 24C32 EEPROM is the external storage device. Are you saying about it?
 


Thanks,

Go Up