Operation
Manuals at ezsbc.com
Output to and from the Control BASIC occurs via USB that emulates a serial port. When the USB cable is connected with the controller, the host computer will discover a new serial port. The serial port is set to transmit and receive at 57600 bits per second, eight bit per word, one stop bit, no parity. In shorthand 57600,8N1. Any terminal program can be used with Control BASIC. TeraTerm is both free and works well. When the reset button is pressed on the controller a string will be displayed indicating the version number and a short menu of actions. The drivers for USB controller can be found on the FTDI website.
Control BASIC v0.46
R-Run S-Step L-List E-Edit C-Configure B-Bank D-Download K-Reset T-Time & Date.
The message is interpreted as follows:
Run Press R to run the program in the current bank.
Step Single step through the program in the current bank. The line is displayed before it is executed.
List List the program.
Edit Edit the program with the built in full screen editor.
Configure Change the contents of the configuration area of the Flash memory on the controller. The configuration space can be used to change the startup behavior of the EzSBC1. By saving AUTO=T or AUTO=Y in the configuration area the program will automatically start running on power-up. There is a delay of 2.5 seconds where the program can be aborted by pressing any key on the keyboard to return to the main menu. By saving STARTUPTIME=x in the configuration memory the delay prior to running the program can be extended. The value of x increases the delay by 500ms for each value larger than 5. As a precaution against never being able to regain control of the program values of x<5 are ignored. Specifying BANK=0 or BANK=1 selects the bank to run on startup. See the CONF$ keyword for more uses of the configuration area.
Bank The controller has two banks of 64k bytes of Flash memory for storing the your program. It is helpful to debug small test programs in one bank while debugging a larger program in the other bank. Typing 0 or 1 at the prompt chooses the bank used by the Run, List, Edit and Download command. The easiest way to clear a bank that contains a large, unwanted program is to 'download' an empty program to it.
Download By pressing D at the prompt the Controller will wait for a program to save into the current bank. Immediately pressing Ctrl-D will clear the bank. Using the 'Send File' option on the TeraTerm File menu will download a program to the controller. The program must be in ASCII. For large programs the download operation can take some time. The controller writes the Flash in 512 byte blocks and each block is erased before the new code is written into the block of Flash. Also, the program in not stored in ASCII in the Flash but rather in a tokenized format to save space and increase execution speed. Tokenization occurs after the block is downloaded but before it is programmed into the Flash. When the controller is busy writing to the Flash, it can not save data arriving on the serial port. When the controller's buffer is nearly full or prior to programming or erasing the Flash, the controller sends the X-Off character to the host to temporarily suspend serial communication via the USB. When the controller is ready for more data it sends the X-On character to allow the host to resume sending data. To enable this feature to work Xon/Xoff flow control must be enabled on the serial port connecting to the controller.
K-Reset Pressing K at the prompt causes a hardware reset of the CPU on the controller. This is achieved by allowing the internal watchdog timer to expire. Note that the USB bus is not reset allowing the terminal connection to be maintained. Also, the Reset pin on the controller board is an input only and does not toggle when the Reset command is used.
Time & Date The controller has an integrated Real Time Clock that can be accessed from the BASIC code. When the power is first applied the RTC will have random values for the Date and Time. This command displays the current date and time and allows new values to be saved to the RTC. To maintain the RTC when the power to the controller is removed, connect a Lithium coin cell to pin 38 of the controller. The controller has automatic switchover to the backup battery when the power is removed and restored.
If a password is set then listing the program or editing the program requires the password.
Output to and from the Control BASIC occurs via USB that emulates a serial port. When the USB cable is connected with the controller, the host computer will discover a new serial port. The serial port is set to transmit and receive at 57600 bits per second, eight bit per word, one stop bit, no parity. In shorthand 57600,8N1. Any terminal program can be used with Control BASIC. TeraTerm is both free and works well. When the reset button is pressed on the controller a string will be displayed indicating the version number and a short menu of actions. The drivers for USB controller can be found on the FTDI website.
Control BASIC v0.46
R-Run S-Step L-List E-Edit C-Configure B-Bank D-Download K-Reset T-Time & Date.
The message is interpreted as follows:
Run Press R to run the program in the current bank.
Step Single step through the program in the current bank. The line is displayed before it is executed.
- Pressing G when the program is paused ends the single step mode and runs to the end of the program.
- Pressing Ctrl-C while the program is paused ends the program and invokes the monitor.
- Pressing V while the program is paused displays the variables and their values.
List List the program.
Edit Edit the program with the built in full screen editor.
Configure Change the contents of the configuration area of the Flash memory on the controller. The configuration space can be used to change the startup behavior of the EzSBC1. By saving AUTO=T or AUTO=Y in the configuration area the program will automatically start running on power-up. There is a delay of 2.5 seconds where the program can be aborted by pressing any key on the keyboard to return to the main menu. By saving STARTUPTIME=x in the configuration memory the delay prior to running the program can be extended. The value of x increases the delay by 500ms for each value larger than 5. As a precaution against never being able to regain control of the program values of x<5 are ignored. Specifying BANK=0 or BANK=1 selects the bank to run on startup. See the CONF$ keyword for more uses of the configuration area.
Bank The controller has two banks of 64k bytes of Flash memory for storing the your program. It is helpful to debug small test programs in one bank while debugging a larger program in the other bank. Typing 0 or 1 at the prompt chooses the bank used by the Run, List, Edit and Download command. The easiest way to clear a bank that contains a large, unwanted program is to 'download' an empty program to it.
Download By pressing D at the prompt the Controller will wait for a program to save into the current bank. Immediately pressing Ctrl-D will clear the bank. Using the 'Send File' option on the TeraTerm File menu will download a program to the controller. The program must be in ASCII. For large programs the download operation can take some time. The controller writes the Flash in 512 byte blocks and each block is erased before the new code is written into the block of Flash. Also, the program in not stored in ASCII in the Flash but rather in a tokenized format to save space and increase execution speed. Tokenization occurs after the block is downloaded but before it is programmed into the Flash. When the controller is busy writing to the Flash, it can not save data arriving on the serial port. When the controller's buffer is nearly full or prior to programming or erasing the Flash, the controller sends the X-Off character to the host to temporarily suspend serial communication via the USB. When the controller is ready for more data it sends the X-On character to allow the host to resume sending data. To enable this feature to work Xon/Xoff flow control must be enabled on the serial port connecting to the controller.
K-Reset Pressing K at the prompt causes a hardware reset of the CPU on the controller. This is achieved by allowing the internal watchdog timer to expire. Note that the USB bus is not reset allowing the terminal connection to be maintained. Also, the Reset pin on the controller board is an input only and does not toggle when the Reset command is used.
Time & Date The controller has an integrated Real Time Clock that can be accessed from the BASIC code. When the power is first applied the RTC will have random values for the Date and Time. This command displays the current date and time and allows new values to be saved to the RTC. To maintain the RTC when the power to the controller is removed, connect a Lithium coin cell to pin 38 of the controller. The controller has automatic switchover to the backup battery when the power is removed and restored.
If a password is set then listing the program or editing the program requires the password.