参数资料
型号: PIC16F676-E/SL
元件分类: 微控制器/微处理器
英文描述: 8-BIT, FLASH, 20 MHz, RISC MICROCONTROLLER, PDSO14
封装: 3.90 MM, LEAD FREE, PLASTIC, SOIC-14
文件页数: 60/132页
文件大小: 1344K
代理商: PIC16F676-E/SL
2010 Microchip Technology Inc.
DS40039F-page 33
PIC16F630/676
4.4
Prescaler
An 8-bit counter is available as a prescaler for the
Timer0 module, or as a postscaler for the Watchdog
Timer. For simplicity, this counter will be referred to as
“prescaler” throughout this Data Sheet. The prescaler
assignment is controlled in software by the control bit
PSA (OPTION_REG<3>). Clearing the PSA bit will
assign the prescaler to Timer0. Prescale values are
selectable via the PS2:PS0 bits (OPTION_REG<2:0>).
The prescaler is not readable or writable. When
assigned to the Timer0 module, all instructions writing
to the TMR0 register (e.g., CLRF 1,
MOVWF 1,
BSF 1,
x....etc.
) will clear the prescaler. When
assigned to WDT, a CLRWDT instruction will clear the
prescaler along with the Watchdog Timer.
4.4.1
SWITCHING PRESCALER
ASSIGNMENT
The prescaler assignment is fully under software
control (i.e., it can be changed “on the fly” during
program execution). To avoid an unintended device
Reset, the following instruction sequence (Example 4-
1) must be executed when changing the prescaler
assignment from Timer0 to WDT.
EXAMPLE 4-1:
CHANGING PRESCALER
(TIMER0
WDT)
To change prescaler from the WDT to the TMR0
module, use the sequence shown in Example 4-2. This
precaution must be taken even if the WDT is disabled.
EXAMPLE 4-2:
CHANGING PRESCALER
(WDT
TIMER0)
TABLE 4-1:
REGISTERS ASSOCIATED WITH TIMER0
BCF
STATUS,RP0
;Bank 0
CLRWDT
;Clear WDT
CLRF
TMR0
;Clear TMR0 and
; prescaler
BSF
STATUS,RP0
;Bank 1
MOVLW
b’00101111’ ;Required if desired
MOVWF
OPTION_REG
; PS2:PS0 is
CLRWDT
; 000 or 001
;
MOVLW
b’00101xxx’ ;Set postscaler to
MOVWF
OPTION_REG
; desired WDT rate
BCF
STATUS,RP0
;Bank 0
CLRWDT
;Clear WDT and
; postscaler
BSF
STATUS,RP0
;Bank 1
MOVLW
b’xxxx0xxx’ ;Select TMR0,
; prescale, and
; clock source
MOVWF
OPTION_REG
;
BCF
STATUS,RP0
;Bank 0
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on
POR, BOD
Value on
all other
Resets
01h
TMR0
Timer0 Module Register
xxxx xxxx uuuu uuuu
0Bh/8Bh
INTCON
GIE
PEIE
T0IE
INTE
RAIE
T0IF
INTF
RAIF
0000 0000 0000 000u
81h
OPTION_REG
RAPU INTEDG
T0CS
T0SE
PSA
PS2
PS1
PS0
1111 1111 1111 1111
85h
TRISA
TRISA5 TRISA4 TRISA3 TRISA2 TRISA1 TRISA0 --11 1111 --11 1111
Legend:
– = Unimplemented locations, read as ‘0’, u = unchanged, x = unknown.
Shaded cells are not used by the Timer0 module.
相关PDF资料
PDF描述
PIC16LC433E/P 8-BIT, OTPROM, 4 MHz, RISC MICROCONTROLLER, PDIP18
PIC16LC556-04/SS 8-BIT, OTPROM, 4 MHz, RISC MICROCONTROLLER, PDSO20
PIC16LC662T-04/L 8-BIT, OTPROM, 4 MHz, RISC MICROCONTROLLER, PQCC44
PIC16C662T-20I/P 8-BIT, OTPROM, 20 MHz, RISC MICROCONTROLLER, PDIP40
PIC16C662T-20I/L 8-BIT, OTPROM, 20 MHz, RISC MICROCONTROLLER, PQCC44
相关代理商/技术参数
参数描述
PIC16F676-I/ML 功能描述:8位微控制器 -MCU 1.75 KB 64 RAM 12I/O RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16F676-I/P 功能描述:8位微控制器 -MCU 1.75KB 64 RAM 12 I/O Ind Temp PDIP14 RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16F676-I/P 制造商:Microchip Technology Inc 功能描述:IC 8BIT FLASH MCU 16F676 DIP14
PIC16F676-I/SL 功能描述:8位微控制器 -MCU 1.75KB 64 RAM 12 I/O Ind Temp SOIC14 RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16F676-I/SL 制造商:Microchip Technology Inc 功能描述:8BIT FLASH MCU SMD 16F676 SOIC14