Rainbow Electronics AT91CAP9S250A User Manual

Page 535

Advertising
background image

535

6264A–CAP–21-May-07

AT91CAP9S500A/AT91CAP9S250A

Figure 35-6. Character Transmit

The characters are sent by writing in the Transmit Holding Register (US_THR). The transmitter
reports two status bits in the Channel Status Register (US_CSR): TXRDY (Transmitter Ready),
which indicates that US_THR is empty and TXEMPTY, which indicates that all the characters
written in US_THR have been processed. When the current character processing is completed,
the last character written in US_THR is transferred into the Shift Register of the transmitter and
US_THR becomes empty, thus TXRDY raises.

Both TXRDY and TXEMPTY bits are low since the transmitter is disabled. Writing a character in
US_THR while TXRDY is active has no effect and the written character is lost.

Figure 35-7. Transmitter Status

35.6.3.2

Manchester Encoder

When the Manchester encoder is in use, characters transmitted through the USART are

encoded based on biphase Manchester II format. To enable this mode, set the MAN field in the
US_MR register to 1. Depending on polarity configuration, a logic level (zero or one), is transmit-
ted as a coded signal one-to-zero or zero-to-one. Thus, a transition always occurs at the

midpoint of each bit time. It consumes more bandwidth than the original NRZ signal (2x) but the
receiver has more error control since the expected input must show a change at the center of a
bit cell. An example of Manchester encoded sequence is: the byte 0xB1 or 10110001 encodes
to 10 01 10 10 01 01 01 10, assuming the default polarity of the encoder.

Figure 35-8

illustrates

this coding scheme.

D0

D1

D2

D3

D4

D5

D6

D7

TXD

Start

Bit

Parity

Bit

Stop

Bit

Example: 8-bit, Parity Enabled One Stop

Baud Rate

Clock

D0

D1

D2

D3

D4

D5

D6

D7

TXD

Start

Bit

Parity

Bit

Stop

Bit

Baud Rate

Clock

Start

Bit

Write

US_THR

D0

D1

D2

D3

D4

D5

D6

D7

Parity

Bit

Stop

Bit

TXRDY

TXEMPTY

Advertising