English
Language : 

PIC18F2331 Datasheet, PDF (389/396 Pages) Microchip Technology – 28/40/44-Pin Enhanced Flash Microcontrollers with nanoWatt Technology, High Performance PWM and A/D
PIC18F2331/2431/4331/4431
RD5/PWM4 ................................................................ 18
RD6/PWM6 ................................................................ 18
RD7/PWM7 ................................................................ 18
RE0/AN6 .................................................................... 19
RE1/AN7 .................................................................... 19
RE2/AN8 .................................................................... 19
VDD ....................................................................... 14, 19
VSS ....................................................................... 14, 19
Pinout I/O Descriptions
PIC18F2331/2431 ...................................................... 12
PIC18F4331/4431 ...................................................... 15
PIR Registers ..................................................................... 96
PLL Lock Time-out ............................................................. 46
Pointer, FSRn ..................................................................... 71
POP .................................................................................. 316
POR. See Power-on Reset.
PORTA
Associated Registers ............................................... 111
LATA Register .......................................................... 107
PORTA Register ...................................................... 107
TRISA Register ........................................................ 107
PORTB
Associated Registers ............................................... 117
LATB Register .......................................................... 112
PORTB Register ...................................................... 112
RB7:RB4 Interrupt-on-Change Flag (RBIF Bit) ........ 112
TRISB Register ........................................................ 112
PORTC
Associated Registers ............................................... 123
LATC Register ......................................................... 118
PORTC Register ...................................................... 118
TRISC Register ........................................................ 118
PORTD
Associated Registers ............................................... 128
LATD Register ......................................................... 124
PORTD Register ...................................................... 124
TRISD Register ........................................................ 124
PORTE
Associated Registers ............................................... 132
LATE Register .......................................................... 129
PORTE Register ...................................................... 129
TRISE Register ........................................................ 129
Postscaler, WDT
Assignment (PSA Bit) .............................................. 135
Rate Select (T0PS2:T0PS0 Bits) ............................. 135
Power-Managed Modes ..................................................... 31
Entering ...................................................................... 32
Idle Modes ................................................................. 33
Run Modes ................................................................. 38
Selecting .................................................................... 31
Sleep Mode ................................................................ 33
Summary (table) ........................................................ 31
Wake from .................................................................. 40
Power-on Reset (POR) .............................................. 46, 267
Oscillator Start-up Timer (OST) ......................... 46, 267
Power-up Timer (PWRT) ................................... 46, 267
Time-out Sequence .................................................... 46
Power-up Delays ................................................................ 29
Power-up Timer (PWRT) .............................................. 29, 46
Prescaler, Capture ........................................................... 153
Prescaler, Timer0 ............................................................. 135
Assignment (PSA Bit) .............................................. 135
Rate Select (T0PS2:T0PS0 Bits) ............................. 135
Prescaler, Timer2 ............................................................. 157
PRO MATE II Universal Device Programmer .................. 333
 2003 Microchip Technology Inc.
Program Counter
PCL Register ............................................................. 60
PCLATH Register ...................................................... 60
PCLATU Register ...................................................... 60
Program Memory
Interrupt Vector .......................................................... 57
Map and Stack
PIC18F2331/4331 ............................................. 57
PIC18F2431/4431 ............................................. 57
Reset Vector .............................................................. 57
Program Memory Code Protection .................................. 284
Program Verification ........................................................ 283
Program Verification and Code Protection
Associated Registers ............................................... 283
Programming, Device Instructions ................................... 287
Pulse Width Modulation. See PWM (CCP Module)
and PWM (ECCP Module).
PUSH ............................................................................... 316
PUSH and POP Instructions .............................................. 59
PWM (CCP Module) ........................................................ 156
Associated Registers ............................................... 157
CCPR1H:CCPR1L Registers ................................... 156
Duty Cycle ............................................................... 156
Example Frequencies/Resolutions .......................... 157
Period ...................................................................... 156
Set-up for PWM Operation ...................................... 157
TMR2 to PR2 Match .........................................143, 156
Q
Q Clock ............................................................................ 157
QEI Sampling Modes ....................................................... 172
R
R/W bit .............................................................. 212, 218, 219
RAM. See Data Memory.
RC Oscillator ...................................................................... 23
RCIO Oscillator Mode ................................................ 23
RCALL ............................................................................. 317
RCON Register
Bit Status During Initialization .................................... 47
Bits and Positions ...................................................... 47
RCSTA Register
SPEN Bit .................................................................. 221
Receive Overflow Indicator Bit (SSPOV) ......................... 213
Register File ....................................................................... 63
Registers
BAUDCTL (Baud Rate Control) ............................... 224
CCPxCON (Capture/Compare/PWM Control) ......... 151
CONFIG1H (Configuration 1 High) .......................... 268
CONFIG2H (Configuration 2 High) ...................270, 271
CONFIG2L (Configuration 2 Low) ........................... 269
CONFIG3H (Configuration 3 High) .......................... 272
CONFIG4L (Configuration 4 Low) ........................... 273
CONFIG5H (Configuration 5 High) .......................... 274
CONFIG6H (Configuration 6 High) .......................... 275
CONFIG6L (Configuration 6 Low) ........................... 275
CONFIG7H (Configuration 7 High) .......................... 276
CONFIG7L (Configuration 7 Low) ........................... 276
Device ID Register 1 ................................................ 277
Device ID Register 2 ................................................ 277
EECON1 (Data EEPROM Control 1) ....................77, 86
INTCON (Interrupt Control) ........................................ 93
INTCON2 (Interrupt Control 2) ................................... 94
INTCON3 (Interrupt Control 3) ................................... 95
IPR1 (Peripheral Interrupt Priority 1) ....................... 102
IPR2 (Peripheral Interrupt Priority 2) ....................... 103
DS39616B-page 387