Ok figured out the EEPROM thing kind of - works fine when working with a single digit
Just need to know how I can store a string of numbers and then return it on demand. Code so far:
Code:
Include "modedefs.bas"
OSCCON = %01100000 'set for 4mhz internal
CMCON0 = 7 'TURN COMPARITORS OFF
ANSEL = %00000000 'Set A/D OFF
ADCON0 = %00000000 'Analog converter OFF
TRISIO = %00000000 'Set GSIO 4 and 2 to INPUT, others to OUTPUT
tcx var GPIO.0 'output pin
rcx var GPIO.1 'input pin
led VAR GPIO.5
cmd VAR byte
x VAR BYTE
Main:
serin rcx,n2400,cmd
If cmd = "0" THEN GOTO SetNum
If cmd = "1" THEN GOTO RetNum
GOTO Main
setNum:
serin rcx,n2400,x
WRITE 2, x
GOTO Main
RetNum:
READ 2, x
SEROUT tcx,n2400,[x]
goto main
Bookmarks