




























































































Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Esta página não é visível na pré-visualização
Não perca as partes importantes!





























































































Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WAR- RANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip’s products as critical components in life support systems is not authorized except with express written approval by Microchip. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.
Trademarks The Microchip name and logo, the Microchip logo, Accuron, dsPIC, K EE L OQ , microID, MPLAB, PIC, PICmicro, PICSTART, PRO MATE, PowerSmart, rfPIC, and SmartShunt are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. AmpLab, FilterLab, Migratable Memory, MXDEV, MXLAB, PICMASTER, SEEVAL, SmartSensor and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, dsPICDEM, dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, MPASM, MPLIB, MPLINK, MPSIM, PICkit, PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel and Total Endurance are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. © 2004, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper.
Note the following details of the code protection feature on Microchip devices:
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s 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.
Microchip received ISO/TS-16949:2002 quality system certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona and Mountain View, California in October 2003. The Company’s quality system processes and procedures are for its PICmicro®^ 8-bit MCUs, KEE L OQ ®^ code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified.
11
2 3 4 5 6
1
8
7
9
12 13 14 15
16
17
18
19
20
23
24
25
26
27
28
22 21
MCLR/V PP /RE RA0/AN RA1/AN RA2/AN2/VREF-/CVREF RA3/AN3/VREF + RA4/T0CKI/C1OUT/RCV RA5/AN4/SS/HLVDIN/C2OUT V SS OSC1/CLKI OSC2/CLKO/RA RC0/T1OSO/T13CKI RC1/T1OSI/CCP2 (1) /UOE RC2/CCP V USB
RB7/KBI3/PGD RB6/KBI2/PGC RB5/KBI1/PGM RB4/AN11/KBI RB3/AN9/CCP2 (1) /VPO RB2/AN8/INT2/VMO RB1/AN10/INT1/SCK/SCL RB0/AN12/INT0/FLT0/SDI/SDA V DD V SS RC7/RX/DT/SDO RC6/TX/CK RC5/D+/VP RC4/D-/VM
RB7/KBI3/PGD RB6/KBI2/PGC RB5/KBI1/PGM RB4/AN11/KBI0/CSSPP RB3/AN9/CCP2 (1) /VPO RB2/AN8/INT2/VMO RB1/AN10/INT1/SCK/SCL RB0/AN12/INT0/FLT0/SDI/SDA VDD VSS RD7/SPP7/P1D RD6/SPP6/P1C RD5/SPP5/P1B RD4/SPP RC7/RX/DT/SDO RC6/TX/CK RC5/D+/VP RC4/D-/VM RD3/SPP RD2/SPP
MCLR/V PP /RE RA0/AN RA1/AN RA2/AN2/VREF-/CVREF RA3/AN3/VREF + RA4/T0CKI/C1OUT/RCV RA5/AN4/SS/HLVDIN/C2OUT RE0/AN5/CK1SPP RE1/AN6/CK2SPP RE2/AN7/OESPP V DD VSS OSC1/CLKI OSC2/CLKO/RA RC0/T1OSO/T13CKI RC1/T1OSI/CCP2 (1) /UOE RC2/CCP1/P1A VUSB RD0/SPP RD1/SPP
1 2 3 4 5 6 7 8 9
10 11 12 13 14 15 16 17 18 19 20
40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21
Note 1: RB3 is the alternate pin for CCP2 multiplexing.
10 11
2 3
6
1
(^121314151819202122)
38
8
7
444342414039
1617
29
30
31
32
33
23
24
25
26
27
28
363534
9
37
RA3/AN3/V
REF
RA2/AN2/V
REF
-/CV
REF
RA0/AN0RA1/AN
MCLR/V
PP
/RE
NC/ICCK
(2)
/ICPGC
(2)
RB5/KBI1/PGMRB6/KBI2/PGC^ RB7/KBI3/PGD
RB4/AN11/KBI0/CSSPP
NC/ICDT
(2)
/ICPGD
(2)
RC6/TX/CKRC5/D+/VPRC4/D-/VMRD3/SPP3RD2/SPP2RD1/SPP1RD0/SPP0VUSBRC2/CCP1/P1ARC1/T1OSI/CCP
(1)
/UOE
NC/ICPORTS
(2)
NC/ICRST (2) /ICV PP (2) RC0/T1OSO/T13CKI OSC2/CLKO/RA OSC1/CLKI V SS V DD RE2/AN7/OESPP RE1/AN6/CK2SPP RE0/AN5/CK1SPP RA5/AN4/SS/HLVDIN/C2OUT RA4/T0CKI/C1OUT/RCV
RC7/RX/DT/SDO RD4/SPP RD5/SPP5/P1B RD6/SPP6/P1C
V SS VDD RB0/AN12/INT0/FLT0/SDI/SDA RB1/AN10/INT1/SCK/SCL RB2/AN8/INT2/VMO RB3/AN9/CCP2 (1) /VPO
RD7/SPP7/P1D 5
4
10 11
2 3
6
1
12131415 1819202122
38
8
7
444342414039
1617
29
30
31
32
33
23
24
25
26
27
28
363534
9
37
RA3/AN3/V
REF
RA2/AN2/V
REF
-/CV
REF
RA0/AN0RA1/AN
MCLR/V
PP
/RE
RB5/KBI1/PGMRB6/KBI2/PGCRB7/KBI3/PGD
RB4/AN11/KBI0/CSSPP
NC
RC6/TX/CKRC5/D+/VPRC4/D-/VMRD3/SPP3RD2/SPP2RD1/SPP1RD0/SPP0VUSBRC2/CCP1/P1ARC1/T1OSI/CCP
(1)
/UOE
RC0/T1OSO/T13CKI
OSC2/CLKO/RA OSC1/CLKI V SS
V DD RE2/AN7/OESPP RE1/AN6/CK2SPP RE0/AN5/CK1SPP RA5/AN4/SS/HLVDIN/C2OUT RA4/T0CKI/C1OUT/RCV
RC7/RX/DT/SDO RD4/SPP RD5/SPP5/P1B RD6/SPP6/P1C V SS VDD RB0/AN12/INT0/FLT0/SDI/SDA RB1/AN10/INT1/SCK/SCL RB2/AN8/INT2/VMO
RB3/AN9/CCP
(1)
/VPO
RD7/SPP7/P1D 5
4 V^ SS V DD VDD
Note 1: RB3 is the alternate pin for CCP2 multiplexing. 2: Special ICPORTS features available in select circumstances. See Section 25.9 “Special ICPORT Features (Designated Packages Only)” for more information.
It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip products. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined and enhanced as new volumes and updates are introduced. If you have any questions or comments regarding this publication, please contact the Marketing Communications Department via E-mail at [email protected] or fax the Reader Response Form in the back of this data sheet to (480) 792-4150. We welcome your feedback.
To obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at: http://www.microchip.com You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page. The last character of the literature number is the version number, (e.g., DS30000A is version A of document DS30000).
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:
Register on our web site at www.microchip.com to receive the most current information on all of our products.
Devices in the PIC18F2455/2550/4455/4550 family are available in 28-pin and 40/44-pin packages. Block diagrams for the two groups are shown in Figure 1- and Figure 1-2. The devices are differentiated from each other in six ways:
Features PIC18F2455 PIC18F2550 PIC18F4455 PIC18F
Operating Frequency DC – 48 MHz DC – 48 MHz DC – 48 MHz DC – 48 MHz Program Memory (Bytes) 24576 32768 24576 32768 Program Memory (Instructions) 12288 16384 12288 16384 Data Memory (Bytes) 2048 2048 2048 2048 Data EEPROM Memory (Bytes) 256 256 256 256 Interrupt Sources 19 19 20 20 I/O Ports Ports A, B, C, (E) Ports A, B, C, (E) Ports A, B, C, D, E Ports A, B, C, D, E Timers 4 4 4 4 Capture/Compare/PWM Modules 2 2 1 1 Enhanced Capture/ Compare/PWM Modules
Serial Communications MSSP, Enhanced USART
Enhanced USART
Enhanced USART
Enhanced USART Universal Serial Bus (USB) Module
Streaming Parallel Port (SPP) No No Yes Yes 10-bit Analog-to-Digital Module 10 Input Channels 10 Input Channels 13 Input Channels 13 Input Channels Comparators 2 2 2 2 Resets (and Delays) POR, BOR, RESET Instruction, Stack Full, Stack Underflow (PWRT, OST), MCLR (optional), WDT
RESET Instruction, Stack Full, Stack Underflow (PWRT, OST), MCLR (optional), WDT
RESET Instruction, Stack Full, Stack Underflow (PWRT, OST), MCLR (optional), WDT
RESET Instruction, Stack Full, Stack Underflow (PWRT, OST), MCLR (optional), WDT Programmable Low-Voltage Detect
Yes Yes Yes Yes
Programmable Brown-out Reset Yes Yes Yes Yes Instruction Set 75 Instructions; 83 with Extended Instruction Set enabled
75 Instructions; 83 with Extended Instruction Set enabled
75 Instructions; 83 with Extended Instruction Set enabled
75 Instructions; 83 with Extended Instruction Set enabled Packages 28-pin PDIP 28-pin SOIC
28-pin PDIP 28-pin SOIC
40-pin PDIP 44-pin QFN 44-pin TQFP
40-pin PDIP 44-pin QFN 44-pin TQFP
Instruction Decode & Control
Data Latch Data Memory (2 Kbytes) Address Latch
Data Address<12>
12
BSR Access
4 4
PCH PCL
PCLATH
8
31 Level Stack
Program Counter
PRODHPRODL
8 x 8 Multiply
8
BITOP 8 8
ALU<8>
Address Latch Program Memory (24/32 Kbytes) Data Latch
20
8
8
Table Pointer<21>
inc/dec logic
21
8
Data Bus<8>
Table Latch
8
IR
12
3
ROM Latch
PORTD
RD0/SPP0:RD4/SPP
PCLATU
PCU
PORTE
MCLR/VPP/RE3 (1)
RE2/AN7/OESPP
RE0/AN5/CK1SPP RE1/AN6/CK2SPP
Note 1: RE3 is multiplexed with MCLR and is only available when the MCLR Resets are disabled. 2: OSC1/CLKI and OSC2/CLKO are only available in select oscillator modes and when these pins are not being used as digital I/O. Refer to Section 2.0 “Oscillator Configurations” for additional information. 3: These pins are only available on 44-pin TQFP under certain conditions. Refer to Section 25.9 “Special ICPORT Features (Designated Packages Only)” for additional information. 4: RB3 is the alternate pin for CCP2 multiplexing.
Comparator MSSP^ EUSART 10-bitADC
Timer0 Timer1 Timer2 Timer
CCP
HLVD
ECCP
BOR Data EEPROM
W
Instruction Bus <16>
STKPTR (^) Bank
8
State Machine Control Signals
8
8
Power-up Timer Oscillator Start-up Timer Power-on Reset Watchdog Timer
OSC1 (2) OSC2 (2)
VDD,
Brown-out Reset
Internal Oscillator
Fail-Safe Clock Monitor Reference
Band Gap
VSS
MCLR (1)
Block INTRC Oscillator 8 MHz Oscillator
Single-Supply Programming In-Circuit Debugger
T1OSI T1OSO
RD5/SPP5/P1B RD6/SPP6/P1C RD7/SPP7/P1D
PORTA
PORTB
PORTC
RA4/T0CKI/C1OUT/RCV RA5/AN4/SS/HLVDIN/C2OUT
RB0/AN12/INT0/FLT0/SDI/SDA
RC0/T1OSO/T13CKI RC1/T1OSI/CCP2 (4) /UOE RC2/CCP1/P1A RC4/D-/VM RC5/D+/VP RC6/TX/CK RC7/RX/DT/SDO
RA3/AN3/VREF+
RA2/AN2/VREF-/CVREF
RA1/AN
RA0/AN
RB1/AN10/INT1/SCK/SCL RB2/AN8/INT2/VMO RB3/AN9/CCP2 (4) /VPO
OSC2/CLKO/RA
RB4/AN11/KBI0/CSSPP RB5/KBI1/PGM RB6/KBI2/PGC RB7/KBI3/PGD
USB
FSR FSR FSR
inc/dec
Address
12
Decode
logic
USB Voltage Regulator VUSB
ICRST (3)
ICPGC (3) ICPGD (3) ICPORTS (3)
Pin Name
Pin Number (^) Pin Type
Buffer PDIP, Type^ Description SOIC MCLR/VPP/RE MCLR
VPP RE
Master Clear (input) or programming voltage (input). Master Clear (Reset) input. This pin is an active-low Reset to the device. Programming voltage input. Digital input. OSC1/CLKI OSC CLKI
Analog Analog
Oscillator crystal or external clock input. Oscillator crystal input or external clock source input. External clock source input. Always associated with pin function OSC1. (See OSC2/CLKO pins.) OSC2/CLKO/RA OSC
CLKO
RA
Oscillator crystal or clock output. Oscillator crystal output. Connects to crystal or resonator in Crystal Oscillator mode. In select modes, OSC2 pin outputs CLKO which has 1/4 the frequency of OSC1 and denotes the instruction cycle rate. General purpose I/O pin. Legend: TTL = TTL compatible input CMOS = CMOS compatible input or output ST = Schmitt Trigger input with CMOS levels I = Input O = Output P = Power Note 1: Alternate assignment for CCP2 when CCP2MX configuration bit is cleared. 2: Default assignment for CCP2 when CCP2MX configuration bit is set.
PORTB is a bidirectional I/O port. PORTB can be software programmed for internal weak pull-ups on all inputs. RB0/AN12/INT0/FLT0/ SDI/SDA RB AN INT FLT SDI SDA
Analog ST ST ST ST
Digital I/O. Analog input 12. External interrupt 0. PWM Fault input (CCP1 module). SPI™ data in. I 2 C™ data I/O. RB1/AN10/INT1/SCK/ SCL RB AN INT SCK SCL
Analog ST ST ST
Digital I/O. Analog input 10. External interrupt 1. Synchronous serial clock input/output for SPI mode. Synchronous serial clock input/output for I 2 C mode. RB2/AN8/INT2/VMO RB AN INT VMO
Analog ST —
Digital I/O. Analog input 8. External interrupt 2. External USB transceiver VMO output. RB3/AN9/CCP2/VPO RB AN CCP2 (1) VPO
Analog ST —
Digital I/O. Analog input 9. Capture 2 input/Compare 2 output/PWM 2 output. External USB transceiver VPO output. RB4/AN11/KBI RB AN KBI
Analog TTL
Digital I/O. Analog input 11. Interrupt-on-change pin. RB5/KBI1/PGM RB KBI PGM
Digital I/O. Interrupt-on-change pin. Low-Voltage ICSP™ Programming enable pin. RB6/KBI2/PGC RB KBI PGC
Digital I/O. Interrupt-on-change pin. In-Circuit Debugger and ICSP programming clock pin. RB7/KBI3/PGD RB KBI PGD
Digital I/O. Interrupt-on-change pin. In-Circuit Debugger and ICSP programming data pin.
Pin Name
Pin Number (^) Pin Type
Buffer PDIP, Type^ Description SOIC
Legend: TTL = TTL compatible input CMOS = CMOS compatible input or output ST = Schmitt Trigger input with CMOS levels I = Input O = Output P = Power Note 1: Alternate assignment for CCP2 when CCP2MX configuration bit is cleared. 2: Default assignment for CCP2 when CCP2MX configuration bit is set.
PORTC is a bidirectional I/O port. RC0/T1OSO/T13CKI RC T1OSO T13CKI
Digital I/O. Timer1 oscillator output. Timer1/Timer3 external clock input. RC1/T1OSI/CCP2/UOE RC T1OSI CCP2 (2) UOE
Digital I/O. Timer1 oscillator input. Capture 2 input/Compare 2 output/PWM 2 output. External USB transceiver OE output. RC2/CCP RC CCP
Digital I/O. Capture 1 input/Compare 1 output/PWM 1 output. RC4/D-/VM RC D- VM
Digital input. USB differential minus line (input/output). External USB transceiver VM input. RC5/D+/VP RC D+ VP
Digital input. USB differential plus line (input/output). External USB transceiver VP input. RC6/TX/CK RC TX CK
Digital I/O. EUSART asynchronous transmit. EUSART synchronous clock (see RX/DT). RC7/RX/DT/SDO RC RX DT SDO
Digital I/O. EUSART asynchronous receive. EUSART synchronous data (see TX/CK). SPI™ data out. RE3 — — — See MCLR/VPP/RE3 pin. VUSB 14 O — Internal USB 3.3V voltage regulator. VSS 8, 19 P — Ground reference for logic and I/O pins. VDD 20 P — Positive supply for logic and I/O pins.
Pin Name
Pin Number (^) Pin Type
Buffer PDIP, Type^ Description SOIC
Legend: TTL = TTL compatible input CMOS = CMOS compatible input or output ST = Schmitt Trigger input with CMOS levels I = Input O = Output P = Power Note 1: Alternate assignment for CCP2 when CCP2MX configuration bit is cleared. 2: Default assignment for CCP2 when CCP2MX configuration bit is set.
PORTA is a bidirectional I/O port. RA0/AN RA AN
Analog
Digital I/O. Analog input 0. RA1/AN RA AN
Analog
Digital I/O. Analog input 1. RA2/AN2/VREF-/ CVREF RA AN VREF - CVREF
Analog Analog Analog
Digital I/O. Analog input 2. A/D reference voltage (low) input. Analog comparator reference output. RA3/AN3/VREF + RA AN VREF +
Analog Analog
Digital I/O. Analog input 3. A/D reference voltage (high) input. RA4/T0CKI/C1OUT/ RCV RA T0CKI C1OUT RCV
Digital I/O. Timer0 external clock input. Comparator 1 output. External USB transceiver RCV input. RA5/AN4/SS/ HLVDIN/C2OUT RA AN SS HLVDIN C2OUT
Analog TTL Analog —
Digital I/O. Analog input 4. SPI™ slave select input. High/Low-Voltage Detect input. Comparator 2 output. RA6 — — — — — See the OSC2/CLKO/RA6 pin.
Pin Name
Pin Number (^) Pin Type
Buffer Type
Description PDIP QFN TQFP
Legend: TTL = TTL compatible input CMOS = CMOS compatible input or output ST = Schmitt Trigger input with CMOS levels I = Input O = Output P = Power Note 1: Alternate assignment for CCP2 when CCP2MX configuration bit is cleared. 2: Default assignment for CCP2 when CCP2MX configuration bit is set. 3: These pins are No Connect unless the ICPRT configuration bit is set. For NC/ICPORTS, the pin is No Connect unless ICPRT is set and the DEBUG configuration bit is cleared.
PORTB is a bidirectional I/O port. PORTB can be software programmed for internal weak pull-ups on all inputs. RB0/AN12/INT0/ FLT0/SDI/SDA RB AN INT FLT SDI SDA
Analog ST ST ST ST
Digital I/O. Analog input 12. External interrupt 0. Enhanced PWM Fault input (ECCP1 module). SPI™ data in. I^2 C™ data I/O. RB1/AN10/INT1/SCK/ SCL RB AN INT SCK SCL
Analog ST ST ST
Digital I/O. Analog input 10. External interrupt 1. Synchronous serial clock input/output for SPI mode. Synchronous serial clock input/output for I^2 C mode. RB2/AN8/INT2/VMO RB AN INT VMO
Analog ST —
Digital I/O. Analog input 8. External interrupt 2. External USB transceiver VMO output. RB3/AN9/CCP2/VPO RB AN CCP2 (1) VPO
Analog ST —
Digital I/O. Analog input 9. Capture 2 input/Compare 2 output/PWM 2 output. External USB transceiver VPO output. RB4/AN11/KBI0/CSSPP RB AN KBI CSSPP
Analog TTL —
Digital I/O. Analog input 11. Interrupt-on-change pin. SPP chip select control output. RB5/KBI1/PGM RB KBI PGM
Digital I/O. Interrupt-on-change pin. Low-Voltage ICSP™ Programming enable pin. RB6/KBI2/PGC RB KBI PGC
Digital I/O. Interrupt-on-change pin. In-Circuit Debugger and ICSP programming clock pin. RB7/KBI3/PGD RB KBI PGD
Digital I/O. Interrupt-on-change pin. In-Circuit Debugger and ICSP programming data pin.
Pin Name
Pin Number (^) Pin Type
Buffer Type
Description PDIP QFN TQFP
Legend: TTL = TTL compatible input CMOS = CMOS compatible input or output ST = Schmitt Trigger input with CMOS levels I = Input O = Output P = Power Note 1: Alternate assignment for CCP2 when CCP2MX configuration bit is cleared. 2: Default assignment for CCP2 when CCP2MX configuration bit is set. 3: These pins are No Connect unless the ICPRT configuration bit is set. For NC/ICPORTS, the pin is No Connect unless ICPRT is set and the DEBUG configuration bit is cleared.