Datasheet

2010 Microchip Technology Inc. DS39635C-page 217
PIC18F6310/6410/8310/8410
18.0 ENHANCED UNIVERSAL
SYNCHRONOUS
ASYNCHRONOUS RECEIVER
TRANSMITTER (EUSART)
PIC18F6310/6410/8310/8410 devices have three
serial I/O modules: the MSSP module, discussed in the
previous chapter and two Universal Synchronous
Asynchronous Receiver Transmitter (USART) mod-
ules. (Generically, the USART is also known as a Serial
Communications Interface or SCI.) The USART 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.
There are two distinct implementations of the USART
module in these devices: the Enhanced USART
(EUSART), discussed here and the Addressable
USART (AUSART), discussed in the next chapter. For
this device family, USART1 always refers to the
EUSART, while USART2 is always the AUSART.
The EUSART and AUSART modules implement the
same core features for serial communications; their
basic operation is essentially the same. The EUSART
module provides additional features, including auto-
matic 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
PORTC. In order to configure TX1/CK1 and RX1/DT1
as a USART:
SPEN bit (RCSTA1<7>) must be set (= 1)
TRISC<7> bit must be set (= 1)
TRISC<6> bit must be set (= 1)
The operation of the Enhanced USART module is
controlled through three registers:
Transmit Status and Control Register 1 (TXSTA1)
Receive Status and Control Register 1 (RCSTA1)
Baud Rate Control Register 1 (BAUDCON1)
The registers are described in Register 18-1,
Register 18-2 and Register 18-3.
Note: The USART control will automatically
reconfigure the pin from input to output as
needed.