Uart1 (c8051f340/1/4/5/8/a/b/c only), Figure 19.1. uart1 block diagram – Silicon Laboratories C8051F347 User Manual

Page 213

Advertising
background image

Rev. 1.3

213

C8051F340/1/2/3/4/5/6/7/8/9/A/B/C/D

19. UART1 (C8051F340/1/4/5/8/A/B/C Only)

UART1 is an asynchronous, full duplex serial port offering a variety of data formatting options. A dedicated
baud rate generator with a 16-bit timer and selectable prescaler is included, which can generate a wide
range of baud rates (details in

Section “19.1. Baud Rate Generator” on page 214

). A received data

FIFO allows UART1 to receive up to three data bytes before data is lost and an overflow occurs.

UART1 has six associated SFRs. Three are used for the Baud Rate Generator (SBCON1, SBRLH1, and
SBRLL1), two are used for data formatting, control, and status functions (SCON1, SMOD1), and one is
used to send and receive data (SBUF1). The single SBUF1 location provides access to both the transmit
holding register and the receive FIFO. Writes to SBUF1 always access the Transmit Holding Register.
Reads of SBUF1 always access the first byte of the Receive FIFO; it is not possible to read data
from the Transmit Holding Register.

With UART1 interrupts enabled, an interrupt is generated each time a transmit is completed (TI1 is set in
SCON1), or a data byte has been received (RI1 is set in SCON1). The UART1 interrupt flags are not
cleared by hardware when the CPU vectors to the interrupt service routine. They must be cleared manually
by software, allowing software to determine the cause of the UART1 interrupt (transmit complete or receive
complete). Note that if additional bytes are available in the Receive FIFO, the RI1 bit cannot be cleared by
software.

Figure 19.1. UART1 Block Diagram

SBUF1

TX Holding

Register

RX FIFO
(3 Deep)

TX

Logic

RX

Logic

Write to SBUF1

Read of SBUF1

TX1

RX1

SMOD1

MC

E1

S1

PT1

S1

PT0

PE

1

S1

D

L

1

S1

D

L

0

XB

E1

SB

L1

Data Formatting

SCON1

OVR1

P

E

RR1

T

HRE

1

RE

N1

TBX1

RB

X1

TI1

RI

1

Control / Status

UART1

Interrupt

Timer (16-bit)

Pre-Scaler

(1, 4, 12, 48)

SYSCLK

SBRLH1

SBRLL1

Overflow

SBCON1

SB

1RU

N

SB

1

P

S1

SB

1

P

S0

EN

Baud Rate Generator

Advertising
This manual is related to the following products: