PIC16C74-10/P Microchip Technology, PIC16C74-10/P Datasheet - Page 75

MICRO CTRL 4K 10MHZ OTP 40DIP

PIC16C74-10/P

Manufacturer Part Number
PIC16C74-10/P
Description
MICRO CTRL 4K 10MHZ OTP 40DIP
Manufacturer
Microchip Technology
Series
PIC® 16Cr
Datasheet

Specifications of PIC16C74-10/P

Core Processor
PIC
Core Size
8-Bit
Speed
10MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
POR, PWM, WDT
Number Of I /o
33
Program Memory Size
7KB (4K x 14)
Program Memory Type
OTP
Ram Size
192 x 8
Voltage - Supply (vcc/vdd)
4 V ~ 6 V
Data Converters
A/D 8x8b
Oscillator Type
External
Operating Temperature
0°C ~ 70°C
Package / Case
40-DIP (0.600", 15.24mm)
Lead Free Status / RoHS Status
Request inventory verification / Request inventory verification
Eeprom Size
-
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:
Address
0Bh,8Bh,
10Bh,18Bh
0Ch
0Dh
8Ch
8Dh
87h
0Eh
0Fh
10h
15h
16h
17h
1Bh
1Ch
1Dh
Legend:
Note 1: Bits PSPIE and PSPIF are reserved on the PIC16C73/73A/76, always maintain these bits clear.
Timer Prescaler (1, 4, 16)
PR2 Value
Maximum Resolution (bits)
1997 Microchip Technology Inc.
(2)
(2)
(2)
(2)
(2)
1/78.125 kHz= [(PR2) + 1] • 4 • 1/20 MHz • 1
12.8 s = [(PR2) + 1] • 4 • 50 ns • 1
PR2
1/78.125 kHz= 2
12.8 s = 2
256
log(256) = (PWM Resolution) • log(2)
8.0
2: The PIC16C72 does not have a Parallel Slave Port, USART or CCP2 module, these bits are unimplemented, read as '0'.
CCPR1L:CCP1CON<5:4>
x = unknown, u = unchanged, - = unimplemented read as '0'. Shaded cells are not used by Capture and Timer1.
Name
INTCON
PIR1
PIR2
PIE1
PIE2
TRISC
TMR1L
TMR1H
T1CON
CCPR1L
CCPR1H
CCP1CON
CCPR2L
CCPR2H
CCP2CON
= 63
= 2
= PWM Resolution
PWM Frequency
PWM RESOLUTION
PWM RESOLUTION
EXAMPLE PWM FREQUENCIES AND RESOLUTIONS AT 20 MHz
REGISTERS ASSOCIATED WITH CAPTURE, COMPARE, AND TIMER1
PWM RESOLUTION
CYCLE CALCULATION
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 TMR1register
Capture/Compare/PWM register1 (LSB)
Capture/Compare/PWM register1 (MSB)
Capture/Compare/PWM register2 (LSB)
Capture/Compare/PWM register2 (MSB)
Bit 7
GIE
(1,2)
(1,2)
• 50 ns • 1
ADIE
Bit 6
PEIE
ADIF
• 1/20 MHz • 1
T1CKPS1 T1CKPS0 T1OSCEN T1SYNC TMR1CS TMR1ON --00 0000 --uu uuuu
CCP1X
CCP2X
255. Any value
RCIF
RCIE
Bit 5
T0IE
(2)
(2)
1.22 kHz 4.88 kHz 19.53 kHz 78.12 kHz 156.3 kHz 208.3 kHz
CCP1Y
CCP2Y
0xFF
TXIE
TXIF
16
10
INTE
Bit 4
(2)
(2)
CCP1M3
CCP2M3
SSPIF
SSPIE
0xFF
RBIE
Bit 3
10
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.
CCP1M2 CCP1M1 CCP1M0 --00 0000 --00 0000
CCP2M2 CCP2M1 CCP2M0 --00 0000 --00 0000
CCP1IE TMR2IE
CCP1IF
Bit 2
T0IF
0xFF
SET-UP FOR PWM OPERATION
10
1
TMR2IF
Bit 1
INTF
0x3F
1
8
TMR1IE 0000 0000 0000 0000
TMR1IF 0000 0000 0000 0000
CCP2IF ---- ---0 ---- ---0
CCP2IE ---- ---0 ---- ---0
RBIF
Bit 0
PIC16C7X
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
Value on:
0x1F
1
POR,
7
BOR
DS30390E-page 75
Value on
all other
0x17
resets
5.5
1

Related parts for PIC16C74-10/P