SN8P26L38
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 120
Version 1.5
12
Universal Asynchronous
Receiver/Transmitter (UART)
12.1
OVERVIEW
The UART interface is an universal asynchronous receiver/transmitter method. The serial interface is applied to low
speed data transfer and communicate with low speed peripheral devices. The UART transceiver of Sonix 8-bit MCU
allows RS232 standard and supports one and two bytes data length. The transfer format has start bit, 8/16-bit data,
parity bit and stop bit. Programmable baud rate supports different speed peripheral devices. UART I/O pins support
push-pull and open-drain structures controlled by register. The UART features include the following:
Full-duplex, 2-wire asynchronous data transfer.
Programmable baud rate.
8-bit and 16-bit data length.
Odd and even parity bit.
End-of-Transfer interrupt.
12.2
UART OPERATION
The UART RX and TX pins are shared with GPIO. When UART enables (RXDEN=1, TXDEN=1), the UART shared
pins transfers to UART purpose and disable GPIO function automatically. When UART disables, the UART pins returns
to GPIO last status. The UART data buffer length supports 1-byte and 2-byte. After UART RX operation finished, the
RXIRQ sets as “1”. After UART TX operation finished, the TXIRQ sets as “1”. The UART IRQ bits are cleared by
program. If the RXIEN or TXIEN set to enable, the RXIRQ and TXIRQ triggers the interrupt request and program
counter jumps to interrupt vector to execute interrupt service routine.
Fhosc
UART Baud Rate
Control Block
(Pre-scaler and Divider)
URRXD1 8-bit Buffer
URX
URXEN
CPUM1,0
UART I/O Counter
Parity
Check
URRXD2 8-bit Buffer
URXM
URXPS URXPEN
URXS1,0 and RX interrupt
TX interrupt
URXEN
URXPC
URTXD1 8-bit Buffer
UTX
UTXEN
CPUM1,0
Parity
Check
URTXD2 8-bit Buffer
UTXM
UTXPS UTXPEN
UTXPC
UTXEN
UART Interface Circuit Diagram