參數(shù)資料
型號: PIC16F785
廠商: Microchip Technology Inc.
英文描述: 20-Pin Flash-Based 8-Bit CMOS Microcontroller with Two-Phase Asychronous Feedback PWM, Dual High-Speed Comparators and Dual Operational Amplifiers
中文描述: 20引腳基于閃存的8兩相異步反饋的PWM,雙高位CMOS微控制器的高速比較器和雙運算放大器
文件頁數(shù): 50/178頁
文件大?。?/td> 1620K
代理商: PIC16F785
PIC16F785
DS41249A-page 48
Preliminary
2004 Microchip Technology Inc.
5.3
Using Timer0 with an External
Clock
When no prescaler is used, the external clock input is
the same as the prescaler output. The synchronization
of T0CKI, with the internal phase clocks, is accom-
plished by sampling the prescaler output on the Q2 and
Q4 cycles of the internal phase clocks. Therefore, it is
necessary for T0CKI to be high for at least 2T
OSC
(and
a small RC delay of 20 ns) and low for at least 2T
OSC
(and a small RC delay of 20 ns). Refer to the electrical
specification of the desired device.
5.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 PS<2:0> 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.
5.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 5-2 and Example 5-3) must be executed
when changing the prescaler assignment between
Timer0 and WDT.
EXAMPLE 5-2:
CHANGING PRESCALER
(TIMER0
WDT)
To change prescaler from the WDT to the TMR0
module, use the sequence shown in Example 5-3. This
precaution must be taken even if the WDT is disabled.
EXAMPLE 5-3:
CHANGING PRESCALER
(WDT
TIMER0)
TABLE 5-1:
REGISTERS ASSOCIATED WITH TIMER0
BCF
BCF
CLRWDT
CLRF
STATUS,RP0
STATUS,RP1
;Bank 0
;
;Clear WDT
;Clear TMR0 and
; prescaler
;Bank 1
TMR0
BSF
STATUS,RP0
MOVLW
MOVWF
CLRWDT
b’00101111’
OPTION_REG
;Required if desired
; PS2:PS0 is
; 000 or 001
;
;Set postscaler to
; desired WDT rate
;Bank 0
MOVLW
MOVWF
BCF
b’00101xxx’
OPTION_REG
STATUS,RP0
CLRWDT
;Clear WDT and
; prescaler
;Bank 1
;
BSF
BCF
STATUS,RP0
STATUS,RP1
MOVLW
b’xxxx0xxx’
;Select TMR0,
; prescale, and
; clock source
;
;Bank 0
MOVWF
BCF
OPTION_REG
STATUS,RP0
Addr
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on:
POR, BOR
Value on
all other
Resets
01h,
101h
TMR0
Timer0 Module register
xxxx xxxx
uuuu uuuu
0Bh,
8Bh
INTCON
GIE
PEIE
T0IE
INTE
RAIE
T0IF
INTF
RAIF
0000 0000
0000 0000
81h,
181h
OPTION_REG
RAPU
INTEDG
T0CS
T0SE
PSA
PS2
PS1
PS0
1111 1111
1111 1111
91h
ANSEL0
ANS7
ANS6
ANS5
ANS4
ANS3
ANS2
ANS1
ANS0
1111 1111
1111 1111
85h,
185h
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.
相關(guān)PDF資料
PDF描述
PIC16F818 18/20-Pin Enhanced FLASH Microcontrollers with nanoWatt Technology(18/20引腳,納瓦技術(shù)增強FLASH微控制器)
PIC16F819 18/20-Pin Enhanced FLASH Microcontrollers with nanoWatt Technology(18/20引腳,納瓦技術(shù)增強FLASH微控制器)
PIC16F83 8-Bit CMOS Flash/EEPROM Microcontollrs(每個I/O口有20mA吸收,25mA驅(qū)動,64字節(jié)數(shù)據(jù)EEPROM,2.0V的微控制器)
PIC16F84 18-pin Flash/EEPROM 8-Bit Microcontrollers
PIC16F85 18/20 Pin, 8-Bit CMOS FLASH Microcontroller with Comparators and A/D Product Brief
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
PIC16F785-E/ML 功能描述:8位微控制器 -MCU 3.5 KB 128 RAM 18I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時鐘頻率:50 MHz 程序存儲器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
PIC16F785-E/P 功能描述:8位微控制器 -MCU 14KB 368 RAM 33 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時鐘頻率:50 MHz 程序存儲器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
PIC16F785-E/SO 功能描述:8位微控制器 -MCU 3.5KB FL 128R 18 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時鐘頻率:50 MHz 程序存儲器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
PIC16F785-E/SS 功能描述:8位微控制器 -MCU 3.5KB FL 128R 18 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時鐘頻率:50 MHz 程序存儲器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
PIC16F785-I/ML 功能描述:8位微控制器 -MCU 3.5 KB 128 RAM 18I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時鐘頻率:50 MHz 程序存儲器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT