PIC18F2320-I/SO Microchip Technology, PIC18F2320-I/SO Datasheet - Page 141

IC MCU FLASH 4KX16 EEPROM 28SOIC

PIC18F2320-I/SO

Manufacturer Part Number
PIC18F2320-I/SO
Description
IC MCU FLASH 4KX16 EEPROM 28SOIC
Manufacturer
Microchip Technology
Series
PIC® 18Fr

Specifications of PIC18F2320-I/SO

Core Size
8-Bit
Program Memory Size
8KB (4K x 16)
Core Processor
PIC
Speed
40MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, LVD, POR, PWM, WDT
Number Of I /o
25
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
512 x 8
Voltage - Supply (vcc/vdd)
4.2 V ~ 5.5 V
Data Converters
A/D 10x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
28-SOIC (7.5mm Width)
Controller Family/series
PIC18
No. Of I/o's
25
Eeprom Memory Size
256Byte
Ram Memory Size
512Byte
Cpu Speed
40MHz
No. Of Timers
4
Processor Series
PIC18F
Core
PIC
Data Bus Width
8 bit
Data Ram Size
512 B
Interface Type
SPI, I2C, USART
Maximum Clock Frequency
40 MHz
Number Of Programmable I/os
25
Number Of Timers
2 x 8 bit
Operating Supply Voltage
2 V to 5.5 V
Maximum Operating Temperature
+ 85 C
Mounting Style
SMD/SMT
3rd Party Development Tools
52715-96, 52716-328, 52717-734, 52712-325, EWPIC18
Development Tools By Supplier
PG164130, DV164035, DV244005, DV164005, PG164120, ICE4000, ICE2000, DV164136
Minimum Operating Temperature
- 40 C
On-chip Adc
10 bit
Package
28SOIC W
Device Core
PIC
Family Name
PIC18
Maximum Speed
40 MHz
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
XLT28SO-1 - SOCKET TRANSITION 28SOIC 300MIL
Lead Free Status / Rohs Status
 Details
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 opera-
tion. When the CCPR1H and 2-bit latch match TMR2,
concatenated with an internal 2-bit Q clock or two bits
of the TMR2 prescaler, the CCP1 pin is cleared. The
maximum PWM resolution (bits) for a given PWM
frequency is given by the following equation.
EQUATION 15-3:
TABLE 15-4:
TABLE 15-5:
© 2007 Microchip Technology Inc.
INTCON
PIR1
PIE1
IPR1
TRISC
TMR2
PR2
T2CON
CCPR1L
CCPR1H
CCP1CON
CCPR2L
CCPR2H
CCP2CON
OSCCON
Legend:
Note 1: The PSPIF, PSPIE and PSPIP bits are reserved on the PIC18F2X20 devices; always maintain these bits clear.
Timer Prescaler (1, 4, 16)
PR2 Value
Maximum Resolution (bits)
Note:
Name
PWM Resolution (max) =
PWM Frequency
x = unknown, u = unchanged, - = unimplemented, read as ‘0’. Shaded cells are not used by PWM and Timer2.
PORTC Data Direction Register
Timer2 Module Register
Timer2 Module Period Register
Capture/Compare/PWM Register 1 (LSB)
Capture/Compare/PWM Register 1 (MSB)
Capture/Compare/PWM Register 2 (LSB)
Capture/Compare/PWM Register 2 (MSB)
If the PWM duty cycle value is longer than
the PWM period, the CCP1 pin will not be
cleared.
GIE/GIEH PEIE/GIEL
PSPIE
PSPIP
PSPIF
IDLEN
Bit 7
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
IRCF2
ADIF
ADIE
ADIP
Bit 6
log
TMR0IE
log(2)
DC1B1
DC2B1
IRCF1
RCIF
RCIE
RCIP
F
Bit 5
2.44 kHz
F
PWM
OSC
FFh
16
10
bits
DC1B0
DC2B0
INT0IE
IRCF0
PIC18F2220/2320/4220/4320
TXIE
TXIP
Bit 4
TXIF
9.77 kHz
FFh
10
4
CCP1M3
CCP2M3
SSPIF
SSPIE
SSPIP
OSTS
RBIE
Bit 3
39.06 kHz
15.5.3
The following steps should be taken when configuring
the CCP module for PWM operation:
1.
2.
3.
4.
5.
CCP1M2 CCP1M1
CCP2M2 CCP2M1
TMR0IF
CCP1IF
CCP1IE
CCP1IP
FFh
IOFS
Bit 2
10
1
Set the PWM period by writing to the PR2 register.
Set the PWM duty cycle by writing to the
CCPR1L register and the 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.
SETUP FOR PWM OPERATION
TMR2IE
TMR2IP
TMR2IF
INT0IF
SCS1
156.25 kHz
Bit 1
3Fh
1
8
CCP1M0 --00 0000 --00 0000
CCP2M0 --00 0000 --00 0000
TMR1IF
TMR1IE 0000 0000 0000 0000
TMR1IP 1111 1111 1111 1111
SCS0
RBIF
Bit 0
312.50 kHz
1Fh
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
0000 qq00 0000 qq00
POR, BOR
1
7
Value on
DS39599G-page 139
416.67 kHz
Value on
all other
6.58
17h
Resets
1

Related parts for PIC18F2320-I/SO