Datasheet
PIC18F1230/1330
2009 Microchip Technology Inc. DS39758D-page 147
15.0 ENHANCED UNIVERSAL
SYNCHRONOUS
ASYNCHRONOUS RECEIVER
TRANSMITTER (EUSART)
The Enhanced Universal Synchronous Asynchronous
Receiver Transmitter (EUSART) module is one of the
two serial I/O modules. (Generically, the USART is also
known as a Serial Communications Interface or SCI.)
The EUSART can be configured as a full-duplex
asynchronous system that can communicate with
peripheral devices, such as CRT terminals and
personal computers. It can also be configured as a half-
duplex synchronous system that can communicate
with peripheral devices, such as A/D or D/A integrated
circuits, serial EEPROMs, etc.
The Enhanced USART module implements additional
features, including automatic baud rate detection and
calibration, automatic wake-up on Sync Break reception
and 12-bit Break character transmit. These features
make it ideally suited for use in Local Interconnect
Network bus (LIN/J2602 bus) systems.
The EUSART can be configured in the following
modes:
• Asynchronous (full-duplex) with:
- Auto-Wake-up on Character Reception
- Auto-Baud Calibration
- 12-Bit Break Character Transmission
• Synchronous – Master (half-duplex) with
Selectable Clock Polarity
• Synchronous – Slave (half-duplex) with
Selectable Clock Polarity
The pins of the Enhanced USART are multiplexed
with PORTA. In order to configure RA2/TX/CK and
RA3/RX/DT as an EUSART:
• bit SPEN (RCSTA<7>) must be set (= 1)
• bit TRISA<3> must be set (= 1)
• bit TRISA<2> must be set (= 1)
The operation of the Enhanced USART module is
controlled through three registers:
• Transmit Status and Control (TXSTA)
• Receive Status and Control (RCSTA)
• Baud Rate Control (BAUDCON)
These are detailed on the following pages in
Register 15-1, Register 15-2 and Register 15-3,
respectively.
Note: The EUSART control will automatically
reconfigure the pin from input to output as
needed.