Talk:Universal asynchronous receiver/transmitter
From Wikipedia, the free encyclopedia
Contents |
[edit] Chips
The IBM PC compatibles used National Semiconductor 8250, not the Intel serial chip - because the National chips had built-in programmable baud rate generators. The sucessors were also made by National. This article needs a block diagram of a UART, too. --Wtshymanski 05:58, 13 Apr 2005 (UTC)
[edit] RS 232 and so forth
These standards are discussed in their own articles; the UART may interface to the control lines of an RS 232 interface but doesn't directly generate the voltage levels that go out on the wire. --Wtshymanski 17:49, 17 May 2005 (UTC)
[edit] Programming tips for PCs
"INT 14" is hopelessly IBM-PC specific and not appropriate for a general article on UARTS. I've moved the following lines here but I don't think they belong in this article at all. --Wtshymanski 18:57, 24 February 2006 (UTC)
[edit] Common registers
In most UART chips, registers are grouped into 3 categories:
- Data Registers: Receiver Buffer Register (RBR), Transmitter Holding Register (THR), Sratchpad Register (SCR)
- Control Registers: Bitrate Select Register (DLL/DLM), Line Control Register (LCR), Modem Control Register (MCR), Interrupt Enable Register (IER), Interrupt Identification Register (IIR)
- Status Registers: Line Status Register (LSR), Modem Status Register (MSR)
[edit] Description
- RBR Circuitry in the 8250 chip is programmable to work with 5, 6, 7, or 8 data bits
- THR is used to hold temporary parallel data waiting to be converted to sequence of bits.
- On a 8250 chip, the Read/Write SCR is not used
- LCR is used to control the format of data character
- LSR is usually the first register read by the microprocessor. This register is used to indicate the errors, if any, that may occur as well as the status of the current operation
- MCR is used to control the interface with the modem/data set
- MSR provides the microprocessor with the status of the modem input lines
Also, in some hardware manuals, DLab refers to the last bit (bit 7, or the most significant bit) of the Line Control Register (LCR)
[edit] Basic steps in serial port programming involving the UART
The software will need to initialise the serial port first. After successful initialisation, all operations on the serial port will be passed to and handled by the UART chipset. The basic steps are summarised below:
- Initialise the serial port. To do this, one need to either call interrupt 14h, or write data to the port via its address directly. It is also important that the software set the data format (using LCR) and the data transfer rate (using MCR).
- First level (or device-level) handshaking. The software and hardware will indicate their readiness for the operation. This includes sending Data Terminal Ready (DTR) and Data Set Ready (DSR) signals.
- Second level (or data-level) handshaking. Both parties indicate their readiness for the data transfer process. The software and hardware will send Request To Send (RTS) and Clear To Send (CTS) signals respectively.
- During the transfer process, both the software and the hardware will need to make sure that THR is empty before sending any data and that RBR is ready before reading any data from it.
[edit] Baud vs. bps
From the article:
Speeds for UARTs are in bits per second (bit/s or bps), although often incorrectly called the baud rate.
From the baud article:
In telecommunications and electronics, baud [...] is a measure of the symbol rate [...] Early modems operated only at one bit per symbol, and so baud rate and bit rate for those devices were equivalent.
Doesn't the second quote contradict the first quote? UARTS are 1 bit per symbol and their baud should therefor be equal to their bps. The first quote should therefor be changed. (I'm just passing by.) 129.241.129.67 20:40, 15 June 2007 (UTC)
- Yes, for a UART, the bit rate and baud rate are the same. For an analog signal employing modulation, as used with modems on the public switched telephone network, more than one bit is usually encoded into a signal, so the baud rate is usually much lower than the bit rate. --Brouhaha 07:11, 16 June 2007 (UTC)
[edit] pronunciation
Someone gave a pronunciation of OO-wuh AT. I thought this was odd, so I edited it out. Please replace if I'm wrong - there's an English IPA key at {{IPAEng}}. kwami 06:16, 16 October 2007 (UTC)
[edit] Swap
An asynchronous transmission sends nothing over the interconnection when the transmitting device has nothing to send; but a synchronous interface must send "pad" characters to maintain synchronism between the receiver and transmitter. The two modes need to be swapped, don't they? Sevcsik 20:12, 27 October 2007 (UTC)

