PIC16C925/CL Microchip Technology, PIC16C925/CL Datasheet - Page 59

no-image

PIC16C925/CL

Manufacturer Part Number
PIC16C925/CL
Description
IC MCU EPROM 4KX14 LCDDVR 68CLCC
Manufacturer
Microchip Technology
Series
PIC® 16Cr

Specifications of PIC16C925/CL

Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Connectivity
I²C, SPI
Peripherals
Brown-out Detect/Reset, LCD, POR, PWM, WDT
Number Of I /o
25
Program Memory Size
7KB (4K x 14)
Program Memory Type
EPROM
Ram Size
176 x 8
Voltage - Supply (vcc/vdd)
4 V ~ 5.5 V
Data Converters
A/D 5x10b
Oscillator Type
External
Operating Temperature
0°C ~ 70°C
Package / Case
68-CLCC Window, 68-CERQUAD
For Use With
AC164308 - MODULE SKT FOR PM3 68PLCCDVA16XL680 - ADAPTER DEVICE FOR MPLAB-ICEAC164024 - ADAPTER PICSTART PLUS 68PLCCAC164022 - MODULE SKT PROMATEII 68PLCC
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
EQUATION 8-1:
At most, an 8-bit resolution duty cycle can be obtained
from a 31.25 kHz frequency and a 8 MHz oscillator, i.e.,
0 CCPR1L:CCP1CON<5:4> 255. Any value greater
than 255 will result in a 100% duty cycle.
In order to achieve higher resolution, the PWM fre-
quency must be decreased. In order to achieve higher
PWM frequency, the resolution must be decreased.
Table 8-2 lists example PWM frequencies and resolu-
tions for F
ues are also shown.
TABLE 8-2:
Timer Prescaler (1, 4, 16)
PR2 Value
Maximum Resolution (bits)
1.
2.
2001 Microchip Technology Inc.
Find the value of the PR2 register, given:
From the equation for PWM period in Section 8.3.1,
or
Find the maximum resolution of the duty cycle that can be used with a 31.25 kHz frequency and
8 MHz oscillator.
From the equation from maximum PWM resolution in Section 8.3.2,
or
• Desired PWM frequency = 31.25 kHz
• F
• TMR2 prescale = 1
1 / 31.25 kHz = [ (PR2) + 1 ] • 4 • 1/8 MHz • 1
32 s
PR2
PR2
1 / 31.25 kHz = 2
32 s
256
log(256)
8.0
OSC
OSC
PWM Frequency
= 8 MHz. TMR2 prescaler and PR2 val-
= 8 MHz
EXAMPLE PWM FREQUENCIES AND RESOLUTIONS AT 8 MHz
EXAMPLES OF PWM PERIOD AND DUTY CYCLE CALCULATION
= [ (PR2) + 1 ] • 4 • 125 ns • 1 = [ (PR2) + 1 ] • 0.5 s
= (32 s / 0.5 s) - 1
= 63
= 2
= 2
= (PWM Resolution) • log(2)
= PWM Resolution
PWM RESOLUTION
PWM RESOLUTION
PWM RESOLUTION
• 1 / 8 MHz • 1
• 125 ns • 1
488 Hz
0xFF
16
10
Preliminary
1.95 kHz
0xFF
10
4
8.3.3
The following steps should be taken when configuring
the CCP module for PWM operation:
1.
2.
3.
4.
5.
Set the PWM period by writing to the PR2
register.
Set the PWM duty cycle by writing to the
CCPR1L register and CCP1CON<5:4> bits.
Make the CCP1 pin an output by clearing the
TRISC<2> bit.
Set the TMR2 prescale value and enable Timer2
by writing to T2CON.
Configure the CCP module for PWM operation.
7.81 kHz
0xFF
10
1
SET-UP FOR PWM OPERATION
PIC16C925/926
31.25 kHz
0x3F
1
8
62.5 kHz
0x1F
1
7
DS39544A-page 57
250 kHz
0x07
1
5

Related parts for PIC16C925/CL