01.04.2014 Views

Preliminary C8051F120/1/2/3 C8051F124/5/6/7 - KEMT FEI TUKE

Preliminary C8051F120/1/2/3 C8051F124/5/6/7 - KEMT FEI TUKE

Preliminary C8051F120/1/2/3 C8051F124/5/6/7 - KEMT FEI TUKE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Preliminary</strong><br />

<strong>C8051F120</strong>/1/2/3<br />

<strong>C8051F124</strong>/5/6/7<br />

22. UART1<br />

UART1 is an asynchronous, full duplex serial port offering modes 1 and 3 of the standard 8051 UART. Enhanced<br />

baud rate support allows a wide range of clock sources to generate standard baud rates (details in Section<br />

“22.1. Enhanced Baud Rate Generation” on page 266). Received data buffering allows UART1 to start reception<br />

of a second incoming data byte before software has finished reading the previous data byte.<br />

UART1 has two associated SFRs: Serial Control Register 1 (SCON1) and Serial Data Buffer 1 (SBUF1). The single<br />

SBUF1 location provides access to both transmit and receive registers. Reading SBUF1 accesses the buffered<br />

Receive register; writing SBUF1 accesses the Transmit register.<br />

With UART1 interrupts enabled, an interrupt is generated each time a transmit is completed (TI1 is set in SCON1), or<br />

a data byte has been received (RI1 is set in SCON1). The UART1 interrupt flags are not cleared by hardware when<br />

the CPU vectors to the interrupt service routine. They must be cleared manually by software, allowing software to<br />

determine the cause of the UART1 interrupt (transmit complete or receive complete).<br />

Figure 22.1. UART1 Block Diagram<br />

SFR Bus<br />

Write to<br />

SBUF1<br />

TB81<br />

SET<br />

D Q<br />

CLR<br />

SBUF1<br />

(TX Shift)<br />

TX1<br />

Crossbar<br />

Zero Detector<br />

StopBit<br />

Shift<br />

Data<br />

Start<br />

Tx Clock<br />

Tx Control<br />

Tx IRQ<br />

Send<br />

UART1 Baud<br />

Rate Generator<br />

S1MODE<br />

SCON1<br />

MCE1<br />

REN1<br />

TB81<br />

RB81<br />

TI1<br />

RI1<br />

TI1<br />

RI1<br />

Serial<br />

Port<br />

Interrupt<br />

Port I/O<br />

Rx Clock<br />

Start<br />

Rx Control<br />

Shift 0x1FF RB81<br />

Rx IRQ<br />

Load<br />

SBUF1<br />

Input Shift Register<br />

(9 bits)<br />

Load SBUF1<br />

SBUF1<br />

(RX Latch)<br />

Read<br />

SBUF1<br />

SFR Bus<br />

RX1<br />

Crossbar<br />

© 2002 Cygnal Integrated Products, Inc. DS008-0.8-AUG02 Page 265

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!