PIC16C66-20E/SP Microchip Technology, PIC16C66-20E/SP Datasheet - Page 81
![IC MCU OTP 8KX14 PWM 28DIP](/photos/6/59/65908/150-28-dip_sml.jpg)
PIC16C66-20E/SP
Manufacturer Part Number
PIC16C66-20E/SP
Description
IC MCU OTP 8KX14 PWM 28DIP
Manufacturer
Microchip Technology
Series
PIC® 16Cr
Datasheets
1.PIC16F616T-ISL.pdf
(8 pages)
2.PIC16F818-ISO.pdf
(6 pages)
3.PIC16LC62A-04SP.pdf
(337 pages)
4.PIC16C66-04SO.pdf
(6 pages)
Specifications of PIC16C66-20E/SP
Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
22
Program Memory Size
14KB (8K x 14)
Program Memory Type
OTP
Ram Size
368 x 8
Voltage - Supply (vcc/vdd)
4 V ~ 6 V
Oscillator Type
External
Operating Temperature
-40°C ~ 125°C
Package / Case
28-DIP (0.300", 7.62mm)
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Data Converters
-
- PIC16F616T-ISL PDF datasheet
- PIC16F818-ISO PDF datasheet #2
- PIC16LC62A-04SP PDF datasheet #3
- PIC16C66-04SO PDF datasheet #4
- Current page: 81 of 337
- Download datasheet (3Mb)
EXAMPLE 10-2: PWM PERIOD AND DUTY
Desired PWM frequency is 78.125 kHz,
Fosc = 20 MHz
TMR2 prescale = 1
Find the maximum resolution of the duty cycle that can
be used with a 78.125 kHz frequency and 20 MHz
oscillator:
At most, an 8-bit resolution duty cycle can be obtained
from a 78.125 kHz frequency and a 20 MHz oscillator,
i.e., 0
greater than 255 will result in a 100% duty cycle.
TABLE 10-3:
TABLE 10-4:
Add
0Bh,8Bh
10Bh,18Bh
0Ch
0Dh
8Ch
8Dh
87h
0Eh
0Fh
10h
15h
16h
17h
1Bh
1Ch
1Dh
Legend:
Note 1: These bits are associated with the USART module, which is implemented on the PIC16C63/R63/65/65A/R65/66/67 only.
Timer Prescaler (1, 4, 16)
PR2 Value
Maximum Resolution (bits)
1997 Microchip Technology Inc.
(4)
(4)
(4)
(4)
(4)
1/78.125 kHz = [(PR2) + 1] • 4 • 1/20 MHz • 1
12.8 s
PR2
1/78.125 kHz = 2
12.8 s
256
log(256)
8.0
2: Bits PSPIE and PSPIF are reserved on the PIC16C62/62A/R62/63/R63/66, always maintain these bits clear.
3: The PIR1<6> and PIE1<6> bits are reserved, always maintain these bits clear.
4: These registers are associated with the CCP2 module, which is only implemented on the PIC16C63/R63/65/65A/R65/66/67.
CCPR1L:CCP1CON<5:4>
x = unknown, u = unchanged, - = unimplemented locations read as '0’. Shaded cells are not used in these modes.
Name
INTCON
PIR1
PIR2
PIE1
PIE2
TRISC
TMR1L
TMR1H
T1CON
CCPR1L
CCPR1H
CCP1CON
CCPR2L
CCPR2H
CCP2CON
PWM Frequency
EXAMPLE PWM FREQUENCIES AND RESOLUTIONS AT 20 MHz
REGISTERS ASSOCIATED WITH TIMER1, CAPTURE AND COMPARE
= [(PR2) + 1] • 4 • 50 ns • 1
= 63
= 2
= 2
= (PWM Resolution) • log(2)
= PWM Resolution
CYCLE CALCULATION
PWM RESOLUTION
PWM RESOLUTION
PWM RESOLUTION
PSPIF
PSPIE
PORTC Data Direction register
Holding register for the Least Significant Byte of the 16-bit TMR1 register
Holding register for the Most Significant Byte of the 16-bit TMR1 register
Capture/Compare/PWM1 (LSB)
Capture/Compare/PWM1 (MSB)
Capture/Compare/PWM2 (LSB)
Capture/Compare/PWM2 (MSB)
Bit 7
GIE
—
—
—
—
—
(2)
(2)
PEIE
Bit 6
(3)
—
(3)
—
—
—
—
• 1/20 MHz • 1
• 50 ns • 1
255. Any value
T1CKPS1 T1CKPS0 T1OSCEN T1SYNC TMR1CS TMR1ON --00 0000 --uu uuuu
RCIF
RCIE
CCP1X
CCP2X
Bit 5
T0IE
—
—
(1)
(1)
1.22 kHz 4.88 kHz 19.53 kHz 78.12 kHz 156.3 kHz 208.3 kHz
0xFF
16
10
CCP1Y
CCP2Y
TXIE
TXIF
INTE
Bit 4
—
—
(1)
(1)
CCP1M3 CCP1M2 CCP1M1 CCP1M0 --00 0000 --00 0000
CCP2M3 CCP2M2 CCP2M1 CCP2M0 --00 0000 --00 0000
0xFF
SSPIF
SSPIE
10
RBIE
Bit 3
4
—
—
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 10-3 lists example PWM frequencies and resolu-
tions for Fosc = 20 MHz. The TMR2 prescaler and PR2
values are also shown.
10.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 regis-
ter.
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 CCP1 module for PWM operation.
CCP1IE TMR2IE TMR1IE 0000 0000 0000 0000
CCP1IF TMR2IF TMR1IF 0000 0000 0000 0000
Bit 2
T0IF
0xFF
—
—
SET-UP FOR PWM OPERATION
10
1
Bit 1
INTF
—
—
0x3F
1
8
CCP2IF ---- ---0 ---- ---0
CCP2IE ---- ---0 ---- ---0
RBIF
Bit 0
PIC16C6X
0000 000x 0000 000u
1111 1111 1111 1111
xxxx xxxx uuuu uuuu
xxxx xxxx uuuu uuuu
xxxx xxxx uuuu uuuu
xxxx xxxx uuuu uuuu
xxxx xxxx uuuu uuuu
xxxx xxxx uuuu uuuu
0x1F
Value on:
1
7
POR,
DS30234D-page 81
BOR
0x17
Value on
all other
5.5
Resets
1
Related parts for PIC16C66-20E/SP
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![PIC16C66-20/SP](/photos/6/59/65908/150-28-dip_tmb.jpg)
Part Number:
Description:
IC MCU OTP 8KX14 PWM 28DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C66-10/SO](/photos/6/59/65909/150-28-soic_tmb.jpg)
Part Number:
Description:
IC MCU OTP 8KX14 PWM 28SOIC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C66-10I/SP](/photos/6/59/65908/150-28-dip_tmb.jpg)
Part Number:
Description:
IC MCU OTP 8KX14 PWM 28DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C66-20/SO](/images/manufacturer_photos/0/4/439/microchip_technology_tmb.jpg)
Part Number:
Description:
IC,MICROCONTROLLER,8-BIT,PIC CPU,CMOS,SOP,28PIN,PLASTIC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C66-20I/SO](/images/manufacturer_photos/0/4/439/microchip_technology_tmb.jpg)
Part Number:
Description:
IC,MICROCONTROLLER,8-BIT,PIC CPU,CMOS,SOP,28PIN,PLASTIC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C66-04/SO](/photos/6/59/65909/150-28-soic_tmb.jpg)
Part Number:
Description:
IC MCU OTP 8KX14 PWM 28SOIC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C66-04I/SP](/photos/6/59/65908/150-28-dip_tmb.jpg)
Part Number:
Description:
IC MCU OTP 8KX14 PWM 28DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C66-20I/SP](/photos/6/59/65908/150-28-dip_tmb.jpg)
Part Number:
Description:
IC MCU OTP 8KX14 PWM 28DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C66-04/SP](/photos/6/59/65908/150-28-dip_tmb.jpg)
Part Number:
Description:
IC MCU OTP 8KX14 PWM 28DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C66-10/SP](/photos/6/59/65908/150-28-dip_tmb.jpg)
Part Number:
Description:
IC MCU OTP 8KX14 PWM 28DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C66-04I/SO](/photos/6/59/65909/150-28-soic_tmb.jpg)
Part Number:
Description:
IC MCU OTP 8KX14 PWM 28SOIC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C66-10I/SO](/photos/6/59/65909/150-28-soic_tmb.jpg)
Part Number:
Description:
IC MCU OTP 8KX14 PWM 28SOIC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C66/JW](/photos/7/29/72984/150-28-cdip_tmb.jpg)
Part Number:
Description:
IC MCU OTP 8KX14 PWM 28CDIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C66-04E/SO](/photos/6/59/65909/150-28-soic_tmb.jpg)
Part Number:
Description:
IC MCU OTP 8KX14 PWM 28SOIC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C66-04E/SP](/photos/6/59/65908/150-28-dip_tmb.jpg)
Part Number:
Description:
IC MCU OTP 8KX14 PWM 28DIP
Manufacturer:
Microchip Technology
Datasheet: