24c16 Question:how to read and write at address 0xFF to 7FF?

Status
Not open for further replies.

GraveYard_Killer

New Member
i created a routine for the i2c bus protocol using pic16f877 which can do writes and read. for example, i will read and write a data of 33 to address 01;

Start Condition --- DeviceAddress(0xA0)---ACK-- Address(0x01) -- ACK -- Data(33) -- ACK -- STOP

then read it and display in LCD
Start --- DevAdd (0xA0) -- ACK -- Address(0x01) --ACK -- Start --DevAdd (0xA1) -- ACK -- Receive Data from the 24C16 -- No ACK -- Stop




i can do this to write in the 24c16. but i have problems reading and writing data with address above 0xFF. how do i write the commands for example i want to put data of 0x44 to address 0x123?

is this correct:
Start Condition --- DeviceAddress(0xA0)---ACK-- AddressMSB(0x01) -- ACK --AdressLSB(0x23) -- ACK -- Data(44) -- ACK -- STOP

then read it and display in LCD
Start --- DevAdd (0xA0) -- ACK -- AddressMSB(0x01) --ACK -- AddressLSB(0x23) -- ACK -- Start --DevAdd (0xA1) -- ACK -- Receive Data from the 24C16 -- No ACK -- Stop

is this the way of accessing addresses higher than 0xFF in 24c16? thanks
 
Try reading the datasheet for the 24C16!, but basically you have to select the correct page - you might find my PIC tutorial helpful?. The larger EEPROM's use extended addressing to allow a larger range, but the 24C16 only uses standard addressing.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…