English
Language : 

PIC18F2331 Datasheet, PDF (188/396 Pages) Microchip Technology – 28/40/44-Pin Enhanced Flash Microcontrollers with nanoWatt Technology, High Performance PWM and A/D
PIC18F2331/2431/4331/4431
REGISTER 17-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
PTOPS3 PTOPS2 PTOPS1 PTOPS0 PTCKPS1 PTCKPS0 PTMOD1
bit 7
R/W-0
PTMOD0
bit 0
bit 7-4
bit 3-2
bit 1-0
PTOPS3:PTOPS0: PWM Time Base Output Postscale Select bits
0000 =1:1 Postscale
0001 =1:2 Postscale
.
.
.
1111 =1:16 Postscale
PTCKPS1:PTCKPS0: 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)
PTMOD1:PTMOD0: PWM Time Base Mode Select bits
11 =PWM time base operates in a Continuous Up/Down mode with interrupts for double PWM
updates.
10 =PWM time base operates in a Continuous Up/Down Counting mode.
01 =PWM time base configured for Single-shot mode.
00 =PWM time base operates in a Free Running mode.
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
REGISTER 17-2: PTCON1: PWM TIMER CONTROL REGISTER 1
R/W-0
R-0
U-0
U-0
U-0
U-0
U-0
U-0
PTEN
PTDIR
—
—
—
—
—
—
bit 7
bit 0
bit 7
bit 6
bit 5-0
PTEN: PWM Time Base Timer Enable bit
1 = PWM time base is ON
0 = PWM time base is OFF
PTDIR: PWM Time Base Count Direction Status bit
1 = PWM time base counts down.
0 = PWM time base counts up.
Unimplemented: Read as ‘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
DS39616B-page 186
Preliminary
 2003 Microchip Technology Inc.