EmbeddedBlue 500
13
Copyright ©2003 A7 Engineering, Inc.
BASIC Stamp Application Debugging
When debugging your BASIC Stamp application that uses an eb500 it is important that the
BASIC Stamp application and the eb500 are in sync. When the BASIC Stamp Editor begins
the downloading process the BASIC Stamp is reset; however, this reset does not reset the
eb500. This can cause an existing application on the BASIC Stamp to begin executing,
which can lead to a situation where the new application and the eb500 are not in sync. It is
possible that the eb500 could be in Data Mode or in an unpredictable command mode state,
due to the execution of the existing BASIC Stamp application. Therefore, during the
application debugging process, it is recommended that the following code be inserted at the
beginning of your BASIC Stamp application, before you read or set any I/O points or issue
any commands to the eb500.
‘*************************************************************
IF in5 = 0 THEN ClearCmd
DEBUG “eb500 Connected (in Data Mode)”,CR
‘Switch to Command Mode
LOW 6
SERIN 0,84,[WAIT(CR,”>”)]
‘Disconnect from the remote device
SEROUT 1,84,[“dis”,CR]
SERIN 0,84,[WAIT(CR,”>”)]
GOTO Start
ClearCmd:
DEBUG “eb500 in Command Mode”,CR
‘Issue a carriage-return to clear any commands
SEROUT
1,84,[CR]
SERIN
0,84,[WAIT(“>”)]
‘*************************************************************