PIC18F2331 MICROCHIP [Microchip Technology], PIC18F2331 Datasheet - Page 191

no-image

PIC18F2331

Manufacturer Part Number
PIC18F2331
Description
28/40/44-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:
PIC18F2331-I/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18F2331-I/SP
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
TABLE 17-1:
17.3.5
The match output of PTMR can optionally be
post-scaled through a 4-bit postscaler (which gives a
1:1 to 1:16 scaling inclusive) to generate an interrupt.
The postscaler counter is cleared when any of the
following occurs:
• Write to the PTMR register
• Write to the PTCON register
• Any device Reset
The PTMR register is not cleared when PTCON is
written.
FIGURE 17-5:
 2003 Microchip Technology Inc.
PTMR_INT_REQ
PTMR_INT_REQ
Minimum PWM Frequencies vs. Prescaler Value
A: PRESCALER = 1:1
B: PRESCALER = 1:4
Note 1: PWM Time Base Period register, PTPER, is loaded with the value FFFh for this example.
Prescale
PTIF bit
PTMR
PTIF bit
1:16
1:64
for F
F
1:1
1:4
PTMR
OSC
/4
PWM TIME BASE POSTSCALER
CYC
Qc
Q1
= 10 MIPS, (PTPER = 0FFFh)
MINIMUM PWM FREQUENCY
Edge-aligned
Qc
FFEh
Frequency
Q2
FFEh
PWM TIME BASE INTERRUPT TIMING, FREE RUNNING MODE
2441 Hz
153 Hz
610 Hz
38 Hz
PWM
Qc
Q3
Qc
Q4
Qc
Q1
Center-aligned
Frequency
1
1
Qc
1221 Hz
Q2
305 Hz
76 Hz
19 Hz
FFFh
PWM
FFFh
PIC18F2331/2431/4331/4431
Qc
Q3
Qc
Preliminary
Q4
Qc
Q1
Q4
Qc
Q2
Q4
000h
17.4
The PWM timer can generate interrupts based on the
modes of operation selected by PTMOD<1:0> bits and
the postscaler bits (PTOPS<3:0>).
17.4.1
When the PWM time base is in the Free Running mode
(PTMOD<1:0> = 00), an interrupt event is generated
each time a match with the PTPER register occurs. The
PTMR register is reset to zero in the following clock
edge.
Using a postscaler selection other than 1:1 will reduce
the frequency of interrupt events.
000h
Qc
Q3
Qc
Q4
PWM Time Base Interrupts
INTERRUPTS IN FREE RUNNING
MODE
Qc
Q1
Qc
Q2
001h
001h
Qc
Q3
Qc
Q4
Qc
Q1
DS39616B-page 189
Qc
Q2
002h
002h
Qc
Q3
Qc
Q4

Related parts for PIC18F2331