Date : Tue, 24 Feb 1987 20:55:42 GMT
From : Herman Schuurman <herman@ti-csl.csnet>
Subject: Re: Fact sheet or info in the 8251 USART
in article <1260@beta.UUCP>, dzzr@beta.UUCP (Douglas J Roberts) says:
>
> Does anybody know the commands for the 8251 USART?
> I would like to tell the USART in my Z-80 CPM machine to
> send serial data with 1 start bit, 7 data bits, 1 parity bit, and
> one stop bit.
>
> The initialization routine in my bios sends 0CEH to the serial status
> port which sets the UART to 2 stop bits, 16xclock, 8 data bits, no parity.
>
> If anybody knows the other control bytes, mucho appreciado!
>
> --
> Douglas J. Roberts, dzzr@lanl.gov
> Los Alamos National Laboratory
> Box 1663, F602
> Los Alamos, N. M. 87544
Mode format - async mode
0-1 Clock rate: 00 = sync mode, 01 = 1x, 10 = 16x, 11 = 64x
2-3 Char length: 00 = 5, 01 = 6, 10 = 7, 11 = 8 bits
4 Parity enable: 0 = disabled, 1 = enabled
5 Parity: 0 = odd, 1 = even
6-7 Stop bits: 00 = invalid, 01 = 1, 10 = 1.5, 11 = 2
Command instruction
0 Transmit enable: 1 = enable
1 Data Terminal Ready: 1 = ~DTR is forced low
2 Receive enable: 1 = enable
3 Send break character: 1 = TxD "low", 0 = normal operation
4 Error reset: 1 = Reset PE, OE and FE flags
5 Request to send: 1 = ~RTS is forced low
6 Internal reset: 1 = enter mode instruction format
7 Enter HUNT mode: 1 = enable search for sync chars
Status byte
0 TxRDY: 1 = Transmitter ready for next character
1 RxRDY: 1 = Receiver ready - character waiting
2 TxEMPTY: 1 = Transmit buffer empty
3 PE: Parity Error
4 OE: Overrun Error
5 FE: Framing Error
6 SynDet: 1 = Sync character detected
7 DSR: 1 = Data Set Ready
Bit #0 is the least significant bit; #7 is the most significant bit.
The mode byte for 1 start bit, 7 data bits, odd parity, and 1 stop bit
would be 05Ah (which includes the 16x clock factor too).
--
Herman Schuurman ARPA: herman%TI-CSL@CSNET-RELAY.ARPA
Texas Instruments Inc. CSNET: herman@TI-CSL
PO Box 226015 M/S 238 USENET: {ut-sally,convex!smu,texsun,rice}!ti-csl!herman
Dallas, Texas 75266 VOICE: (214) 995-0845