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

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
PIC18F2331/2431/4331/4431
17.4.2
When the PWM time base is in the Single-shot mode
(PTMOD<1:0> = 01), an interrupt event is generated
when a match with the PTPER register occurs. The
PWM timer register (PTMR) is reset to zero on the
following input clock edge, and the PTEN bit is cleared.
The postscaler selection bits have no effect in this
Timer mode.
FIGURE 17-6:
DS39616B-page 190
PTMR_INT_REQ
PTMR_INT_REQ
A: PRESCALER = 1:1
B: PRESCALER = 1:4
Note 1: Interrupt flag bit PTIF is sampled here (every Q1).
F
PTMR
PTIF bit
PTIF bit
OSC
PTMR
2: PWM Time Base Period register, PTPER, is loaded with the value FFFh for this example.
/4
INTERRUPTS IN SINGLE-SHOT
MODE
Q1
1
Qc
1
Q2
Qc
FFEh
PWM TIME BASE INTERRUPT TIMING, SINGLE SHOT MODE
FFEh
Q3
Qc
Q4
Qc
Q1
1
Qc
1
2
2
Q2
Qc
FFFh
FFFh
Q3
Qc
Preliminary
Q4
Qc
1
Q1
1
Qc
Q4
Q2
Qc
Q4
000h
17.4.3
In the Up/Down Counting mode (PTMOD<1:0> = 10),
an interrupt event is generated each time the value of
the PTMR register becomes zero and the PWM time
base begins to count upwards. The postscaler
selection bits may be used in this mode of the timer to
reduce the frequency of the interrupt events.
Figure 17-7 shows the interrupts in continuous
Up/Down Counting mode.
000h
Q3
Qc
Q4
Qc
INTERRUPTS IN CONTINUOUS
UP/DOWN COUNTING MODE
Q1
Qc
Q2
Qc
000h
000h
Q3
Qc
 2003 Microchip Technology Inc.
Q4
Qc
Q1
Qc
Q2
Qc
000h
000h
Q3
Qc
Q4
Qc

Related parts for PIC18F2331