PIC18F1230 MICROCHIP [Microchip Technology], PIC18F1230 Datasheet - Page 125

no-image

PIC18F1230

Manufacturer Part Number
PIC18F1230
Description
18/20/28-Pin, Enhanced Flash Microcontrollers with nanoWatt Technology, High-Performance PWM and A/D
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18F1230-E/SS
Manufacturer:
Microchip Technology
Quantity:
135
Part Number:
PIC18F1230-I/ML
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18F1230-I/P
Manufacturer:
MICROCHIP
Quantity:
5
Part Number:
PIC18F1230-I/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18F1230-I/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18F1230-I/SS
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18F1230T-I/ML
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
13.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
• Continuous Up/Down Count modes: When the
The PWM period can be calculated from the following
formulas:
EQUATION 13-1:
EQUATION 13-2:
The PWM frequency is the inverse of period; or
EQUATION 13-3:
© 2006 Microchip Technology Inc.
PTMR register is reset to zero after a match with the
PTPER register.
PTMR 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 13-9 and Figure 13-10 indicate
the times when the contents of the PTPER buffer
are loaded into the actual PTPER register.
PWM Period
T
T
PWM Frequency =
PWM
PWM
=
=
(PTPER + 1) x PTMRPS
(2 x PTPER) x PTMRPS
PWM PERIOD FOR
FREE-RUNNING MODE
PWM PERIOD FOR
CONTINUOUS UP/DOWN
COUNT MODE
PWM FREQUENCY
F
F
OSC
PWM Period
OSC
4
/4
1
Advance Information
The maximum resolution (in bits) for a given device
oscillator and PWM frequency can be determined from
the following formula:
EQUATION 13-4:
The PWM resolutions and frequencies are shown for a
selection of execution speeds and PTPER values in
Table 13-2. The PWM frequencies in Table 13-2 are
calculated for Edge-Aligned PWM mode. For Center-
Aligned
approximately one-half the values indicated in this
table.
TABLE 13-2:
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
Note:
5 MHz
5 MHz
5 MHz
4 MHz
4 MHz
4 MHz
F
OSC
PIC18F1230/1330
mode,
For
frequencies will be approximately 1/2 the
value indicated in the table.
MIPS
6.25
6.25
6.25
1.25
1.25
1.25
PWM Frequency = 1/T
2.5
2.5
2.5
10
10
10
10
10
10
10
10
10
1
1
1
Resolution =
EXAMPLE PWM
FREQUENCIES AND
RESOLUTIONS
center-aligned
the
PTPER
0FFFh
07FFh
03FFh
01FFh
0FFFh
03FFh
0FFFh
03FFh
0FFFh
0FFFh
03FFh
03FFh
Value
FFh
7Fh
3Fh
1Fh
0Fh
FFh
FFh
FFh
FFh
PWM RESOLUTION
PWM
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
frequencies
F
F
PWM
OSC
operation,
DS39758B-page 123
PWM
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
will
PWM
be

Related parts for PIC18F1230