Still having a problem with my datalogger program. Can't sertxd the 10 bit adc (1 to 1023) to the terminal correctly using the 24lc256 external memory. If I use the internal eeprom on the 18X it works ok.
Here are the two programs, any suggestions?
This program works.
main: pause 2000
high 0
for w2 = 0 to 127
readadc10 1,w0
write w2,b1
w3 = w2 + 128
write w3,b0
pause 10
next w2
low 0
loop: pause 1000
high 7
for w2 = 0 to 127
read w2,b3
w3 = w2 + 128
read w3,b2
sertxd (#w1,13,10)
pause 10
next w2
low 7
goto loop
This one does not.
main: pause 2000
i2cslave %10100000,i2cfast,i2cword
high 0
for w2 = 0 to 127
readadc10 1,w0
writei2c w2,(b1)
w3 = w2 + 128
writei2c w3,(b0)
pause 10
next w2
low 0
loop: pause 1000
high 7
for w2 = 0 to 127
readi2c w2,(b3)
w3 = w2 + 128
readi2c w3,(b2)
sertxd (#w1,13,10)
next w2
low 7
goto loop
Â