S3CC40D/FC40D_UM_REV1.20
UART 0
25
UART 0
OVERVIEW
The UART 0 block has a full-duplex serial port with programmable operating modes: There is one synchronous
mode and three UART (Universal Asynchronous Receiver/Transmitter) 0 modes:
Serial I/O with baud rate of fxx/(16
× (BR0DATA+1))
8-bit UART mode; variable baud rate
9-bit UART mode; fxx/16
9-bit UART mode, variable baud rate
UART 0 receive and transmit buffers are both accessed via the data register, UART0DATA, is at address
3F00B2H. Writing to the UART 0 data register loads the transmit buffer; reading the UART 0 data register
accesses a physically separate receive buffer.
When accessing a receive data buffer (shift register), reception of the next byte can begin before the previously
received byte has been read from the receive register. However, if the first byte has not been read by the time the
next byte has been completely received, one of the bytes will be lost.
In all operating modes, transmission is started when any instruction (usually a write operation) uses the
UART0DATA register as its destination address. In mode 0, serial data reception starts when the receive interrupt
bit (IRR8) is "1" and the receive enable bit (UART0CONH.4) is "1". In mode 1, 2, and 3, reception starts whenever
an incoming start bit ("0") is received and the receive enable bit (UART0CONH.4) is set to "1".
PROGRAMMING PROCEDURE
To program the UART 0 modules, follow these basic steps:
1.
Configure P7.6 and P7.7 to alternative function (RxD0 (P7.6), TxD0 (P7.7)) for UART module by setting the
P7CONH register to appropriately value.
2.
Load an 8-bit value to the UART0CONH/L control register to properly configure the UART I/O module.
3.
For interrupt generation, set the UART 0 I/O interrupt enable bit (IMR0H.0 or IMR0L.7) to "1".
4.
When you transmit data to the UART 0 buffer, write data to UART0DATA, the shift operation starts.
5.
When the shift operation (transmit/receive) is completed, UART 0 Receive Start Bit (UART0CONH.0) is set to
"1" and an UART 0 interrupt request is generated.
25-1