My question looks simple but still I lost my way to get the issue resolved. Discussion might show me the way.
I am using Pic16f877A microcontroller to write EEPROM using I2C ( 1 Byte at a time ). I need to write 4Bytes integer value (lets say 4284967295 ~ 0xFF67697F). I want to write this value to the EEPROM and Read this value from EEPROM whenever needed. I am unable to find best possible ways to write/read this value.
I tried approaching following way :
unsigned int a = 4284967295; unsigned int result1, result2, result3, result4; result1 = (( a & 0x000000FF ) ); \\ result1 = 127 result2 = (( a & 0x0000FF00 ) ); \\ result2 = 26880 result3 = (( a & 0x00FF0000 ) ); \\ result3 = 6750208 result4 = (( a & 0xFF000000 ) ); \\ result4 = 4278190080
but lost the way. And reference, link, and your guidance will be appreciated.
Thanks in advance!!!!!!!