Hi Guys,
I am working on a simple data logger and need some help. The data logger will only be powered while collecting data (from RTC and switch locations) so i need to write the data to the eeprom incrementally. My code below increments by 10 to address 0 (as I will be eventually writing 10 bytes of data), every run through adds 10 to address zero and then saves the new value. I can only get the variable to take values up to a value of 250. How do I access the higher address locations?
Cheers, Si
--------------------------------------------------------------
high 0
pause 150
i2cslave %10100000, i2cfast, i2cword 'initialise eeprom
readi2c 0,(w0) 'read loc 0
pause 50
w1=w0+100 'loc 0 + 10 =b13
writei2c 0,(w1) 'write w1 to loc 0
low 0
pause 200
high 0
i2cslave %10100000, i2cfast, i2cword
readi2c 0,(w0,w1,w2)
PAUSE 20
sertxd ("w0 ",#w0,13,10,"w1 ",#w1,13,10,"w2 ",#w2,13,10)
pause 10
low 0
I am working on a simple data logger and need some help. The data logger will only be powered while collecting data (from RTC and switch locations) so i need to write the data to the eeprom incrementally. My code below increments by 10 to address 0 (as I will be eventually writing 10 bytes of data), every run through adds 10 to address zero and then saves the new value. I can only get the variable to take values up to a value of 250. How do I access the higher address locations?
Cheers, Si
--------------------------------------------------------------
high 0
pause 150
i2cslave %10100000, i2cfast, i2cword 'initialise eeprom
readi2c 0,(w0) 'read loc 0
pause 50
w1=w0+100 'loc 0 + 10 =b13
writei2c 0,(w1) 'write w1 to loc 0
low 0
pause 200
high 0
i2cslave %10100000, i2cfast, i2cword
readi2c 0,(w0,w1,w2)
PAUSE 20
sertxd ("w0 ",#w0,13,10,"w1 ",#w1,13,10,"w2 ",#w2,13,10)
pause 10
low 0