PIC18F2331/2431/4331/4431
REGISTER 18-1: PTCON0: PWM TIMER CONTROL REGISTER 0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
PTOPS3
PTOPS2
PTOPS1
PTOPS0
PTCKPS1
PTCKPS0
PTMOD1
PTMOD0
bit 7
bit 0
Legend:
R = Readable bit
-n = Value at POR
W = Writable bit
‘1’ = Bit is set
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared x = Bit is unknown
bit 7-4
PTOPS<3:0>: PWM Time Base Output Postscale Select bits
0000= 1:1 Postscale
0001= 1:2 Postscale
.
.
.
1111= 1:16 Postscale
bit 3-2
bit 1-0
PTCKPS<1:0>: PWM Time Base Input Clock Prescale Select bits
00= PWM time base input clock is FOSC/4 (1:1 prescale)
01= PWM time base input clock is FOSC/16 (1:4 prescale)
10= PWM time base input clock is FOSC/64 (1:16 prescale)
11= PWM time base input clock is FOSC/256 (1:64 prescale)
PTMOD<1:0>: PWM Time Base Mode Select bits
11= PWM time base operates in a Continuous Up/Down Count mode with interrupts for double PWM
updates
10= PWM time base operates in a Continuous Up/Down Count mode
01= PWM time base configured for Single-Shot mode
00= PWM time base operates in a Free-Running mode
REGISTER 18-2: PTCON1: PWM TIMER CONTROL REGISTER 1
R/W-0
PTEN
R-0
U-0
—
U-0
—
U-0
—
U-0
—
U-0
—
U-0
—
PTDIR
bit 7
bit 0
Legend:
R = Readable bit
-n = Value at POR
W = Writable bit
‘1’ = Bit is set
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared x = Bit is unknown
bit 7
PTEN: PWM Time Base Timer Enable bit
1= PWM time base is on
0= PWM time base is off
bit 6
PTDIR: PWM Time Base Count Direction Status bit
1= PWM time base counts down
0= PWM time base counts up
bit 5-0
Unimplemented: Read as ‘0’
DS39616D-page 178
2010 Microchip Technology Inc.