PIC12F609-I/PQTP MICROCHIP [Microchip Technology], PIC12F609-I/PQTP Datasheet - Page 44
PIC12F609-I/PQTP
Manufacturer Part Number
PIC12F609-I/PQTP
Description
8-Pin Flash-Based, 8-Bit CMOS Microcontrollers
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
1.PIC12F609-IPQTP.pdf
(168 pages)
- Current page: 44 of 168
- Download datasheet (3Mb)
PIC12F609/615/12HV609/615
5.1.3
A single software programmable prescaler is available
for use with either Timer0 or the Watchdog Timer
(WDT), but not both simultaneously. The prescaler
assignment is controlled by the PSA bit of the OPTION
register. To assign the prescaler to Timer0, the PSA bit
must be cleared to a ‘0’.
There are 8 prescaler options for the Timer0 module
ranging from 1:2 to 1:256. The prescale values are
selectable via the PS<2:0> bits of the OPTION register.
In order to have a 1:1 prescaler value for the Timer0
module, the prescaler must be assigned to the WDT
module.
The prescaler is not readable or writable. When
assigned to the Timer0 module, all instructions writing to
the TMR0 register will clear the prescaler.
When the prescaler is assigned to WDT, a CLRWDT
instruction will clear the prescaler along with the WDT.
5.1.3.1
As a result of having the prescaler assigned to either
Timer0 or the WDT, it is possible to generate an
unintended device Reset when switching prescaler
values. When changing the prescaler assignment from
Timer0 to the WDT module, the instruction sequence
shown in Example 5-1, must be executed.
EXAMPLE 5-1:
DS41302A-page 42
BANKSEL
CLRWDT
CLRF
BANKSEL
BSF
CLRWDT
MOVLW
ANDWF
IORLW
MOVWF
SOFTWARE PROGRAMMABLE
PRESCALER
TMR0
TMR0
OPTION_REG
OPTION_REG,PSA
b’11111000’
OPTION_REG,W
b’00000101’
OPTION_REG
Switching Prescaler Between
Timer0 and WDT Modules
CHANGING PRESCALER
(TIMER0
;
;Clear WDT
;Clear TMR0 and
;prescaler
;
;Select WDT
;
;
;Mask prescaler
;bits
;Set WDT prescaler
;to 1:32
WDT)
Preliminary
When changing the prescaler assignment from the
WDT to the Timer0 module, the following instruction
sequence must be executed (see Example 5-2).
EXAMPLE 5-2:
5.1.4
Timer0 will generate an interrupt when the TMR0
register overflows from FFh to 00h. The T0IF interrupt
flag bit of the INTCON register is set every time the
TMR0 register overflows, regardless of whether or not
the Timer0 interrupt is enabled. The T0IF bit must be
cleared in software. The Timer0 interrupt enable is the
T0IE bit of the INTCON register.
5.1.5
When Timer0 is in Counter mode, the synchronization
of the T0CKI input and the Timer0 register is accom-
plished by sampling the prescaler output on the Q2 and
Q4 cycles of the internal phase clocks. Therefore, the
high and low periods of the external clock source must
meet the timing requirements as shown in the
Section 15.0 “Electrical Specifications”.
CLRWDT
BANKSEL OPTION_REG
MOVLW
ANDWF
IORLW
MOVWF
Note:
b’11110000’
OPTION_REG,W ;prescaler bits
b’00000011’
OPTION_REG
TIMER0 INTERRUPT
The Timer0 interrupt cannot wake the
processor from Sleep since the timer is
frozen during Sleep.
USING TIMER0 WITH AN
EXTERNAL CLOCK
CHANGING PRESCALER
(WDT
© 2006 Microchip Technology Inc.
;Clear WDT and
;prescaler
;
;Mask TMR0 select and
;Set prescale to 1:16
;
TIMER0)
Related parts for PIC12F609-I/PQTP
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
IC PIC MCU FLASH 1KX14 8SOIC
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
1.75KB Flash, 64B RAM, 6 I/O, 8MHz Internal Oscillator 8 DFN 4x4mm TUBE
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
8-Pin, Flash-Based 8-Bit CMOS Microcontrollers
Manufacturer:
MICROCHIP [Microchip Technology]
Datasheet:
Part Number:
Description:
IC PIC MCU FLASH 1KX14 8MSOP
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
IC PIC MCU FLASH 1KX14 8DIP
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
IC PIC MCU FLASH 1KX14 8-DFN
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
1.75KB Flash, 64B RAM, 6 I/O, 8MHz Internal Oscillator 8 PDIP .300in TUBE
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
1.75KB Flash, 64B RAM, 6 I/O, 8MHz Internal Oscillator 8 SOIC 3.90mm (.150") TUB
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
1.75KB Flash, 64B RAM, 6 I/O, 8MHz Internal Oscillator 8 DFN 3x3mm TUBE
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
1.75KB Flash, 64B RAM, 6 I/O, 8MHz Internal Oscillator 8 MSOP 3x3mm TUBE
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
1.75KB Flash, 64B RAM, 6 I/O, 8MHz Internal Oscillator 8 DFN 4x4mm TUBE
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
28/40/44-Pin Enhanced Flash Microcontrollers with ECAN Technology, 10-Bit A/D and nanoWatt Technology
Manufacturer:
MICROCHIP [Microchip Technology]
Datasheet:
Part Number:
Description:
28/40/44-Pin Enhanced Flash Microcontrollers with ECAN Technology, 10-Bit A/D and nanoWatt Technology
Manufacturer:
MICROCHIP [Microchip Technology]
Datasheet: