Datasheet

Chapter 14. UART Modules 14-37
Operation
detection, if 8-bit characters are not required, is to use software to calculate parity and
append it to the 5-, 6-, or 7-bit character.
14.5.5 Bus Operation
This section describes bus operation during read, write, and interrupt acknowledge cycles
to the UART module.
14.5.5.1 Read Cycles
The UART module responds to reads with byte data. Reserved registers return zeros.
14.5.5.2 Write Cycles
The UART module accepts write data as bytes. Write cycles to read-only or reserved
registers complete normally without exception processing, but data is ignored.
NOTE:
The UART module is accessed by the CPU with zero wait
states, as CLKIN is used for the UART module.
14.5.5.3 Interrupt Acknowledge Cycles
The UART module supplies the interrupt vector in response to a UART IACK cycle. If
UIVRn is not initialized to provide a vector number, a spurious exception is taken if an
interrupt is generated. This works in conjunction with the interrupt controller, which allows
a programmable priority level.
14.5.6 Programming
The software owchart, Figure 14-39, consists of the following:
UART module initialization—These routines consist of SINIT and CHCHK (sheets
1 and 2). Before SINIT is called at system initialization, the calling routine allocates
2 words on the system stack. On return to the calling routine, SINIT passes UART
status data on the stack. If SINIT nds no errors, the transmitter and receiver are
enabled. SINIT calls CHCHK to perform the checks. When called, SINIT places the
UART in local loop-back mode and checks for the following errors:
Transmitter never ready
Receiver never ready
Parity error
Incorrect character received
I/O driver routine—This routine (sheets 4 and 5) consists of INCH, the terminal
input character routine which gets a character from the receiver, and OUTCH, which
sends a character to the transmitter.