📄 butils.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- DOS Upload Utilities --><HTML><HEAD><TITLE>DOS Upload Utilities</TITLE><META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1"></HEAD><BODY BACKGROUND="spiral.gif" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#990099" ALINK="#FF0000"><TABLE WIDTH="98%"><TR><TD WIDTH=60 VALIGN=BOTTOM NOWRAP><IMG SRC="transp.gif" ALT="" WIDTH=60 HEIGHT=20></TD><TD><!-- Ab hier Seitentext: --><P><BIG><BR><STRONG><U>III.3 DOS Upload Utilities</U></STRONG></BIG></P><P><BIG>The <NOBR>BOOT-51</NOBR> package for <NOBR>DOS/Windows</NOBR> contains theutilities <NOBR><EM>COMPORT.EXE</EM></NOBR>, <NOBR><EM>RESET51.EXE</EM></NOBR>,and <NOBR><EM>SLEEP.EXE</EM></NOBR>, which are usually invoked by<NOBR><EM>UPLOAD.BAT</EM></NOBR>, but can also be used separately.</BIG></P><P><BIG><STRONG><U>COMPORT</U></STRONG></BIG></P><P><BIG>sets <baudrate> and data format of a PC serial <port>:</BIG></P><P><CENTER><BIG><STRONG><CODE>COMPORT <port> <baudrate> [<parity> [<databits> [<stopbits>]]]</CODE></STRONG></BIG></CENTER></P><P><BIG>Legal parameter values are:</BIG></P><P><BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD><BIG><port>:</BIG></TD> <TD NOWRAP> </TD> <TD COLSPAN=2 NOWRAP><BIG>AUX, COM1, COM2, COM3, COM4</BIG></TD></TR><TR><TD><BIG><baudrate>:</BIG></TD><TD> </TD> <TD COLSPAN=2 NOWRAP><BIG>1.66 < baudrate < 121000</BIG></TD></TR><TR><TD><BIG><parity>:</BIG></TD><TD> </TD> <TD NOWRAP><BIG>N, O, E, M, S</BIG></TD> <TD NOWRAP><BIG>(default: N)</BIG></TD></TR><TR><TD><BIG><databits>:</BIG></TD><TD> </TD> <TD NOWRAP><BIG>5, 6, 7, 8</BIG></TD> <TD NOWRAP><BIG>(default: 8)</BIG></TD></TR><TR><TD><BIG><stopbits>:</BIG></TD><TD> </TD> <TD NOWRAP><BIG>1, 1.5, 2</BIG></TD> <TD NOWRAP><BIG>(default: 1)</BIG></TD></TR></TABLE></BLOCKQUOTE></P><P><BIG>The port names AUX and COM1 are equivalent.<BR><STRONG>COMPORT</STRONG> 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 <NOBR>MS-DOS</NOBR> <STRONG>MODE</STRONG>command.<BR>Baudrates that cannot be generated exactly are accepted as long as thedeviation doesn't exceed <NOBR>5.0 %</NOBR>. <STRONG>COMPORT</STRONG> displays the"real" baudrate and the relative deviation (if any) from thenominal value.<BR>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 8data bits, and 1, <NOBR>1.5</NOBR>, or 2 stop bits.<BR>Default settings are: no parity, 8 data bits and 1 stop bit.</BIG></P><P><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD VALIGN=TOP><BIG>Note:</BIG></TD> <TD NOWRAP> </TD> <TD NOWRAP><BIG>only 6, 7 or 8 data bits may be combined with 1 or 2 stop bits.<BR>5 data bits are only possible with <NOBR>1.5</NOBR> stop bits!</BIG></TD></TR></TABLE></P><P><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD NOWRAP><BIG><STRONG>Example 1:</STRONG></BIG></TD> <TD NOWRAP> </TD> <TD NOWRAP><BIG><CODE>COMPORT COM4 12800</CODE></BIG></TD></TR><TR><TD> </TD><TD> </TD><TD> </TD></TR><TR><TD> </TD><TD> </TD> <TD><BIG>Sets the serial port COM4 to 12800 Baud, no parity, 8 data bits, and 1 stop bit.</BIG></TD></TR></TABLE></P><P><BIG><STRONG><U>RESET51</U></STRONG></BIG></P><P><BIG>forms a reset pulse of the duration <pulsewidth> at the D0 and D1 outputsof a PC printer <port>, or at the DTR output of a serial <port>:</BIG></P><P><BLOCKQUOTE><BIG><STRONG><CODE>RESET51 <port> [<pulsewidth>]</CODE></STRONG></BIG></BLOCKQUOTE></P><P><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD VALIGN=TOP><BIG>Legal <port> values are:</BIG></TD> <TD NOWRAP> </TD> <TD NOWRAP><BIG>PRN, LPT1, LPT2, LPT3,<BR> AUX, COM1, COM2, COM3, COM4,<BR> NUL</BIG></TD></TR></TABLE></P><P><BIG>PRN and LPT1 are equivalent, and so are AUX and COM1.<BR>The optional parameter <pulsewidth> is the duration of the reset pulse in ms.<BR>Legal values are: 1 <= <pulsewidth> <= 65535. (default is 50)<BR>When invoked without parameters, a help screen is displayed.<BR>In case of error, <STRONG>RESET51</STRONG> returns the ERRORLEVEL 1, 0 otherwise.<BR>When executed, <STRONG>RESET51</STRONG> forms a positive pulse at D0 <NOBR>(pin 2)</NOBR>,and a negative pulse at D1 <NOBR>(pin 3)</NOBR> of a PC printer port, or a"high" pulse <NOBR>(-12 V !!!)</NOBR> at the DTR output of a serialport respectively.<BR>If the NUL device is specified as <port>, <STRONG>RESET51</STRONG> delays onlyfor <pulsewidth> ms.<BR>If the default pulse width of <NOBR>50 ms</NOBR> is too short to reset the<NOBR>MCS-51</NOBR> board, specify a greater pulse width.</BIG></P><P><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD NOWRAP><BIG><STRONG>Example 2:</STRONG></BIG></TD> <TD NOWRAP> </TD> <TD NOWRAP><BIG><CODE>RESET51 LPT2 500</CODE></BIG></TD></TR><TR><TD> </TD><TD> </TD><TD> </TD></TR><TR><TD> </TD><TD> </TD> <TD><BIG>Applies a reset signal to the D0 and D1 outputs of the printer port LPT2 for 500 ms.</BIG></TD></TR></TABLE></P><P><BIG><STRONG>RESET51</STRONG> is running under <NOBR>MS-DOS</NOBR>, and in the DOS-Boxesof Windows <NOBR>3.1x</NOBR> and 9x.<BR>Windows ME does no longer provide a DOS-Box.<BR><STRONG>RESET51</STRONG> is not running under Windows NT, 2000, and XP!</BIG></P><P><BIG>For batch file operation, a reset line is highly recommended! If you don'thave it, you will always have to press the reset button of the target system,before invoking <NOBR><EM>BOOT.BAT</EM></NOBR>.Since this may easily be forgotten, it is better to automate this step.</BIG></P><P><BIG><STRONG><U>SLEEP</U></STRONG></BIG></P><P><BIG>waits until <NOBR>BOOT-51</NOBR> has output <chars> characters of itssign-on message at a given <baudrate>:</BIG></P><P><BLOCKQUOTE><BIG><STRONG><CODE>SLEEP <baudrate> [<chars>]</CODE></STRONG></BIG></BLOCKQUOTE></P><P><BIG><STRONG>SLEEP</STRONG> is a simple delay program, which is waiting as long as it takesto output <chars> characters with the specified <baudrate>.However, <STRONG>SLEEP</STRONG> takes into account, that <NOBR>BOOT-51</NOBR> willnever send more than one character per ms, even at very high baudrates.<BR>The default value of <chars> is 70, which is slightly more than thetotal length of the <NOBR>BOOT-51</NOBR> sign-on message.</BIG></P><P><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD NOWRAP><BIG><STRONG>Example 3:</STRONG></BIG></TD> <TD NOWRAP> </TD> <TD NOWRAP><BIG><CODE>SLEEP 300</CODE></BIG></TD></TR><TR><TD> </TD><TD> </TD><TD> </TD></TR><TR><TD> </TD><TD> </TD> <TD><BIG>Waits until BOOT-51 has fully output its sign-on message at 300 Baud.</BIG></TD></TR></TABLE></P><!-- Seitentext Ende --><P><BR><BR><CENTER><TABLE WIDTH="70%"><TR><TH><A HREF="boot51.htm"><IMG SRC="home.gif" ALT="[contents]" BORDER=0 WIDTH=32 HEIGHT=32></A></TH> <TH><A HREF="boperat.htm"><IMG SRC="up.gif" ALT="[up]" BORDER=0 WIDTH=32 HEIGHT=32></A></TH> <TH><A HREF="bbatch.htm"><IMG SRC="back.gif" ALT="[back]" BORDER=0 WIDTH=32 HEIGHT=32></A></TH> <TH><A HREF="bscript.htm"><IMG SRC="next.gif" ALT="[next]" BORDER=0 WIDTH=32 HEIGHT=32></A></TH></TR></TABLE></CENTER></P></TD></TR></TABLE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -