PIC18C242-I/SP Microchip Technology, PIC18C242-I/SP Datasheet - Page 115

IC MCU OTP 8KX16 A/D 28DIP

PIC18C242-I/SP

Manufacturer Part Number
PIC18C242-I/SP
Description
IC MCU OTP 8KX16 A/D 28DIP
Manufacturer
Microchip Technology
Series
PIC® 18Cr

Specifications of PIC18C242-I/SP

Core Size
8-Bit
Program Memory Size
16KB (8K x 16)
Peripherals
Brown-out Detect/Reset, LVD, POR, PWM, WDT
Core Processor
PIC
Speed
40MHz
Connectivity
I²C, SPI, UART/USART
Number Of I /o
22
Program Memory Type
OTP
Ram Size
512 x 8
Voltage - Supply (vcc/vdd)
4.2 V ~ 5.5 V
Data Converters
A/D 5x10b
Oscillator Type
External
Operating Temperature
-40°C ~ 85°C
Package / Case
28-DIP (0.300", 7.62mm)
Controller Family/series
PIC18
No. Of I/o's
23
Ram Memory Size
512Byte
Cpu Speed
40MHz
No. Of Timers
4
Processor Series
PIC18C
Core
PIC
Data Bus Width
8 bit
Data Ram Size
512 B
Interface Type
MSSP, SPI, I2C, USART
Maximum Clock Frequency
40 MHz
Number Of Programmable I/os
23
Number Of Timers
1 x 16 bit
Operating Supply Voltage
2.5 V to 5.5 V
Maximum Operating Temperature
+ 85 C
Mounting Style
Through Hole
3rd Party Development Tools
52715-96, 52716-328, 52717-734, 52712-325, EWPIC18
Development Tools By Supplier
ICE2000, DM163022, DV164136
Minimum Operating Temperature
- 40 C
On-chip Adc
5 bit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
I3DB18C452 - BOARD DAUGHTER ICEPIC3
Eeprom Size
-
Lead Free Status / Rohs Status
 Details
13.5.3
The following steps should be taken when configuring
the CCP module for PWM operation:
1.
2.
TABLE 13-4:
TABLE 13-5:
INTCON
PIR1
PIE1
IPR1
TRISC
TMR2
PR2
T2CON
CCPR1L
CCPR1H
CCP1CON
CCPR2L
CCPR2H
CCP2CON
Legend:
Note 1: The PSPIF, PSPIE and PSPIP bits are reserved on the PIC18C2X2 devices. Always maintain these bits clear.
2001 Microchip Technology Inc.
Maximum Resolution (bits)
Name
Timer Prescaler (1, 4, 16)
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.
PWM Frequency
x = unknown, u = unchanged, - = unimplemented, read as '0'. Shaded cells are not used by PWM and Timer2.
PR2 Value
PORTC Data Direction Register
Timer2 Module Register
Timer2 Module Period Register
Capture/Compare/PWM Register1 (LSB)
Capture/Compare/PWM Register1 (MSB)
Capture/Compare/PWM Register2 (LSB)
Capture/Compare/PWM Register2 (MSB)
SETUP FOR PWM OPERATION
PSPIE
PSPIP
PSPIF
GIEH
Bit 7
GIE/
EXAMPLE PWM FREQUENCIES AND RESOLUTIONS AT 40 MHz
REGISTERS ASSOCIATED WITH PWM AND TIMER2
(1)
(1)
(1)
TOUTPS3 TOUTPS2 TOUTPS1 TOUTPS0 TMR2ON T2CKPS1 T2CKPS0 -000 0000 -000 0000
PEIE/
GIEL
ADIF
ADIE
ADIP
Bit 6
TMR0IE
DC1B1
DC2B1
RCIF
RCIE
RCIP
Bit 5
2.44 kHz
0xFF
16
14
DC1B0
DC2B0
INT0IE
Bit 4
TXIF
TXIE
TXIP
9.77 kHz
0xFF
12
4
CCP1M3
CCP2M3
SSPIF
SSPIE
SSPIP
RBIE
Bit 3
39.06 kHz
3.
4.
5.
CCP1M2
CCP2M2
TMR0IF
CCP1IF
CCP1IE
CCP1IP
0xFF
Bit 2
10
1
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.
CCP1M1
CCP2M1
TMR2IF
TMR2IE
TMR2IP
INT0IF
156.25 kHz
Bit 1
0x3F
1
8
CCP1M0 --00 0000 --00 0000
CCP2M0 --00 0000 --00 0000
TMR1IF
TMR1IE 0000 0000 0000 0000
TMR1IP 0000 0000 0000 0000
RBIF
Bit 0
PIC18CXX2
312.50 kHz
0x1F
0000 000x 0000 000u
0000 0000 0000 0000
1111 1111 1111 1111
0000 0000 0000 0000
1111 1111 1111 1111
xxxx xxxx uuuu uuuu
xxxx xxxx uuuu uuuu
xxxx xxxx uuuu uuuu
xxxx xxxx uuuu uuuu
1
7
Value on
POR,
BOR
DS39026C-page 113
416.67 kHz
0x17
Value on
6.58
RESETS
all other
1

Related parts for PIC18C242-I/SP