English
Language : 

PIC18F2331_07 Datasheet, PDF (188/400 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
PTOPS3
bit 7
R/W-0
PTOPS2
R/W-0
PTOPS1
R/W-0
PTOPS0
R/W-0
PTCKPS1
R/W-0
PTCKPS0
R/W-0
PTMOD1
R/W-0
PTMOD0
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
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 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 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
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
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’
DS39616C-page 186
Preliminary
© 2007 Microchip Technology Inc.