Beruflich Dokumente
Kultur Dokumente
Data Sheet
28/40/44-Pin, Enhanced Flash
Microcontrollers with 12-Bit A/D
and nanoWatt Technology
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchips Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as unbreakable.
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchips code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
CCP/
12-Bit Timers
Device Flash # Single-Word SRAM EEPROM I/O ECCP Master Comp.
A/D (ch) SPI 8/16-Bit
(bytes) Instructions (bytes) (bytes) (PWM) I2C
PIC18F2423 16K 8192 768 256 25 10 2/0 Y Y 1 2 1/3
PIC18F2523 32K 16384 1536 256 25 10 2/0 Y Y 1 2 1/3
PIC18F4423 16K 8192 768 256 36 13 1/1 Y Y 1 2 1/3
PIC18F4523 32K 16384 1536 256 36 13 1/1 Y Y 1 2 1/3
MCLR/VPP/RE3 1 28 RB7/KBI3/PGD
RA0/AN0 2 27 RB6//KBI2/PGC
RA1/AN1 3 26 RB5/KBI1/PGM
RA2/AN2/VREF-/CVREF 4 25 RB4/KBI0/AN11
RA3/AN3/VREF+ 5 24 RB3/AN9/CCP2(2)
PIC18F2423
PIC18F2523
RA4/T0CKI/C1OUT 6 23 RB2/INT2/AN8
RA5/AN4/SS/HLVDIN/C2OUT 7 22 RB1/INT1/AN10
VSS 8 21 RB0/INT0/FLT0/AN12
OSC1/CLKI(3)/RA7 9 20 VDD
OSC2/CLKO(3)/RA6 10 19 VSS
RC0/T1OSO/T13CKI 11 18 RC7/RX/DT
RC1/T1OSI/CCP2(2) 12 17 RC6/TX/CK
RC2/CCP1 13 16 RC5/SDO
RC3/SCK/SCL 14 15 RC4/SDI/SDA
28-Pin QFN(1)
MCLR/VPP/RE3
RB5/KBI1/PGM
RB4KBI0/AN11
RB7/KBI3/PGD
RB6/KBI2/PGC
RA1/AN1
RA0/AN0
28 27 26 25 24 23 22
RA2/AN2/VREF-/CVREF 1 21 RB3/AN9/CCP2(2)
RA3/AN3/VREF+ 2 20 RB2/INT2/AN8
RA4/T0CKI/C1OUT 3 PIC18F2423 19 RB1/INT1/AN10
RA5/AN4/SS/HLVDIN/C2OUT 4 18 RB0/INT0/FLT0/AN12
VSS
PIC18F2523
5 17 VDD
OSC1/CLKI(3)/RA7 6 16 VSS
(3)
OSC2/CLKO /RA6 7 15 RC7/RX/DT
8 9 10 11 12 13 14
RC0/T1OSO/T13CKI
RC5/SDO
RC4/SDI/SDA
RC1/T1OSI/CCP2(2)
RC2/CCP1
RC3/SCK/SCL
RC6/TX/CK
Note 1: It is recommended to connect the bottom pad of QFN package parts to VSS.
2: RB3 is the alternate pin for CCP2 multiplexing.
3: OSC1/CLKI and OSC2/CLKO are only available in select oscillator modes and when these pins are not
being used as digital I/O. For additional information, see Section 2.0 Oscillator Configurations of the
PIC18F2420/2520/4420/4520 Data Sheet (DS39631).
MCLR/VPP/RE3 1 40 RB7/KBI3/PGD
RA0/AN0 2 39 RB6/KBI2/PGC
RA1/AN1 3 38 RB5/KBI1/PGM
RA2/AN2/VREF-/CVREF 4 37 RB4/KBI0/AN11
RA3/AN3/VREF+ 5 36 RB3/AN9/CCP2(1)
RA4/T0CKI/C1OUT 6 35 RB2/INT2/AN8
RA5/AN4/SS/HLVDIN/C2OUT 7 34 RB1/INT1/AN10
8 RB0/INT0/FLT0/AN12
PIC18F4423
PIC18F4523
RE0/RD/AN5 33
RE1/WR/AN6 9 32 VDD
RE2/CS/AN7 10 31 VSS
VDD 11 30 RD7/PSP7/P1D
VSS 12 29 RD6/PSP6/P1C
O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 OSC1/CLKI(3)/RA7
RD5/PSP5/P1B 3 31 VSS
RD6/PSP6/P1C 4 30 VSS
RD7/PSP7/P1D 5 PIC18F4423 29 VDD
VSS 6 28 VDD
VDD 7 PIC18F4523 27 RE2/CS/AN7
VDD 8 26 RE1/WR/AN6
RB0/INT0/FLT0/AN12 9 25 RE0/RD/AN5
RB1/INT1/AN10 10 24 RA5/AN4/SS/HLVDIN/C2OUT
RB2/INT2/AN8 11 23 RA4/T0CKI/C1OUT
12
13
14
15
16
17
18
19
20
21
22
RA2/AN2/VREF-/CVREF
NC
RB6/KBI2/PGC
RB7/KBI3/PGD
RA3/AN3/VREF+
RB3/AN9/CCP2(2)
RB5/KBI1/PGM
RB4/KBI0/AN11
MCLR/VPP/RE3
RA0/AN0
RA1/AN1
Note 1: It is recommended to connect the bottom pad of QFN package parts to VSS.
2: RB3 is the alternate pin for CCP2 multiplexing.
3: OSC1/CLKI and OSC2/CLKO are only available in select oscillator modes and when these pins are not
being used as digital I/O. For additional information, see Section 2.0 Oscillator Configurations of the
PIC18F2420/2520/4420/4520 Data Sheet (DS39631).
Errata
An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current
devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision
of silicon and revision of document to which it applies.
To determine if an errata sheet exists for a particular device, please check with one of the following:
Microchips Worldwide Web site; http://www.microchip.com
Your local Microchip sales office (see last page)
When contacting a sales office, please specify which device, revision of silicon and data sheet (include literature number) you are
using.
Data Bus<8>
Table Pointer<21>
8
Instruction State Machine
Decode and Control Signals
Control
PRODH PRODL
PORTC
8 x 8 Multiply RC0/T1OSO/T13CKI
3 8 RC1/T1OSI/CCP2(1)
RC2/CCP1
BITOP W RC3/SCK/SCL
8 8 8 RC4/SDI/SDA
Internal RC5/SDO
OSC1(3) Power-up RC6/TX/CK
Oscillator 8 8
Block Timer RC7/RX/DT
OSC2(3) Oscillator ALU<8>
INTRC Start-up Timer
T1OSI Oscillator Power-on 8
Reset
8 MHz
T1OSO Oscillator Watchdog
Timer
Precision
Single-Supply Brown-out Band Gap
MCLR(2) Reset PORTE
Programming Reference
In-Circuit Fail-Safe
VDD, VSS Clock Monitor
Debugger MCLR/VPP/RE3(2)
BOR Data
EEPROM Timer0 Timer1 Timer2 Timer3
HLVD
ADC
Comparator CCP1 CCP2 MSSP EUSART 12-Bit
Note 1: CCP2 is multiplexed with RC1 when Configuration bit, CCP2MX, is set or RB3 when CCP2MX is not set.
2: RE3 is only available when MCLR functionality is disabled.
3: OSC1/CLKI and OSC2/CLKO are only available in select oscillator modes and when these pins are not being used as digital I/O.
For additional information, see Section 2.0 Oscillator Configurations of the PIC18F2420/2520/4420/4520 Data Sheet (DS39631).
Data Bus<8>
Table Pointer<21> PORTA
RA0/AN0
Data Latch RA1/AN1
inc/dec logic 8 8
RA2/AN2/VREF-/CVREF
Data Memory RA3/AN3/VREF+
PCLATU PCLATH ( 3.9 Kbytes ) RA4/T0CKI/C1OUT
21
RA5/AN4/SS/HLVDIN/C2OUT
20 Address Latch
PCU PCH PCL OSC2/CLKO(3)/RA6
OSC1/CLKI(3)/RA7
Program Counter 12
Data Address<12>
PORTB
31 Level Stack RB0/INT0/FLT0/AN12
Address Latch 4 12 4
RB1/INT1/AN10
BSR Access
Program Memory STKPTR FSR0 Bank RB2/INT2/AN8
(16/32 Kbytes) FSR1 RB3/AN9/CCP2(1)
Data Latch FSR2 12 RB4/KBI0/AN11
RB5/KBI1/PGM
RB6/KBI2/PGC
inc/dec
8 logic RB7/KBI3/PGD
Table Latch
8 x 8 Multiply
3 8 PORTD
RD0/PSP0:RD4/PSP4
BITOP W
8 8 RD5/PSP5/P1B
8
RD6/PSP6/P1C
OSC1(3) Internal RD7/PSP7/P1D
Oscillator Power-up
Timer 8 8
Block
OSC2(3) Oscillator ALU<8>
INTRC Start-up Timer
T1OSI Oscillator Power-on 8
Reset
8 MHz
T1OSO Oscillator Watchdog PORTE
Timer
Precision RE0/RD/AN5
Single-Supply Brown-out Band Gap RE1/WR/AN6
MCLR(2)
Programming Reset Reference RE2/CS/AN7
In-Circuit Fail-Safe MCLR/VPP/RE3(2)
VDD, VSS Debugger Clock Monitor
BOR Data
EEPROM Timer0 Timer1 Timer2 Timer3
HLVD
ADC
Comparator ECCP1 CCP2 MSSP EUSART 12-Bit
Note 1: CCP2 is multiplexed with RC1 when Configuration bit, CCP2MX, is set or RB3 when CCP2MX is not set.
2: RE3 is only available when MCLR functionality is disabled.
3: OSC1/CLKI and OSC2/CLKO are only available in select oscillator modes and when these pins are not being used as digital I/O.
For additional information, see Section 2.0 Oscillator Configurations of the PIC18F2420/2520/4420/4520 Data Sheet (DS39631).
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as 0
-n = Value at POR 1 = Bit is set 0 = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as 0
-n = Value at POR 1 = Bit is set 0 = Bit is cleared x = Bit is unknown
AN7(2)
AN6(2)
AN5(2)
AN12
AN10
AN11
AN9
AN8
AN4
AN3
AN2
AN1
AN0
PCFG<3:0>
0000(1) A A A A A A A A A A A A A
0001 A A A A A A A A A A A A A
0010 A A A A A A A A A A A A A
0011 D A A A A A A A A A A A A
0100 D D A A A A A A A A A A A
0101 D D D A A A A A A A A A A
0110 D D D D A A A A A A A A A
0111(1) D D D D D A A A A A A A A
1000 D D D D D D A A A A A A A
1001 D D D D D D D A A A A A A
1010 D D D D D D D D A A A A A
1011 D D D D D D D D D A A A A
1100 D D D D D D D D D D A A A
1101 D D D D D D D D D D D A A
1110 D D D D D D D D D D D D A
1111 D D D D D D D D D D D D D
A = Analog input D = Digital I/O
Note 1: The POR value of the PCFG bits depends on the value of the PBADEN Configuration bit. When
PBADEN = 1, PCFG<3:0> = 0000; when PBADEN = 0, PCFG<3:0> = 0111.
2: AN5 through AN7 are only available on PIC18F4423/4523 devices.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as 0
-n = Value at POR 1 = Bit is set 0 = Bit is cleared x = Bit is unknown
Note 1: If the A/D FRC clock source is selected, a delay of one TCY (instruction cycle) is added before the A/D
clock starts. This allows the SLEEP instruction to be executed before starting a conversion.
CHS<3:0>
1100
AN12
1011
AN11
1010
AN10
1001
AN9
1000
AN8
0111
AN7(1)
0110
AN6(1)
0101
AN5(1)
0100
AN4
VAIN
12-Bit (Input Voltage) 0011
AN3
A/D
Converter 0010
AN2
0001
VCFG<1:0> AN1
VDD(2) 0000
AN0
X0
VREF+ X1
Reference 1X
Voltage
VREF- 0X
VSS(2)
Note 1: Channels, AN5 through AN7, are not available on PIC18F2423/2523 devices.
2: I/O pins have diode protection to VDD and VSS.
4094 LSB
4094.5 LSB
4095 LSB
4095.5 LSB
4. Start conversion by setting the GO/DONE bit
(ADCON0<1>).
VSS
FIGURE 2-5: A/D CONVERSION TAD CYCLES (ACQT<2:0> = 010, TACQ = 4 TAD)
1 2 3 4 1 2 3 4 5 6 7 8 9 10 11 12 13 TAD1
Automatic b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Acquisition
Time Conversion starts Discharge
(Holding capacitor is disconnected) (typically
Points to end of TACQT period (current black arrow) 200 ns)
3FFFFEh DEVID1(1) DEV3 DEV2 DEV1 DEV0 REV3 REV2 REV1 REV0 xxxx xxxx(2)
(1)
3FFFFFh DEVID2 DEV11 DEV10 DEV9 DEV8 DEV7 DEV6 DEV5 DEV4 xxxx xxxx(2)
Legend: x = unknown, u = unchanged, = unimplemented. Shaded cells are unimplemented, read as 0.
Note 1: DEVID registers are read-only and cannot be programmed by the user.
2: See Register 3-1 and Register 3-2 for DEVID1 and DEVID2 values.
Legend:
R = Read-only bit P = Programmable bit U = Unimplemented bit, read as 0
-n = Value when device is unprogrammed u = Unchanged from programmed state
Legend:
R = Read-only bit P = Programmable bit U = Unimplemented bit, read as 0
-n = Value when device is unprogrammed u = Unchanged from programmed state
Note 1: These values for DEV<11:4> may be shared with other devices. The specific device is always identified by
using the entire DEV<11:0> bit sequence.
NOTICE: Stresses above those listed under Absolute Maximum Ratings may cause permanent damage to the
device. This is a stress rating only and functional operation of the device at those or any other conditions above those
indicated in the operation listings of this specification is not implied. Exposure to maximum rating conditions for
extended periods may affect device reliability.
6.0V
5.5V
5.0V PIC18F2423/2523/4423/4523
4.5V
Voltage
4.2V
4.0V
3.5V
3.0V
2.5V
2.0V
40 MHz
Frequency
6.0V
5.5V
5.0V PIC18F2423/2523/4423/4523
4.5V
Voltage
4.2V
4.0V
3.5V
3.0V
2.5V
2.0V
25 MHz
Frequency
6.0V
5.5V
5.0V
PIC18LF2423/2523/4423/4523
4.5V
Voltage
4.2V
4.0V
3.5V
3.0V
2.5V
2.0V
4 MHz 40 MHz
Frequency
Note: VDDAPPMIN is the minimum voltage of the PIC device in the application.
BSF ADCON0, GO
(Note 2)
131
Q4
130
A/D CLK(1) 132
ADIF TCY
GO DONE
SAMPLING STOPPED
SAMPLE
Note 1: If the A/D clock source is selected as RC, a time of TCY is added before the A/D clock starts. This allows the SLEEP instruction
to be executed.
2: This is a minimal RC delay (typically 100 ns), which also disconnects the holding capacitor from the analog input.
From: Name
Company
Address
City / State / ZIP / Country
Telephone: (_______) _________ - _________ FAX: (______) _________ - _________
Application (optional):
Would you like a reply? Y N
Questions:
2. How does this document meet your hardware and software development needs?
3. Do you find the organization of this document easy to follow? If not, why?
4. What additions to the document do you think would enhance the structure and subject?
5. What deletions from the document could be made without affecting the overall usefulness?
03/26/09