Datasheet
Chapter 2: EEPROM Tricks and Program Tips ยท Page 51
Figure 2-3 Debug Terminal Transmit and Receive Windowpanes
Illustrating Many Jobs with a Few Variables
The temp and counter variables get used and re-used in the next example program. In
later example programs they will be used and re-used by many different subroutines. The
temp variable is first used in a DEBUGIN command to get a threshold variable from the
Debug Terminal's Transmit windowpane.
' Get threshold value and store it in EEPROM
DEBUG CLS,
"Enter a threshold value", CR,
"between 100 and 1000", CR,
">"
DEBUGIN DEC temp
WRITE Threshold, Word temp
Next, the temp variable is used to get successive values from the Debug Terminal and
store each in EEPROM. This is also the first (but not the last) time in the program that
the
counter variable is used as a loop counter.
Transmit Windowpane
Type each value here,
then press Enter.
Receive Windowpane
Prompts you to enter
values and replies into
the Transmit
Windowpane.