PIC16F627A/628A/648A Data Sheet Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology © 2007 Microchip Technology Inc. DS40044F Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specification contained in their particular Microchip Data Sheet. • 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 Microchip’s 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 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. Information contained in this publication regarding device Trademarks applications and the like is provided only for your convenience The Microchip name and logo, the Microchip logo, Accuron, and may be superseded by updates. It is your responsibility to dsPIC, KEELOQ, KEELOQ logo, microID, MPLAB, PIC, ensure that your application meets with your specifications. PICmicro, PICSTART, PRO MATE, PowerSmart, rfPIC, and MICROCHIP MAKES NO REPRESENTATIONS OR SmartShunt are registered trademarks of Microchip WARRANTIES OF ANY KIND WHETHER EXPRESS OR Technology Incorporated in the U.S.A. and other countries. IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, AmpLab, FilterLab, Linear Active Thermistor, Migratable INCLUDING BUT NOT LIMITED TO ITS CONDITION, Memory, MXDEV, MXLAB, PS logo, SEEVAL, SmartSensor QUALITY, PERFORMANCE, MERCHANTABILITY OR and The Embedded Control Solutions Company are FITNESS FOR PURPOSE. Microchip disclaims all liability registered trademarks of Microchip Technology Incorporated arising from this information and its use. Use of Microchip in the U.S.A. devices in life support and/or safety applications is entirely at Analog-for-the-Digital Age, Application Maestro, CodeGuard, the buyer’s risk, and the buyer agrees to defend, indemnify and dsPICDEM, dsPICDEM.net, dsPICworks, ECAN, hold harmless Microchip from any and all damages, claims, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, suits, or expenses resulting from such use. No licenses are In-Circuit Serial Programming, ICSP, ICEPIC, Mindi, MiWi, conveyed, implicitly or otherwise, under any Microchip MPASM, MPLAB Certified logo, MPLIB, MPLINK, PICkit, intellectual property rights. PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, REAL ICE, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel, Total Endurance, UNI/O, WiperLock and ZENA 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. © 2007, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper. Microchip received ISO/TS-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona, Gresham, Oregon and Mountain View, California. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® 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. DS40044F-page ii © 2007 Microchip Technology Inc. PIC16F627A/628A/648A 18-pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology High-Performance RISC CPU: Low-Power Features: • Operating speeds from DC – 20 MHz • Standby Current: • Interrupt capability - 100 nA @ 2.0V, typical • 8-level deep hardware stack • Operating Current: • Direct, Indirect and Relative Addressing modes -12μA @ 32 kHz, 2.0V, typical • 35 single-word instructions: -120μA @ 1 MHz, 2.0V, typical - All instructions single cycle except branches • Watchdog Timer Current: -1μA @ 2.0V, typical Special Microcontroller Features: • Timer1 Oscillator Current: μ • Internal and external oscillator options: -1.2 A @ 32 kHz, 2.0V, typical - Precision internal 4 MHz oscillator factory • Dual-speed Internal Oscillator: calibrated to ±1% - Run-time selectable between 4 MHz and - Low-power internal 48 kHz oscillator 48 kHz μ - External Oscillator support for crystals and -4 s wake-up from Sleep, 3.0V, typical resonators • Power-saving Sleep mode Peripheral Features: • Programmable weak pull-ups on PORTB • 16 I/O pins with individual direction control • Multiplexed Master Clear/Input-pin • High current sink/source for direct LED drive • Watchdog Timer with independent oscillator for • Analog comparator module with: reliable operation - Two analog comparators • Low-voltage programming - Programmable on-chip voltage reference • In-Circuit Serial Programming™ (via two pins) (VREF) module • Programmable code protection - Selectable internal or external reference • Brown-out Reset - Comparator outputs are externally accessible • Power-on Reset • Timer0: 8-bit timer/counter with 8-bit • Power-up Timer and Oscillator Start-up Timer programmable prescaler • Wide operating voltage range (2.0-5.5V) • Timer1: 16-bit timer/counter with external crystal/ • Industrial and extended temperature range clock capability • High-Endurance Flash/EEPROM cell: • Timer2: 8-bit timer/counter with 8-bit period - 100,000 write Flash endurance register, prescaler and postscaler - 1,000,000 write EEPROM endurance • Capture, Compare, PWM module: - 40 year data retention - 16-bit Capture/Compare -10-bit PWM • Addressable Universal Synchronous/Asynchronous Receiver/Transmitter USART/SCI Program Data Memory Memory CCP Timers Device I/O USART Comparators Flash SRAM EEPROM (PWM) 8/16-bit (words) (bytes) (bytes) PIC16F627A 1024 224 128 16 1 Y 2 2/1 PIC16F628A 2048 224 128 16 1 Y 2 2/1 PIC16F648A 4096 256 256 16 1 Y 2 2/1 © 2007 Microchip Technology Inc. DS40044F-page 1 PIC16F627A/628A/648A Pin Diagrams PDIP, SOIC RA2/AN2/VREF 118 RA1/AN1 RA3/AN3/CMP1 2 27A/628A/648A 17 RA0/AN0 RA4/T0CKI/CMP2 3 16 RA7/OSC1/CLKIN RA5/MCLR/VPP 4 15 RA6/OSC2/CLKOUT VSS 5 14 VDD RB0/INT 6 13 RB7/T1OSI/PGD RB1/RX/DT 7 12 RB6/T1OSO/T1CKI/PGC PIC16F627A/628A/648A RB2/TX/CK 8 11 RB5 RB3/CCP1 9 10 RB4/PGM SSOP 28-Pin QFN REF DD DD RA1/AN1 RA0/AN0 RA7/OSC1/CLKIN RA6/OSC2/CLKOUT V V RB7/T1OSI/PGD RB6/T1OSO/T1CKI/PGC RB5 RB4/PGM RA1/AN1 RA0/AN0 RA4/T0CKI/CMP2 RA3/AN3/CMP1 RA2/AN2/V NC NC 11 20 19 18 17 16 15 14 13 12 22 RA5/MCLR/VPP 1 28 27 26 25 24 23 21 RA7/OSC1/CLKIN PIC16F627A/628A/648A NC 2 20 RA6/OSC2/CLKOUT VSS 3 19 VDD PIC16F627A/628A NC 4 18 NC 1 2 3 4 5 6 7 8 9 10 PIC16F648A VSS 5 17 VDD NC 6 16 RB7/T1OSI/PGD RB0/INT 7 15 RB6/T1OSO/T1CKI/PGC 8 9 10 11 12 13 14 PP SS SS REF V V /V NC NC RB0/INT RB3/CCP1 RB5 RB2/TX/CK RB1/RX/DT RA2/AN2/V RA5/MCLR RA3/AN3/CMP1 RB4/PGM RB3/CCP1 RA4/T0CKI/CMP2 RB2/TX/CK RB1/RX/DT DS40044F-page 2 © 2007 Microchip Technology Inc. PIC16F627A/628A/648A Table of Contents 1.0 General Description..................................................................................................................................................................... 5 2.0 PIC16F627A/628A/648A Device Varieties .................................................................................................................................. 7 3.0 Architectural Overview ................................................................................................................................................................ 9 4.0 Memory Organization................................................................................................................................................................ 15 5.0 I/O Ports .................................................................................................................................................................................... 31 6.0 Timer0 Module .......................................................................................................................................................................... 45 7.0 Timer1 Module .......................................................................................................................................................................... 48 8.0 Timer2 Module .......................................................................................................................................................................... 52 9.0 Capture/Compare/PWM (CCP) Module .................................................................................................................................... 55 10.0 Comparator Module..................................................................................................................................................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages178 Page
-
File Size-