PIC18F2423/2523/4423/4523
DS39755B-page 382 Preliminary © 2007 Microchip Technology Inc.
Pin Functions
MCLR/VPP/RE3 ....................................................12, 16
OSC1/CLKI/RA7 ..................................................12, 16
OSC2/CLKO/RA6 ................................................12, 16
RA0/AN0 .............................................................. 13, 17
RA1/AN1 .............................................................. 13, 17
RA2/AN2/VREF-/CVREF ........................................ 13, 17
RA3/AN3/VREF+ ...................................................13, 17
RA4/T0CKI/C1OUT ..............................................13, 17
RA5/AN4/SS/HLVDIN/C2OUT .............................13, 17
RB0/INT0/FLT0/AN12 ..........................................14, 18
RB1/INT1/AN10 ...................................................14, 18
RB2/INT2/AN8 .....................................................14, 18
RB3/AN9/CCP2 ...................................................14, 18
RB4/KBI0/AN11 ...................................................14, 18
RB5/KBI1/PGM ....................................................14, 18
RB6/KBI2/PGC ....................................................14, 18
RB7/KBI3/PGD ....................................................14, 18
RC0/T1OSO/T13CKI ...........................................15, 19
RC1/T1OSI/CCP2 ................................................ 15, 19
RC2/CCP1 .................................................................15
RC2/CCP1/P1A .........................................................19
RC3/SCK/SCL .....................................................15, 19
RC4/SDI/SDA ......................................................15, 19
RC5/SDO .............................................................15, 19
RC6/TX/CK ..........................................................15, 19
RC7/RX/DT ..........................................................15, 19
RD0/PSP0 ..................................................................20
RD1/PSP1 ..................................................................20
RD2/PSP2 ..................................................................20
RD3/PSP3 ..................................................................20
RD4/PSP4 ..................................................................20
RD5/PSP5/P1B .......................................................... 20
RD6/PSP6/P1C ..........................................................20
RD7/PSP7/P1D ..........................................................20
RE0/RD/AN5 .............................................................. 21
RE1/WR/AN6 ............................................................. 21
RE2/CS/AN7 .............................................................. 21
VDD .......................................................................15, 21
VSS .......................................................................15, 21
Pinout I/O Descriptions
PIC18F2423/2523 ...................................................... 12
PIC18F4423/4523 ...................................................... 16
PIR Regist e rs .................. ............... ......................... ...........96
PLL Frequency Multiplier ...................................................25
HSPLL Oscillator Mode ......................... .... .... .... .........25
Use with INTOSC .......................................................25
POP ..................................................................................300
POR. See Power-on Reset.
PORTA
Associ a te d Re g i sters ............................ ...................107
LATA Register ..........................................................105
PORTA Register ......................................................105
TRISA Register ........................................................105
PORTB
Associ a te d Re g i sters ............................ ...................110
LATB Register ..........................................................108
PORTB Register ......................................................108
RB7:RB4 Interrupt-on-Change Flag (RBIF Bit) ..........108
TRISB Register ........................................................108
PORTC
Associ a te d Re g i sters ............................ ...................113
LATC Register .........................................................111
PORTC Register ......................................................111
RC3/SCK/SCL Pin ......... .............. .......................... ..177
TRISC Register ......... ............... ............... .................111
PORTD
Associ a te d Re g i sters ..... ............... ................... ........ 116
LATD Register ......................................................... 114
Para ll e l Sl a ve Po r t ( PSP) Fun ctio n ............ ..... ...... .. . 114
PORTD Register ...................................................... 114
TRISD Regist e r ...... .............. ............... ..................... 114
PORTE
Associ a te d Re g i sters ..... ............... ................... ........ 119
LATE Register .. ................... .............................. ...... 117
PORTE Register ...................................................... 117
PSP Mode Select (PSPM OD E Bit) .......................... 114
TRISE Register ........................................................ 117
Power-Managed Modes ............................................... .... .. 33
and A/D Operation ................................................... 234
and Multiple Sleep Commands .................................. 34
and PWM Operation ................................................ 159
and SPI Operation ................................................... 169
Clock Transitions and Status Indicators .................... 34
Effects on Clock Sources ........................................... 31
Entering ..................................................................... 33
Exiting Idle and Sleep Modes ..................... ........... ....39
by Interrupt ........................................................ 39
by Reset ............................................................ 39
by WDT Time-out .............................................. 39
Without a Start-up Delay ................ .. ......... .... .. .. 40
Idle Modes ................................................................. 37
PRI_IDLE ........................................................... 38
RC_IDLE ...........................................................39
SEC_IDLE ......................................................... 38
Run Modes ................................................................ 34
PRI_RUN ...........................................................34
RC_RUN ............................................................ 35
SEC_RUN .........................................................34
Selecting .................................................................... 33
Sleep Mode ............................................................... 37
Summary (table) ................................... ..................... 33
Power-on Reset (POR) ...................................................... 43
Time-out Sequence .................................. .. ......... .. .... 45
Power-up Delays ............................................................... 31
Power-up Timer (PWRT) ................................................... 31
Prescaler
Timer2 ..................................................................... 150
Presca le r, Timer0 ...................... ................... ............... .... 125
Presca le r, Timer2 ...................... ................... ............... .... 145
PRI_IDLE Mode ................................................................. 38
PRI_RUN Mode ................................................................. 34
Program Counter ........ ....................................................... 54
PCL, PCH and PCU Registers .................................. 54
PCLATH and PCLATU Registers ............... ....... .... .... 54
Program Mem ory
and Extended Instruction Set .................................... 72
Code Protection .. ..................................................... 268
Instructions ................................................................ 58
Two-Word .......................................................... 58
Interrupt Vector .......................................................... 53
Look-up Tables ...................... ....... .. .... .. .... ....... .... .. .... 56
Map and Stack (diagram) .......................................... 53
Reset Vec to r .................... .............................. ............ 53
Program Verification and Code Protection ...................... 267
Associ a te d Re g i sters ..... ............... ................... ........ 267
PSP. See Parallel Slave Port.
Pulse-Width Modulation. See PWM (CCP Module)
and PWM (ECCP Module).
PUSH ............................................................................... 300
PUSH and PO P In structions ............... ............................... 55
PUSHL ............................................................................. 316