Dear All:
For memory addressing, we need High and Low Bytes, as see the datasheet of memory, this devise have a 256kb this mean that we have 4096 readings, is it right?, then how can I address the individual register to obtain 4096 registers
(xxxBytes H and xxxBytes L ?)
Thanks
AG
I2C/ Test / 24LC256
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
- Contact:
Re: I2C/ Test / 24LC256
Hi,
You have 256k bits of data, this means 256 * 1024 = 262144 bits, this means 32768 bytes (starting from 0 to 32767).
So you can write data from 0000 (hex value) to 7FFF (hex value).
To write a byte to address 1234h (example), you'll first need to send a control byte (see datasheet).
Then you'll need to send the higher 8 bits (12h) of the address and then the lower 8 bits (34h) of the address to the EEPROM.
Once that's done, you can send your byte.
PS: Don't forget the startbit and stopbit.
I did use a 24FC1025 EEPROM before, it is used almost the same way as the 24LC256.
Here's a link to the article on my webpage : http://pyroesp.x10.mx/PIC/post3.html
Regards,
Nicolas Lopez F.
You have 256k bits of data, this means 256 * 1024 = 262144 bits, this means 32768 bytes (starting from 0 to 32767).
So you can write data from 0000 (hex value) to 7FFF (hex value).
To write a byte to address 1234h (example), you'll first need to send a control byte (see datasheet).
Then you'll need to send the higher 8 bits (12h) of the address and then the lower 8 bits (34h) of the address to the EEPROM.
Once that's done, you can send your byte.
PS: Don't forget the startbit and stopbit.
I did use a 24FC1025 EEPROM before, it is used almost the same way as the 24LC256.
Here's a link to the article on my webpage : http://pyroesp.x10.mx/PIC/post3.html
Regards,
Nicolas Lopez F.