| 数据搜索系统,热门电子元器件搜索 |
|
STC89LE52RC 数据表(PDF) 106 Page - STCmicro Technology Co,.Ltd |
|
|
|||||||||||||||||||||||||||||
STC89LE52RC 数据表(HTML) 106 Page - STCmicro Technology Co,.Ltd |
|
106 / 165 page ![]() If Timer 2 in Programmabel Clock Out mode, some operations as shown below should be done: Set T2OE bit in T2MOD register. Clear C/T2 bit in T2CON register. Determine the 16-bit reload value from the formula and enter it in the RCAP2H and RCAP2L registers. Enter the same reload value as the initial value in the TH2 and TL2 registers. Set TR2 bit in T2CON register to start the Timer 2. • • • • • Timer 2 Interrupt T2EX Pin (P1.1) EXF2 Transition Detector control EXEN2 SYSclk control T2 Pin (P1.0) MCU in 12T mode MCU in 6T mode TL2 (8 Bits) RCAP2L ÷12 ÷6 TR2 TH2 (8 Bits) RCAP2H C/T2 ÷2 T2OE Timer 2 in Programmable Clock Output Mode Programmable Clock Output Mode The STC89xx seires is able to generate a programmable clock output on P1.0. When T2OE bit is set and C//T2 bit is cleared, Timer 2 overflow pulse will generate a 50% duty clock and output that to P1.0. The frequency of clock-out is calculated according to the following formula. Baud Rate= SYSclk n×[65536 - (RCAP2H, RCAP2L) when MCU in 12T mode, n=4; when MCU in 6T mode, n=2. Note Timer 2 overflag, TF2 will always not be set in this mode. The input clock, SYSclk/2, increments the 16-bit timer (TH2, TL2). The timer repeatedly counts to overflow from a loaded value. Once overflows occur, the contents of (RCAP2H, RCAP2L) are loaded into (TH2, TL2) for the consecutive counting. In the clock-out mode, Timer2 rollovers will not generate an interrupt. This is similar to when Timer 2 is used as a baud-rate generator. It is possible to use Timer 2 as a baud rate generator and a clock generator simultaneously. Note, however, that the baud-rate and the clock-out frequency depend on the same overflow rate of Timer 2.The following figure shows the Timer 2 in programmable clock output mode. 106 |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |