PIC18F2431-I/SP Microchip Technology Inc., PIC18F2431-I/SP Datasheet - Page 195

no-image

PIC18F2431-I/SP

Manufacturer Part Number
PIC18F2431-I/SP
Description
Microcontroller; 16 KB Flash; 768 RAM; 256 EEPROM; 24 I/O; 28-Pin-SPDIP
Manufacturer
Microchip Technology Inc.
Datasheet

Specifications of PIC18F2431-I/SP

A/d Inputs
5-Channel, 10-Bit
Cpu Speed
10 MIPS
Eeprom Memory
256 Bytes
Input Output
24
Interface
I2C/SPI/USART
Memory Type
Flash
Number Of Bits
8
Package Type
28-pin SPDIP
Programmable Memory
16K Bytes
Ram Size
768 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:
PIC18F2431-I/SP
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Company:
Part Number:
PIC18F2431-I/SP
Quantity:
5
17.5
The PWM period is defined by the PTPER register pair
(PTPERL and PTPERH). The PWM period has 12-bit
resolution by combining 4 LSBs of PTPERH and 8-bits
of PTPERL. PTPER is a double-buffered register used
to set the counting period for the PWM time base.
The PTPER buffer contents are loaded into the PTPER
register at the following times:
• Free Running and Single-shot modes: when the
• Up/Down Counting modes: When the PTMR
The PWM period can be calculated from the following
formulas:
EQUATION 17-1:
EQUATION 17-2:
The PWM frequency is the inverse of period; or
 2003 Microchip Technology Inc.
PTMR register is reset to zero after a match with
the PTPER register.
register is zero. The value held in the PTPER
buffer is automatically loaded into the PTPER
register when the PWM time base is disabled
(PTEN = 0). Figure 17-9 and Figure 17-10
indicate the times when the contents of the
PTPER buffer are loaded into the actual PTPER
register.
PWM Period
PWM frequency
TPWM =
TPWM =
TPWM =
(PTPER + 1) x PTMRPS
Fosc/(PTMRPS/4)
Fosc/(PTMRPS/4)
PWM PERIOD FOR FREE
RUNNING MODE
PWM PERIOD FOR
UP/DOWN COUNTING
MODE
(2 x PTPER)
(PTPER + 1)
=
or
Fosc/4
------------------------------ -
PWM period
1
PIC18F2331/2431/4331/4431
Preliminary
The maximum resolution (in bits) for a given device
oscillator and PWM frequency can be determined from
the following formula:
EQUATION 17-3:
The PWM resolutions and frequencies are shown for a
selection of execution speeds and PTPER values in
Table 17-2. The PWM frequencies in Table 17-2 are
calculated
Center-aligned mode, the PWM frequencies will be
approximately one-half the values indicated in this
table.
TABLE 17-2:
Note: For center-aligned operation, PWM frequencies will
40 MHz
40 MHz
40 MHz
40 MHz
40 MHz
40 MHz
40 MHz
40 MHz
40 MHz
25 MHz
25 MHz
25 MHz
10 MHz
10 MHz
10 MHz
5 MHz
5 MHz
5 MHz
4 MHz
4 MHz
4 MHz
Fosc
be approximately 1/2 the value indicated in the table.
MIPS
for
PWM Frequency = 1/TPWM
6.25
6.25
6.25
1.25
1.25
1.25
2.5
2.5
2.5
10
10
10
10
10
10
10
10
10
1
1
1
Resolution =
Edge-aligned
EXAMPLE PWM
FREQUENCIES AND
RESOLUTIONS
PTPER
Value
0FFFh
07FFh
03FFh
01FFh
0FFFh
03FFh
0FFFh
03FFh
0FFFh
0FFFh
03FFh
03FFh
FFh
7Fh
3Fh
1Fh
0Fh
FFh
FFh
FFh
FFh
PWM RESOLUTION
log
Resolution
log(2)
14 bits
13 bits
12 bits
10 bits
14 bits
12 bits
10 bits
14 bits
12 bits
10 bits
14 bits
12 bits
10 bits
14 bits
12 bits
10 bits
11 bits
PWM
9 bits
8 bits
7 bits
6 bits
Fpwm
Fosc/4
PWM
DS39616B-page 193
mode.
Frequency
156.2 kHz
312.5 kHz
19.5 kHz
39.0 kHz
78.1 kHz
24.4 kHz
625 kHz
2.4 kHz
4.9 kHz
9.8 kHz
1.5 kHz
6.1 kHz
2.4 kHz
9.8 kHz
1.2 kHz
4.9 kHz
3.9 kHz
610 Hz
305 Hz
244 Hz
976 Hz
PWM
For

Related parts for PIC18F2431-I/SP