Cypress EZ-USB Series 2100 Service Manual Page 315

  • Download
  • Add to my manuals
  • Print
  • Page
    / 334
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 314
EZ-USB TRM v1.9 Appendix C: 8051 Hardware Description C - 19
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:
SMOD0 is SFR bit PCON.7; SMOD1 is SFR bit EICON.7.
When using Timer 2, the baud rate is determined by the equation:
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:
x Timer 1 OverflowBaud Rate =
32
2
SMODx
Timer 2 Overflow
Baud Rate =
16
xBaud Rate =
32
2
SMODx
12 x (256 - TH1)
CLK24
Page view 314
1 2 ... 310 311 312 313 314 315 316 317 318 319 320 ... 333 334

Comments to this Manuals

No comments