This built-in facility controls the transmission of user programs from a host computer (e.g. an IBM PC or compatible) over the serial interface to the EyeBot RAM or Flash-ROM. It is one of a number of system routines provided with the EyeBot hardware, which allow users to design and run their own applications.
The routine requires that the user install a terminal program on the host PC, and configure its serial protocol to match that of the EyeBot. This terminal program sends an S-Record file to the EyeBot, under the control of the download routine.
The command sequence (below) describes the series of EyeBot key presses required to specify the download parameters. These keypresses are the only direct user input to the download routine.
During the transmission, the Download Program provides the name of the program being loaded, and a progress report with the number of bytes received. The final output is a successful completion screen, and the opportunity to run the loaded program.
The Download Program provides a returncode to the EyeBot operating sytem, in the event that it encounters invalid data transmission events. The download is aborted at the point where the error occurs. The user program cannot be run if an error occurs during its transmission. The condition that caused the error must be corrected, and another download attempt made. A brief error message will be displayed on the LCD.
The portion of the standard EyeBot RAM not in use by its BIOS begins at 20000 hex and extends to 40000 hex, giving 128 KB of available space for user programs. Total RAM is extendable to 1MB.
The maximum possible baudrate is 57600. When 115200 baud was attempted, it produced unavoidable framing errors on each character received.
This version of the download routine can only produce a progress report when using RTS/CTS flow control. The use of this feature, however, significantly increases the transfer time. Therefore, the choices are: slower transfer with a progress report, or faster transfer without it.
The reason for this limitation is the fact that the download routine is doing polled, not interrupt-driven I/O. Any attempt to write to the LCD during the polling process without halting the sender causes a data overrun status error, ie. one or more characters have been lost. When RTS/CTS flow control is used, the Download routine on the EyeBot turns the Clear To Send (CTS) signal off to prevent the PC from sending while it is writing to the display.
SerSetup: Serial Speed: * 9600 Handshake: RTS/CTS + - Nxt END |
Ready to download at 57600, RTS/CTS: Downloading: END |
Ready to download at 57600, RTS/CTS: Downloading: myprog.hex Bytes: 80260 Ld Run Rom END |
User Prog.: Program loaded: myprog.hex Ld Run Rom END |
---Flashdrive--- Program in RAM: myprog.hex Programs in ROM: NONE.hex * NONE.hex NONE.hex Sav Ld Nxt END |