723
SAM4CP [DATASHEET]
43051E–ATPL–08/14
Figure 35-9.
Character Transmission
35.5.3.3 Transmitter Control
When the transmitter is enabled, the bit TXRDY (Transmitter Ready) is set in UART_SR. The transmission starts when
the programmer writes in the UART_THR, and after the written character is transferred from UART_THR to the internal
shift register. The TXRDY bit remains high until a second character is written in UART_THR. As soon as the first
character is completed, the last character written in UART_THR is transferred into the internal shift register and TXRDY
rises again, showing that the holding register is empty.
When both the internal shift register and UART_THR are empty, i.e., all the characters written in UART_THR have been
processed, the TXEMPTY bit rises after the last stop bit has been completed.
Figure 35-10. Transmitter Control
35.5.4 Optical Interface
To use the optical interface circuitry, the PLLA clock must be ready and programmed to generate a frequency within the
range of 4096 up to 8192 kHz. This range allows a modulation by a clock with an adjustable frequency from 30 up to 60
kHz.
The optical interface is enabled by writing a 1 to the bit OPT_EN in UART_MR (see
“UART Mode Register” on page
728
).
When OPT_EN=1, the URXD pad is automatically configured in analog mode and the analog comparator is enabled (see
Figure 35-11 on page 724
).
To match the characteristics of the off-chip optical receiver circuitry, the voltage reference threshold of the embedded
comparator can be adjusted from VDDIO/10 up to VDD/2 by programming the OPT_CMPTH field in UART_MR.
The NRZ output of the UART transmitter sub-module is modulated with the 30 up to 60 kHz modulation clock prior to
driving the PIO controller.
A logical 0 on the UART transmitter sub-module output generates the said modulated signal (see
Figure 35-12 on page
724
) having a frequency programmable from 30 kHz up to 60 kHz (38 kHz is the default value assuming the PLLA clock
D0
D1
D2
D3
D4
D5
D6
D7
UTXD
Start
Bit
Parity
Bit
Stop
Bit
Example: Parity enabled
Baud Rate
Clock
UART_THR
Shift Register
UTXD
TXRDY
TXEMPTY
Data 0
Data 1
Data 0
Data 0
Data 1
Data 1
S
S
P
P
Write Data 0
in UART_THR
Write Data 1
in UART_THR
stop
stop