| 数据搜索系统,热门电子元器件搜索 |
|
ST7262 数据表(PDF) 53 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST7262 数据表(HTML) 53 Page - STMicroelectronics |
|
53 / 139 page ![]() ST7262 53/139 10.3 TIMEBASE UNIT (TBU) 10.3.1 Introduction The Timebase unit (TBU) can be used to generate periodic interrupts. 10.3.2 Main Features ■ 8-bit upcounter ■ Programmable prescaler ■ Period between interrupts: max. 8.1ms (at 8 MHz fCPU ) ■ Maskable interrupt ■ Cascadable with PWM/ART TImer 10.3.3 Functional Description The TBU operates as a free-running upcounter. When the TCEN bit in the TBUCSR register is set by software, counting starts at the current value of the TBUCV register. The TBUCV register is incre- mented at the clock rate output from the prescaler selected by programming the PR[2:0] bits in the TBUCSR register. When the counter rolls over from FFh to 00h, the OVF bit is set and an interrupt request is generat- ed if ITE is set. The user can write a value at any time in the TBUCV register. If the cascading option is selected (CAS bit=1 in the TBUCSR register), the TBU and the the ART TImer counters act together as a 16-bit counter. In this case, the TBUCV register is the high order byte, the ART counter (ARTCAR register) is the low order byte. Counting is clocked by the ART timer clock (Refer to the description of the ART Timer ARTCSR register). 10.3.4 Programming Example In this example, timer is required to generate an in- terrupt after a delay of 1 ms. Assuming that fCPU is 8 MHz and a prescaler divi- sion factor of 256 will be programmed using the PR[2:0] bits in the TBUCSR register, 1 ms = 32 TBU timer ticks. In this case, the initial value to be loaded in the TBUCV must be (256-32) = 224 (E0h). ld A, E0h ld TBUCV, A ; Initialize counter value ld A 1Fh ; ld TBUCSR, A ; Prescaler factor = 256, ; interrupt enable, ; TBU enable Figure 38. TBU Block Diagram TBU 8-BIT UPCOUNTER (TBUCV REGISTER) INTERRUPT REQUEST TBU PRESCALER fCPU TBUCSR REGISTER PR1 PR0 PR2 TCEN ITE OVF MSB LSB ART PWM TIMER 8-BIT COUNTER MSB LSB CAS 0 1 TBU ART TIMER CARRY BIT 0 |
|
链接网址 |
| 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 |