參數(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ù): 61/178頁
文件大?。?/td> 1620K
代理商: PIC16F785
2004 Microchip Technology Inc.
Preliminary
DS41249A-page 59
PIC16F785
CCPR1L and DC1B<1:0> can be written to at any time,
but the duty cycle value is not latched into CCPR1H
until after a match between PR2 and TMR2 occurs
(i.e. the period is complete). In PWM mode, CCPR1H
is a read only register.
The CCPR1H register and a 2-bit internal latch are
used to double buffer the PWM duty cycle. This double
buffering is essential for glitchless PWM operation.
Because of the buffering, the module waits until the
timer resets, instead of starting immediately. This
means that enhanced PWM waveforms do not exactly
match the standard PWM waveforms, but are instead
offset by one full instruction cycle (4 T
OSC
).
When the CCPR1H and 2-bit latch match TMR2,
concatenated with an internal 2-bit Q clock or 2 bits of
the TMR2 prescaler, the RC5/CCP1 pin is cleared.
The maximum PWM resolution is a function of PR2 as
shown by Equation 8-3.
EQUATION 8-3:
TABLE 8-3:
EXAMPLE PWM FREQUENCIES AND RESOLUTIONS (F
OSC
= 20 MHz)
8.3.3
OPERATION IN SLEEP MODE
In Sleep mode, all clock sources are disabled. Timer2
will not increment, and the state of the module will not
change. If the RC5/CCP1 pin is driving a value, it will
continue to drive that value. When the device wakes
up, it will continue from this state.
8.3.3.1
OPERATION WITH FAIL-SAFE
CLOCK MONITOR
If the Fail-Safe Clock Monitor is enabled, a clock failure
will force the CCP to be clocked from the internal
oscillator clock source, which may have a different
clock frequency than the primary clock.
See
Section 3.0 “Clock Sources”
for additional
details.
8.3.4
EFFECTS OF A RESET
Any Reset will force all ports to Input mode and the
CCP registers to their Reset states.
8.3.5
SETUP FOR PWM OPERATION
The following steps should be taken when configuring
the CCP module for PWM operation:
1.
Configure the PWM pin (RC5/CCP1) as an input
by setting the TRISC<5> bit.
Set the PWM period by loading the PR2 register.
Configure the CCP module for the PWM mode
by loading the CCP1CON register with the
appropriate values.
Set the PWM duty cycle by loading the CCPR1L
register and CCP1CON<5:4> bits.
Configure and start TMR2:
Clear the TMR2 interrupt flag bit by clearing
the TMR2IF bit (PIR1<1>).
Set the TMR2 prescale value by loading the
T2CKPS bits (T2CON<1:0>).
Enable Timer2 by setting the TMR2ON bit
(T2CON<2>).
Enable PWM output after a new PWM cycle has
started:
Wait until TMR2 overflows (TMR2IF bit is set).
Enable the RC5/CCP1 pin output by clearing
the TRISC<5> bit.
2.
3.
4.
5.
6.
Note:
If the PWM duty cycle value is longer than
the PWM period, the assigned PWM pin(s)
will remain unchanged.
Resolution
PR
2
(
log
1
+
)
]
log
2
( )
=
PWM Frequency
1.22 kHz
(1)
4.88 kHz
(1)
19.53 kHz
78.12 kHz
156.3 kHz
208.3 kHz
Timer Prescale (1, 4, 16)
PR2 Value
Maximum Resolution (bits)
Note 1:
Changing duty cycle will cause a glitch.
16
4
1
1
1
1
0xFF
10
0xFF
10
0xFF
10
0x3F
8
0x1F
7
0x17
6.6
相關PDF資料
PDF描述
PIC16F818 18/20-Pin Enhanced FLASH Microcontrollers with nanoWatt Technology(18/20引腳,納瓦技術增強FLASH微控制器)
PIC16F819 18/20-Pin Enhanced FLASH Microcontrollers with nanoWatt Technology(18/20引腳,納瓦技術增強FLASH微控制器)
PIC16F83 8-Bit CMOS Flash/EEPROM Microcontollrs(每個I/O口有20mA吸收,25mA驅動,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
相關代理商/技術參數(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 安裝風格: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 安裝風格: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 安裝風格: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 安裝風格: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 安裝風格:SMD/SMT