DOS Upload Utilities

> | III.3 DOS Upload Utilities The BOOT-51 package for DOS/Windows contains the utilities COMPORT.EXE, RESET51.EXE, and SLEEP.EXE, which are usually invoked by UPLOAD.BAT, but can also be used separately. COMPORT sets <baudrate> and data format of a PC serial <port>: `COMPORT <port> <baudrate> [<parity> [<databits> [<stopbits>]]]` Legal parameter values are:
> <port>: |  | AUX, COM1, COM2, COM3, COM4
> <baudrate>: |  | 1.66 < baudrate < 121000
> <parity>: |  | N, O, E, M, S | (default: N)
> <databits>: |  | 5, 6, 7, 8 | (default: 8)
> <stopbits>: |  | 1, 1.5, 2 | (default: 1)
The port names AUX and COM1 are equivalent. COMPORT allows to set very low, very high, and very odd baudrates, which can be generated by the 16C450 UART of the PC (and the 8051 board), but are not supported by the PC BIOS or the MS-DOS MODE command. Baudrates that cannot be generated exactly are accepted as long as the deviation doesn't exceed 5.0 %. COMPORT displays the "real" baudrate and the relative deviation (if any) from the nominal value. The parity can optionally be set to N (none), O (odd), E (even), M (mark), or S (space). Furthermore, the data format can be set to 5, 6, 7, or 8 data bits, and 1, 1.5, or 2 stop bits. Default settings are: no parity, 8 data bits and 1 stop bit.
Note: |  | only 6, 7 or 8 data bits may be combined with 1 or 2 stop bits. 5 data bits are only possible with 1.5 stop bits!
Example 1: |  | `COMPORT COM4 12800`
|  | Sets the serial port COM4 to 12800 Baud, no parity, 8 data bits, and 1 stop bit.
RESET51 forms a reset pulse of the duration <pulsewidth> at the D0 and D1 outputs of a PC printer <port>, or at the DTR output of a serial <port>: `RESET51 <port> [<pulsewidth>]`
Legal <port> values are: |  | PRN, LPT1, LPT2, LPT3, AUX, COM1, COM2, COM3, COM4, NUL
PRN and LPT1 are equivalent, and so are AUX and COM1. The optional parameter <pulsewidth> is the duration of the reset pulse in ms. Legal values are: 1 <= <pulsewidth> <= 65535. (default is 50) When invoked without parameters, a help screen is displayed. In case of error, RESET51 returns the ERRORLEVEL 1, 0 otherwise. When executed, RESET51 forms a positive pulse at D0 (pin 2), and a negative pulse at D1 (pin 3) of a PC printer port, or a "high" pulse (-12 V !!!) at the DTR output of a serial port respectively. If the NUL device is specified as <port>, RESET51 delays only for <pulsewidth> ms. If the default pulse width of 50 ms is too short to reset the MCS-51 board, specify a greater pulse width.
Example 2: |  | `RESET51 LPT2 500`
|  | Applies a reset signal to the D0 and D1 outputs of the printer port LPT2 for 500 ms.
RESET51 is running under MS-DOS, and in the DOS-Boxes of Windows 3.1x and 9x. Windows ME does no longer provide a DOS-Box. RESET51 is not running under Windows NT, 2000, and XP! For batch file operation, a reset line is highly recommended! If you don't have it, you will always have to press the reset button of the target system, before invoking BOOT.BAT. Since this may easily be forgotten, it is better to automate this step. SLEEP waits until BOOT-51 has output <chars> characters of its sign-on message at a given <baudrate>: `SLEEP <baudrate> [<chars>]` SLEEP is a simple delay program, which is waiting as long as it takes to output <chars> characters with the specified <baudrate>. However, SLEEP takes into account, that BOOT-51 will never send more than one character per ms, even at very high baudrates. The default value of <chars> is 70, which is slightly more than the total length of the BOOT-51 sign-on message.
Example 3: |  | `SLEEP 300`
|  | Waits until BOOT-51 has fully output its sign-on message at 300 Baud.