參數(shù)資料
型號(hào): PIC12F510
廠商: Microchip Technology Inc.
英文描述: 8/14-Pin, 8-Bit Flash Microcontroller
中文描述: 8/14-Pin,8位閃存微控制器
文件頁數(shù): 44/114頁
文件大?。?/td> 908K
代理商: PIC12F510
PIC12F510/16F506
DS41268B-page 42
Preliminary
2006 Microchip Technology Inc.
6.2.1
SWITCHING PRESCALER
ASSIGNMENT
The prescaler assignment is fully under software
control (i.e., it can be changed “on-the-fly” during pro-
gram execution). To avoid an unintended device Reset,
the following instruction sequence (Example 6-1) must
be executed when changing the prescaler assignment
from Timer0 to the WDT.
EXAMPLE 6-1:
CHANGING PRESCALER
(TIMER0
WDT)
;Clear WDT
;Clear TMR0 & Prescaler
;These 3 lines (5, 6, 7)
;are required only if
;desired
;PS<2:0> are 000 or 001
;Set Postscaler to
;desired WDT rate
To change prescaler from the WDT to the Timer0
module, use the sequence shown in Example 6-2. This
sequence must be used even if the WDT is disabled. A
CLRWDT
instruction should be executed before
switching the prescaler.
EXAMPLE 6-2:
CHANGING PRESCALER
(WDT
TIMER0)
FIGURE 6-5:
BLOCK DIAGRAM OF THE TIMER0/WDT PRESCALER
CLRWDT
CLRF
MOVLW
OPTION
TMR0
‘00xx1111’b
CLRWDT
MOVLW
OPTION
‘00xx1xxx’b
CLRWDT
;Clear WDT and
;prescaler
;Select TMR0, new
;prescale value and
;clock source
MOVLW
‘xxxx0xxx’
OPTION
T
CY
(= F
OSC
/4)
Sync
2
Cycles
TMR0 Reg
8-bit Prescaler
8-to-1 MUX
M
U
X
MUX
Watchdog
Timer
PSA
(1)
0
1
0
1
WDT
Time-Out
PS<2:0>
(1)
8
PSA
(1)
WDT Enable bit
0
1
0
1
Data Bus
8
PSA
(1)
T0CS
(1)
M
U
X
M
U
X
T0SE
(1)
T0CKI
(2)
Pin
Note 1:
T0CS, T0SE, PSA, PS<2:0> are bits in the OPTION register.
T0CKI is shared with pin GP2 on the PIC12F510 and shared with RC5 on the PIC16F506.
Bit C1T0CS is located in the CM1CON0 register.
2:
3:
1
0
Comparator
Output
C1T0CS
(3)
相關(guān)PDF資料
PDF描述
PIC12F519 8-Pin, 8-Bit Flash Microcontroller
PIC12F609 8-bit PIC㈢ Microcontrollers with High Voltage Support and Fan Control Capabilities
PIC12F615 8-bit PIC㈢ Microcontrollers with High Voltage Support and Fan Control Capabilities
PIC12HV609 8-bit PIC㈢ Microcontrollers with High Voltage Support and Fan Control Capabilities
PIC12HV615 8-Pin Flash-Based, 8-Bit CMOS Microcontrollers
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
PIC12F510_07 制造商:MICROCHIP 制造商全稱:Microchip Technology 功能描述:8/14-Pin, 8-Bit Flash Microcontroller
PIC12F510_13 制造商:MICROCHIP 制造商全稱:Microchip Technology 功能描述:8/14-Pin, 8-Bit Flash Microcontrollers
PIC12F510-E/L 制造商:MICROCHIP 制造商全稱:Microchip Technology 功能描述:8/14-Pin, 8-Bit Flash Microcontroller
PIC12F510-E/LQTP 制造商:MICROCHIP 制造商全稱:Microchip Technology 功能描述:8/14-Pin, 8-Bit Flash Microcontroller
PIC12F510-E/LSQTP 制造商:MICROCHIP 制造商全稱:Microchip Technology 功能描述:8/14-Pin, 8-Bit Flash Microcontroller