
December 22, 2003
Document No. 38-12009 Rev. *D
197
CY8C22xxx Preliminary Data Sheet
17. Digital Blocks
17.1.12
Asynchronous Transmitter
Function
In the Transmitter function, DR0 functions as a shift register,
with no input and with the TXD serial data stream output to
the primary output F1. DR1 is a TX buffer register and DR2
is unused in this configuration.
Unlike SPI, which has no output latency, the TXD output has
one cycle of latency. This is because a multiplexer at the
output must select which bits to shift out: the shift register
data, framing bits, parity, or mark bits. The output of this mul-
tiplexer is registered to unglitch it. When the block is first
enabled or when it is idle, a mark bit (logic '1') is output.
The clock generator is a free running divide by eight circuit.
Although dividing the clock is not necessary for the Trans-
mitter function, the Receiver function does require a divide
by eight for input sampling. It is also done in the Transmitter
function, to allow the TX and RX functions to run off the
same baud rate generator.
There are two formats supported: A 10-bit frame size includ-
ing one start bit, eight data bits, and one stop bit or an 11-bit
frame size including one start bit, eight data bits, one parity
bit, and one stop bit.
The parity generator can be configured to output either even
or odd parity on the eight data bits.
A write to the TX Buffer register (DR1) initiates a transmis-
sion and an additional byte can be buffered in this register,
while transmission is in progress.
An additional feature of the Transmitter function is that a
clock, generated with setup and hold time for the data bits
only, is output to the auxiliary output. This allows connection
to a CRC generator or other digital blocks.
The Transmitter function may not be chained.
17.1.12.1
Block Interrupt
The Transmit block has a selection of two interrupt sources.
Interrupt on TX Reg Empty (default) or interrupt on TX Com-
plete. Mode bit 1 in the Function register controls the selec-
tion.
If TX Complete is selected as the block interrupt, the Control
register must still be read in the interrupt routine so that this
status bit is cleared; otherwise, no subsequent interrupts are
generated.
17.1.13
Asynchronous Receiver Function
In the Receiver function, DR0 functions as the serial data
shift register with RXD input from the DATA input selection.
DR2 is an RX buffer register and DR1 is unused in this con-
figuration.
The clock generator and START detection are integrated.
The clock generator is a divide by eight which, when the
system is idle, is held in reset. When a START bit (logic '0')
is detected on the RXD input, the reset is negated and a bit
rate clock is generated, subsequently sampling the RXD
input at the center of the bit time. Every succeeding START
bit resynchronizes the clock generator to the incoming bit
rate.
There are two formats supported: A 10-bit frame size includ-
ing one start bit, eight data bits, and one stop bit. or an 11-bit
frame size including one start bit, eight data bits, one parity
bit, and one stop bit.
The received data is an input to the parity generator. It is to
be compared with a received parity bit, if this feature is
enabled. The parity generator can be configured to output
either even or odd parity on the eight data bits.
After eight bits of data are received, the byte is transferred
from the DR0 shifter to the DR2 RX Buffer register.
An additional feature of the Receiver function is that input
data (RXD) and the synchronized clock are passed to the
primary output and auxiliary output, respectively. This allows
connection to a CRC generator or other digital block.
17.1.13.1
Block Interrupt
The Receiver has one fixed interrupt source, which is the
RX Reg Full status.
The RX Buffer register must always be read in the RX inter-
rupt routine, regardless of error status, etc., so that RX Reg
Full status bit is cleared; otherwise, no subsequent inter-
rupts are generated.