| 数据搜索系统,热门电子元器件搜索 |
|
PIC12F675T-E/P 数据表(PDF) 29 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC12F675T-E/P 数据表(HTML) 29 Page - Microchip Technology |
|
29 / 136 page ![]() 2010 Microchip Technology Inc. DS41190G-page 29 PIC12F629/675 4.0 TIMER0 MODULE The Timer0 module timer/counter has the following features: • 8-bit timer/counter • Readable and writable • 8-bit software programmable prescaler • Internal or external clock select • Interrupt on overflow from FFh to 00h • Edge select for external clock Figure 4-1 is a block diagram of the Timer0 module and the prescaler shared with the WDT. 4.1 Timer0 Operation Timer mode is selected by clearing the T0CS bit (OPTION_REG<5>). In Timer mode, the Timer0 module will increment every instruction cycle (without prescaler). If TMR0 is written, the increment is inhibited for the following two instruction cycles. The user can work around this by writing an adjusted value to the TMR0 register. Counter mode is selected by setting the T0CS bit (OPTION_REG<5>). In this mode, the Timer0 module will increment either on every rising or falling edge of pin GP2/T0CKI. The incrementing edge is determined by the source edge (T0SE) control bit (OPTION_REG<4>). Clearing the T0SE bit selects the rising edge. 4.2 Timer0 Interrupt A Timer0 interrupt is generated when the TMR0 register timer/counter overflows from FFh to 00h. This overflow sets the T0IF bit. The interrupt can be masked by clearing the T0IE bit (INTCON<5>). The T0IF bit (INTCON<2>) must be cleared in software by the Timer0 module Interrupt Service Routine before re- enabling this interrupt. The Timer0 interrupt cannot wake the processor from Sleep since the timer is shut- off during Sleep. FIGURE 4-1: BLOCK DIAGRAM OF THE TIMER0/WDT PRESCALER Note: Additional information on the Timer0 module is available in the PIC® Mid-Range Reference Manual, (DS33023). Note: Counter mode has specific external clock requirements. Additional information on these requirements is available in the PIC® Mid-Range Reference Manual, (DS33023). T0CKI T0SE pin CLKOUT TMR0 Watchdog Timer WDT Time-out PS0 - PS2 WDTE Data Bus Set Flag bit T0IF on Overflow T0CS Note 1: T0SE, T0CS, PSA, PS0-PS2 are bits in the OPTION register. 0 1 0 1 0 1 SYNC 2 Cycles 8 8 8-bit Prescaler 0 1 (= FOSC/4) PSA PSA PSA |
|
链接网址 |
| 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 |