Transcription of PIC16F685/687/689/690 Data Sheet
1 2005 Microchip Technology Sheet20-Pin Flash-Based, 8-BitCMOS Microcontrollers withnanoWatt TechnologyDS41262A-page iiPreliminary 2005 Microchip Technology contained in this publication regarding deviceapplications and the like is provided only for your convenienceand may be superseded by updates. It is your responsibility toensure that your application meets with your 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 NOTLIMITED TO ITS CONDITION, QUALITY, PERFORMANCE,MERCHANTABILITY OR FITNESS FOR disclaims all liability arising from this information andits use. Use of Microchip s products as critical components inlife support systems is not authorized except with expresswritten approval by Microchip.
2 No licenses are conveyed,implicitly or otherwise, under any Microchip intellectual Microchip name and logo, the Microchip logo, Accuron, dsPIC, KEELOQ, microID, MPLAB, PIC, PICmicro, PICSTART, PRO MATE, PowerSmart, rfPIC, and SmartShunt are registered trademarks of Microchip Technology Incorporated in the and other , FilterLab, Migratable Memory, MXDEV, MXLAB, PICMASTER, SEEVAL, SmartSensor and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the Age, Application Maestro, dsPICDEM, , dsPICworks, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, MPASM, MPLIB, MPLINK, MPSIM, PICkit, PICDEM, , PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel, Total Endurance and WiperLock are trademarks of Microchip Technology Incorporated in the and other is a service mark of Microchip Technology Incorporated in the other trademarks mentioned herein are property of their respective companies.
3 2005, Microchip Technology Incorporated, Printed in the , All Rights Reserved. Printed on recycled 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.
4 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 ourproducts. Attempts to break Microchip s code protection feature may be a violation of the Digital Millennium Copyright Act. If such actsallow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that 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, KEELOQ code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products.
5 In addition, Microchip s quality system for the design and manufacture of development systems is ISO 9001:2000 certified. 2005 Microchip Technology 1 PIC16F685/687/689/690 High-Performance RISC CPU: Only 35 instructions to learn:- All single-cycle instructions except branches Operating speed:- DC 20 MHz oscillator/clock input- DC 200 ns instruction cycle Interrupt capability 8-level deep hardware stack Direct, Indirect and Relative Addressing modesSpecial Microcontroller Features: Precision Internal Oscillator:- Factory calibrated to 1%- Software selectable frequency range of 8 MHz to 32 kHz- Software tunable- Two-Speed Start-up mode- Crystal fail detect for critical applications- Clock mode switching during operation for power savings Power-saving Sleep mode Wide operating voltage range ( ) Industrial and Extended Temperature range Power-on Reset (POR) Power-up Timer (PWRTE) and Oscillator Start-up Timer (OST) Brown-out Reset (BOR) with software control option Enhanced low-current Watchdog Timer (WDT) with on-chip oscillator (software selectable nominal 268 seconds with full prescaler) with software enable Multiplexed Master Clear/Input pin Programmable code protection High Endurance Flash/EEPROM cell.
6 - 100,000 write Flash endurance- 1,000,000 write EEPROM endurance- Flash/Data EEPROM retention: > 40 years Enhanced USART Module:- Supports RS-485, RS-232, and LIN Auto-Baud Detect- Auto-wake-up on Start bitLow-Power Features: Standby Current:- 1 nA @ , typical Operating Current:-20 A @ 32 kHz, , typical- <1 mA @ 4 MHz, , typical Watchdog Timer Current:-<1 A @ , typicalPeripheral Features: 17 I/O pins and 1 input only pin:- High current source/sink for direct LED drive- Interrupt-on-pin change- Individually programmable weak pull-ups- Ultra Low-Power Wake-up (ULPWU) Analog comparator module with:- Two analog comparators- Programmable on-chip voltage reference (CVREF) module (% of VDD)- Comparator inputs and outputs externally accessible- SR Latch mode- Timer 1 Gate Sync Latch A/D converter :- 10-bit resolution and 12 channels Timer0: 8-bit timer/counter with 8-bit programmable prescaler Enhanced Timer1:- 16-bit timer/counter with prescaler- External Gate Input mode- Option to use OSC1 and OSC2 in LP mode as Timer1 oscillator if INTOSC mode selected Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler Enhanced Capture, Compare, PWM+ module.
7 - 16-bit Capture, max resolution ns- Compare, max resolution 200 ns- 10-bit PWM with 1, 2 or 4 output channels, programmable dead time , max frequency 20 kHz- PWM output steering control Synchronous Serial Port (SSP):- SPI mode (Master and Slave) I2C (Master/Slave modes):-I2C address mask In-Circuit Serial ProgrammingTM (ICSPTM) via two pins20-Pin Flash-Based, 8-Bit CMOS Microcontrollers withnanoWatt TechnologyPIC16F685/687/689/690DS41262A- page 2 Preliminary 2005 Microchip Technology DiagramsDeviceProgram MemoryData MemoryI/O10-bit A/D (ch)ComparatorsTimers8/16-bitSSP ECCP+ EUSARTF lash(words) SRAM (bytes)EEPROM (bytes)PIC16F6854096256256181222/1 NoYesNoPIC16F6872048128256181221/1 YesNoYesPIC16F6894096256256181221/1 YesNoYesPIC16F6904096256256181222/1 YesYesYes20-pin PDIP, SOIC, SSOPPIC16F685 VDDRA5/T1 CKI/OSC1/CLKINRA4/AN3/T1G/OSC2/CLKOUTRA3 /MCLR/VPPRC5/CCP1/P1 ARC4/C2 OUT/P1 BRC3/AN7/P1 CRC6/AN8RC7/AN9RB7 VSSRA0/AN0/C1IN+/ICSPDAT/ULPWURA1/AN1/C1 2IN-/VREF/ICSPCLKRA2/AN2/T0 CKI/INT/C1 OUTRC0/AN4/C2IN+RC1/AN5/C12IN-RC2/AN6/P1 DRB4/AN10RB5/AN11RB612342019181756716151 48910131211 PIC16F687/689 VDDRA5/T1 CKI/OSC1/CLKINRA4/AN3/T1G/OSC2/CLKOUTRA3 /MCLR/VPPRC5/CPP1RC4/C2 OUTRC3/AN7RC6/AN8/SSRC7/AN9/SDORB7/TX/CK VSSRA0/AN0/C1IN+/ICSPDAT/ULPWURA1/AN1/C1 2IN-/VREF/ICSPCLKRA2/AN2/T0 CKI/INT/C1 OUTRC0/AN4/C2IN+RC1/AN5/C12IN-RC2/AN6RB4 /AN10/SDI/SDARB5/AN11/RX/DTRB6/SCK/SCL12 34201918175671615148910131211 PIC16F690 VDDRA5/T1 CKI/OSC1/CLKINRA4/AN3/T1G/OSC2/CLKOUTRA3 /MCLR/VPPRC5/CCP1/P1 ARC4/C2 OUT/P1 BRC3/AN7/P1
8 CRC6/AN8/SSRC7/AN9/SDORB7/TX/CKVSSRA0/AN 0/C1IN+/ICSPDAT/ULPWURA1/AN1/C12IN-/VREF /ICSPCLKRA2/AN2/T0 CKI/INT/C1 OUTRC0/AN4/C2IN+RC1/AN5/C12IN-RC2/AN6/P1 DRB4/AN10/SDI/SDARB5/AN11/RX/DTRB6/SCK/S CL1234201918175671615148910131211 2005 Microchip Technology 3 PIC16F685/687/689/690 Pin Diagrams (Continued)20-pin QFNRA4/AN3/T1G/OSC2/CLKOUTRA5/T1 CKI/OSC1/CLKINVDDVSSRA0/AN0/C1IN+/ICSPDA T/ULPWURC7/AN9/SDO(2)RB7/TX/CK(2)RB6/SCK /SCL(2)RB5/AN11/RX/DT(2)RB4/AN10/SDI/SDA (2)RA3/MCLR/VPPRC5/CCP1/P1A(1)RC4/C2 OUT/P1B(1)RC3/AN7/P1C(1)RC6/AN8/SS(2)RA1 /AN1/C12IN-/VREF/ICSPCLKRA2/AN2/T0 CKI/INT/C1 OUTRC0/AN4/C2IN+RC1/AN5/C12IN-RC2/AN6/P1 D(1)PIC16F685/687/689/690201918171667891 0151413121112345 Note 1:P1A, P1B, P1C and P1D are available on PIC16F685/PIC16F690 :SS, SDO, SDA, RX and DT available on PIC16F687/PIC16F689/PIC16F690 4 Preliminary 2005 Microchip Technology of Overview.
9 Organization .. Sources .. Ports .. Module .. Module with Gate Module .. converter (A/D) Module .. Data EEPROM and Flash Program Memory Control .. Enhanced Capture/Compare/PWM+ (ECCP+) Module .. Enhanced Universal Synchronous Asynchronous Receiver Transmitter (EUSART) .. SSP Module Overview .. Special Features of the CPU .. Instruction Set Summary .. Development Electrical DC and AC Characteristics Graphs and Tables .. Packaging 239 Appendix A: Data Sheet Revision History .. 245 Appendix B: Migrating from other PICmicro Devices .. 245 The Microchip Web Site .. 253 Customer Change Notification Service .. 253 Customer Support .. 253 Reader Response .. 254 Product Identification 255TO OUR VALUED CUSTOMERSIt is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchipproducts.
10 To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined andenhanced 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 or fax the Reader Response Form in the back of this data Sheet to (480) 792-4150. We wel-come your Current Data SheetTo obtain the most up-to-date version of this data Sheet , please register at our Worldwide Web site at: can determine the version of a data Sheet by examining its literature number found on the bottom outside corner of any last character of the literature number is the version number, ( , DS30000A is version A of document DS30000).ErrataAn errata Sheet , describing minor operational differences from the data Sheet and recommended workarounds, may exist for currentdevices.