English
Language : 

EZ-USB Datasheet, PDF (315/334 Pages) Cypress Semiconductor – The EZ-USB USB Integrated Circuit
C.3.3 Mode 1
Mode 1 provides standard asynchronous, full-duplex communication, using a total of 10 bits:
1 start bit, 8 data bits, and 1 stop bit. For receive operations, the stop bit is stored in RB8_0 (or
RB8_1). Data bits are received and transmitted LSB first.
C.3.3.1 Mode 1 Baud Rate
The mode 1 baud rate is a function of timer overflow. Serial Port 0 can use either Timer 1 or
Timer 2 to generate baud rates. Serial Port 1 can only use Timer 1. The two serial ports can
run at the same baud rate if they both use Timer 1, or different baud rates if Serial Port 0 uses
Timer 2 and Serial Port 1 uses Timer 1.
Each time the timer increments from its maximum count (FFh for Timer 1 or FFFFh for Timer
2), a clock is sent to the baud rate circuit. The clock is then divided by 16 to generate the baud
rate.
When using Timer 1, the SMOD0 (or SMOD1) bit selects whether or not to divide the Timer
1 rollover rate by 2. Therefore, when using Timer 1, the baud rate is determined by the
equation:
Baud Rate =
SMODx
2
x Timer 1 Overflow
32
SMOD0 is SFR bit PCON.7; SMOD1 is SFR bit EICON.7.
When using Timer 2, the baud rate is determined by the equation:
Baud Rate =
Timer 2 Overflow
16
To use Timer 1 as the baud rate generator, it is best to use Timer 1 mode 2 (8-bit counter with
auto-reload), although any counter mode can be used. The Timer 1 reload is stored in the TH1
register, which makes the complete formula for Timer 1:
Baud Rate =
SMODx
2
x
32
CLK24
12 x (256 - TH1)
EZ-USB TRM v1.9
Appendix C: 8051 Hardware Description
C - 19