But it reads wrong address or something is wrong
code is this:
Code: Select all
Sub procedure Update_Events()
Dim read_buf as word
HI(read_buf) = EEPROM_Read(0x0)
LO(read_buf) = EEPROM_Read(0x1)
EEPROM_Write(0x0,hi(read_buf))
EEPROM_Write(0x1,lo(read_buf))
hi(read_buf) = EEPROM_Read(0x2)
lo(read_buf) = EEPROM_Read(0x3)
EEPROM_Write(0x2,hi(read_buf))
EEPROM_Write(0x3,lo(read_buf))
End sub
If I save value on 0x1 to 0x4 like this:
01 02 03 04
result will be this:
01 02 02 02
Instead of this:
01 02 03 04
Why?