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
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