Hi all
I've come across an anomaly with my project. I'm using an eeprom (24LC16B) and was having difficulty reading from it.
For my test, I was writing a string of characters, and then sertxd-ing it to the terminal.
The output is
The 17th byte is not written in address 16, but instead it has overwritten address 0.
Is this normal behavior, so that I have to write in 16byte chunks (which does work, by the way) or am I missing something?
Thanks
I've come across an anomaly with my project. I'm using an eeprom (24LC16B) and was having difficulty reading from it.
For my test, I was writing a string of characters, and then sertxd-ing it to the terminal.
Code:
#picaxe 08m2
#no_data
pause 1000
'setup eeprom
hi2csetup i2cmaster, %10100000, i2cfast, i2cbyte
pause 100
'reset first 32 bytes to $FF
for b0 = 0 to 255
hi2cout b0,($FF)
pause 10
next
pause 100
'write data
hi2cout 0,("01234567ABCDEFGHI")'17 bytes
pause 100
'read eeprom and output to terminal
for b0 = 0 to 16
hi2cin b0,(b1)
sertxd (b1)
next
Code:
I1234567ABCDEFGHÿ
Is this normal behavior, so that I have to write in 16byte chunks (which does work, by the way) or am I missing something?
Thanks