English
Language : 

PIC32MX440F256H-80I Datasheet, PDF (438/646 Pages) Microchip Technology – 64/100-Pin General Purpose and USB 32-Bit Flash Microcontrollers
PIC32MX3XX/4XX
19.5 Auto-Baud Support
The UART will begin an automatic baud rate measure-
ment sequence whenever a Start bit is received when
the Auto-Baud Rate Detect is enabled (ABAUD = 1).
This feature is active only while the auto-wake-up is
disabled (WAKE = 0). In addition, LPBACK must equal
‘0’ for the auto-baud operation. Following the Start bit,
the auto-baud expects to receive an ASCII ‘U’ (0x55)
in order to calculate the proper bit rate. On the 5th
UxRX pin rising edge, an accumulated BRG counter
value totaling the proper BRG period is transferred to
the UxBRG register. The ABAUD bit is automatically
cleared.
19.6 Break and Sync Transmit
Sequence
The following sequence is performed to send a mes-
sage frame header that is composed of a Break char-
acter, followed by an auto-baud Sync byte. This
sequence is typical of a LIN bus master:
1. Configure the UART for the desired mode.
2. Set UTXEN and UTXBRK to set up the Break
character.
3. Load the UxTXREG with a dummy character to
initiate transmission (value is ignored).
4. Write ‘0x55’ to UxTXREG to load the Sync
character into the transmit FIFO.
After the Break has been sent, the UTXBRK bit is reset
by hardware. The Sync character now transmits.
19.7 Receiving in 8-bit or 9-bit Data
Mode
1. Set up the UART (as described in Section 19.3).
2. Enable the UART.
3. A receive interrupt will be generated when one
or more data characters have been received as
per interrupt control bit, URXISEL<1:0>.
4. Read the OERR bit to determine if an overrun
error has occurred. The OERR bit must be reset
in software.
5. Read UxRXREG.
The act of reading the UxRXREG character will move
the next character to the top of the receive FIFO,
including a new set of PERR and FERR values.
19.8 Operation of UxCTS and UxRTS
Control Pins
UARTx Clear to Send (UxCTS) and Request to Send
(UxRTS) are the two hardware controlled pins that are
associated with the UART module. These two pins
allow the UART to operate in Simplex and Flow Control
mode. They are implemented to control the transmis-
sion and reception between the Data Terminal
Equipment (DTE). The UEN<1:0> bits in the UxMODE
register configure these pins.
19.9 Infrared Support
The UART module provides two types of infrared UART
support:
• IrDA clock output to support external IrDA
encoder and decoder device (legacy module
support)
• Full implementation of the IrDA encoder and
decoder
19.10 External IrDA Support – IrDA
Clock Output
To support external IrDA encoder and decoder devices,
the BCLKx pin (same as the UxRTS pin) can be
configured to generate the 16x baud clock. With
UEN<1:0> = 11, the BCLKx pin will output the 16x
baud clock (if the UART module is enabled). It can be
used to support the IrDA codec chip.
19.11 Built-In IrDA Encoder and Decoder
The UART has full implementation of the IrDA encoder
and decoder as part of the UART module. The built-in
IrDA encoder and decoder functionality is enabled
using the IREN bit (UxMODE<12>). When enabled
(IREN = 1), the receive pin (UxRX) acts as the input
from the infrared receiver. The transmit pin (UxTX) acts
as the output to the infrared transmitter.
DS61143E-page 436
Preliminary
© 2008 Microchip Technology Inc.