PIC18F4580-I/P Microchip Technology Inc., PIC18F4580-I/P Datasheet - Page 131

no-image

PIC18F4580-I/P

Manufacturer Part Number
PIC18F4580-I/P
Description
40 PIN, 32 KB FLASH, 1536 RAM, 36 I/O
Manufacturer
Microchip Technology Inc.
Datasheet

Specifications of PIC18F4580-I/P

A/d Inputs
11-Channel, 10-Bit
Comparators
2
Cpu Speed
10 MIPS
Eeprom Memory
256 Bytes
Input Output
36
Interface
CAN/I2C/SPI/USART
Memory Type
Flash
Number Of Bits
8
Package Type
40-pin PDIP
Programmable Memory
32K Bytes
Ram Size
1.5K Bytes
Speed
40 MHz
Timers
1-8 bit, 3-16 bit
Voltage, Range
2-5.5 V
Lead Free Status / Rohs Status
RoHS Compliant part Electrostatic Device

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18F4580-I/P
Manufacturer:
RENESAS
Quantity:
5 600
Part Number:
PIC18F4580-I/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18F4580-I/PT
Manufacturer:
MICROCHIP
Quantity:
201
Part Number:
PIC18F4580-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18F4580-I/PT
Manufacturer:
MICROCHI
Quantity:
20 000
Part Number:
PIC18F4580-I/PT
0
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:
 2004 Microchip Technology Inc.
INTCON
PIR1
PIE1
IPR1
TRISD
TMR2
PR2
T2CON
CCPR1L
CCPR1H
CCP1CON
Legend:
Note 1:
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.
These registers or register bits are not implemented on the PIC18F248 and PIC18F258 and read as ‘0’s.
If the PWM duty cycle value is longer than
the PWM period, the CCP1 pin will not be
cleared.
PORTD Data Direction Register
Timer2 Module Register
Timer2 Module Period Register
Capture/Compare/PWM Register1 (LSB)
Capture/Compare/PWM Register1 (MSB)
PSPIF
PSPIE
PSPIP
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/
ADIE
ADIP
Bit 6
GIEL
ADIF
=
log
-----------------------------bits
log
TMR0IE
DC1B1
RCIE
RCIP
---------------
F
RCIF
Bit 5
F
PWM
OSC
2
2.44 kHz
0FFh
16
10
DC1B0
INT0IE
Bit 4
TXIF
TXIE
TXIP
9.76 kHz
CCP1M3
0FFh
SSPIF
SSPIE
SSPIP
RBIE
Bit 3
10
4
15.4.3
The following steps should be taken when configuring
the CCP module for PWM operation:
1.
2.
3.
4.
5.
CCP1M2
TMR0IF
CCP1IF
CCP1IE
CCP1IP
39.06 kHz
Bit 2
0FFh
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 CCP1 module for PWM operation.
10
1
CCP1M1
TMR2IE
TMR2IP
TMR2IF
SETUP FOR PWM OPERATION
INT0IF
Bit 1
156.3 kHz
3Fh
1
8
CCP1M0 --00 0000 --00 0000
TMR1IE
TMR1IP
TMR1IF
Bit 0
RBIF
PIC18FXX8
312.5 kHz
0000 000x 0000 000u
0000 0000 0000 0000
0000 0000 0000 0000
1111 1111 1111 1111
1111 1111 1111 1111
0000 0000 0000 0000
1111 1111 1111 1111
xxxx xxxx uuuu uuuu
xxxx xxxx uuuu uuuu
1Fh
POR, BOR
Value on
1
7
DS41159D-page 129
416.6 kHz
Value on
all other
Resets
17h
5.5
1

Related parts for PIC18F4580-I/P