
EZ-USB FX2 Technical Reference Manual
Page 14-22 EZ-USB FX2 Technical Reference Manual v2.1
To derive the required RCAP2H and RCAP2L values from a known baud rate, use the equation:
When either RCLK or TCLK is set, the TF2 flag is not set on a Timer 2 rollover and the T2EX
reload trigger is disabled.
Table 14-16 lists sample RCAP2H:L reload values for a variety of common serial baud rates.
14.3.4.2 Mode 1 Transmit
Figure 14-11 illustrates the mode 1 transmit timing. In mode 1, the USART begins transmitting
after the first rollover of the divide-by-16 counter after the software writes to the SBUF0 (or
SBUF1) register. The USART transmits data on the TXD0 (or TXD1) pin in the following order:
start bit, 8 data bits (LSB first), stop bit. The TI_0 (or TI_1) bit is set 2 CLKOUT
cycles after the
stop bit is transmitted.
14.3.5 Mode 1 Receive
Figure 14-12 illustrates the mode 1 receive timing. Reception begins at the falling edge of a start
bit received on the RXD0 (or RXD1) pin, when enabled by the REN_0 (or REN_1) Bit. For this pur-
pose, the RXD0 (or RXD1) pin is sampled 16 times per bit for any baud rate. When a falling edge
Table 14-16. Timer 2 Reload Values for Common Serial Port Mode 1 Baud Rates
Nominal Rate
CLKOUT = 12 MHz CLKOUT = 24 MHz CLKOUT = 48 MHz
RCAP2H:L
Reload
Value
Actual
Rate
Error
RCAP2H:L
Reload
Value
Actual
Rate
Error
RCAP2H:L
Reload
Value
Actual
Rate
Error
57600 FFF9 53571 -6.99% FFF3 57692 +0.16% FFE6 57692 +0.16%
38400 FFF6 37500 -2.34% FFEC 37500 -2.34% FFD9 38461 +0.16%
28800 FFF3 28846 +0.16% FFE6 28846 +0.16% FFCC 28846 +0.16%
19200 FFEC 18750 -2.34% FFD9 19230 +0.16% FFB2 19230 +0.16%
9600 FFD9 9615 +0.16% FFB2 9615 +0.16% FF64 9615 +0.16%
4800 FFB2 4807 +0.16% FF64 4807 +0.16% FEC8 4807 +0.16%
2400 FF64 2403 +0.16% FEC8 2403 +0.16% FD90 2403 +0.16%
Note: using rates that are off by 2.3% or more will not work in all systems.
RCAP2H:L =
CLKOUT
32 × Baud Rate
65536 -
Comentarios a estos manuales