Transcription of PIC16F688 Data Sheet - Microchip Technology
1 PIC16F688 . Data Sheet 14-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology 2007 Microchip Technology Inc. DS41203D. 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.
2 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.
3 SmartShunt are registered trademarks of Microchip WARRANTIES OF ANY KIND WHETHER EXPRESS OR. Technology Incorporated in the 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 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, , dsPICworks, ECAN, hold harmless Microchip from any and all damages, claims, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, suits, or expenses resulting from such use.
4 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, , 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 and other countries. SQTP is a service mark of Microchip Technology Incorporated in the All other trademarks mentioned herein are property of their respective companies. 2007, Microchip Technology Incorporated, Printed in the , 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.
5 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. DS41203D-page ii 2007 Microchip Technology Inc. PIC16F688 . 14-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology High-Performance RISC CPU: Low-Power Features: Only 35 instructions to learn: Standby Current: - All single-cycle instructions except branches - 50 nA @ , typical Operating speed: Operating Current: - DC 20 MHz oscillator/clock input - 11 A @ 32 kHz, , typical - DC 200 ns instruction cycle - 220 A @ 4 MHz, , typical Interrupt capability Watchdog Timer Current: 8-level deep hardware stack - 1 A @ , typical Direct, Indirect and Relative Addressing modes Peripheral Features: Special Microcontroller Features: 12 I/O pins with individual direction control: Precision Internal Oscillator.
6 - High-current source/sink for direct LED drive - Factory calibrated to 1% - Interrupt-on-change pin - Software selectable frequency range of - Individually programmable weak pull-ups 8 MHz to 125 kHz - Ultra Low-Power Wake-up - Software tunable - Two-Speed Start-Up mode Analog Comparator module with: - Crystal fail detect for critical applications - Two analog comparators - Clock mode switching during operation for - Programmable On-chip Voltage Reference power savings (CVREF) module (% of VDD). Power-Saving Sleep mode - Comparator inputs and outputs externally Wide operating voltage range ( ) accessible Industrial and Extended temperature range A/D Converter: Power-on Reset (POR) - 10-bit resolution and 8 channels Power-up Timer (PWRT) and Oscillator Start-up Timer0: 8-bit timer/counter with 8-bit Timer (OST) programmable prescaler Brown-out Reset (BOR) with software control Enhanced Timer1: option - 16-bit timer/counter with prescaler Enhanced Low-Current Watchdog Timer (WDT) - External Timer1 Gate (count enable).
7 With on-chip oscillator (software selectable nomi- - Option to use OSC1 and OSC2 in LP mode as nal 268 seconds with full prescaler) with software Timer1 oscillator if INTOSC mode selected enable Enhanced USART Module: Multiplexed Master Clear with weak pull-up or - Supports RS-485, RS-232, and LIN input only pin - Auto-Baud Detect Programmable code protection - Auto-wake-up on Start bit High-Endurance Flash/EEPROM cell: In-Circuit Serial Programming (ICSP ) via two - 100,000 write Flash endurance pins - 1,000,000 write EEPROM endurance - Flash/Data EEPROM retention: > 40 years Program Data Memory Memory 10-bit A/D Timers Device I/O Comparators Flash SRAM EEPROM (ch) 8/16-bit (words) (bytes) (bytes). PIC16F688 4096 256 256 12 8 2 1/1. 2007 Microchip Technology Inc. DS41203D-page 1. PIC16F688 . Pin Diagram (PDIP, SOIC, TSSOP). 14-pin PDIP, SOIC, TSSOP. VDD 1 14 VSS. RA5/T1 CKI/OSC1/CLKIN 2 13 RA0/AN0/C1IN+/ICSPDAT/ULPWU. RA4/AN3/T1G/OSC2/CLKOUT 3 RA1/AN1/C1IN-/VREF/ICSPCLK.
8 PIC16F688 . 12. RA3/MCLR/VPP 4 11 RA2/AN2/T0 CKI/INT/C1 OUT. RC5/RX/DT 5 10 RC0/AN4/C2IN+. RC4/C2 OUT/TX/CK 6 9 RC1/AN5/C2IN- RC3/AN7 7 8 RC2/AN6. TABLE 1: PIC16F688 14-PIN SUMMARY (PDIP, SOIC, TSSOP). I/O Pin Analog Comparators Timers EUSART Interrupt Pull-up Basic RA0 13 AN0/ULPWU C1IN+ IOC Y ICSPDAT. RA1 12 AN1 C1IN- IOC Y VREF/ICSPCLK. RA2 11 AN2 C1 OUT T0 CKI IOC/INT Y . RA3 4 IOC Y(1) MCLR/VPP. RA4 3 AN3 T1G IOC Y OSC2/CLKOUT. RA5 2 T1 CKI IOC Y OSC1/CLKIN. RC0 10 AN4 C2IN+ . RC1 9 AN5 C2IN- . RC2 8 AN6 . RC3 7 AN7 . RC4 6 C2 OUT TX/CK . RC5 5 RX/DT . 1 VDD. 14 VSS. Note 1: Pull-up activated only with external MCLR configuration. DS41203D-page 2 2007 Microchip Technology Inc. PIC16F688 . Pin Diagram (QFN). 16-pin QFN. VDD. VSS. NC. NC. 13. 15. 14. 16. RA5/T1 CKI/OSC1/CLKIN 1 12 RA0/AN0/C1IN+/ICSPDAT/ULPWU. RA4/AN3/T1G/OSC2/CLKOUT 2 11 RA1/AN1/C1IN-/VREF/ICSPCLK. PIC16F688 . RA3/MCLR/VPP 3 10 RA2/AN2/T0 CKI/INT/C1 OUT.
9 RC5/RX/DT 4 9 RC0/AN4/C2IN+. 5. 6. 7. 8. RC3/AN7. RC2/AN6. RC4/C2 OUT/TX/CK. RC1/AN5/C2IN- TABLE 2: PIC16F688 16-PIN SUMMARY (QFN). I/O Pin Analog Comparators Timers EUSART Interrupt Pull-up Basic RA0 12 AN0/ULPWU C1IN+ IOC Y ICSPDAT. RA1 11 AN1 C1IN- IOC Y VREF/ICSPCLK. RA2 10 AN2 C1 OUT T0 CKI IOC/INT Y . RA3 3 IOC Y(1) MCLR/VPP. RA4 2 AN3 T1G IOC Y OSC2/CLKOUT. RA5 1 T1 CKI IOC Y OSC1/CLKIN. RC0 9 AN4 C2IN+ . RC1 8 AN5 C2IN- . RC2 7 AN6 . RC3 6 AN7 . RC4 5 C2 OUT TX/CK . RC5 4 RX/DT . 16 VDD. 13 VSS. 14 NC. 15 NC. Note 1: Pull-up activated only with external MCLR configuration. 2007 Microchip Technology Inc. DS41203D-page 3. PIC16F688 . Table of Contents Device Overview .. 5. Memory Organization .. 7. Clock Sources .. 21. I/O Ports .. 33. Timer0 Module .. 45. Timer1 Module with Gate 49. Comparator 55. Analog-to-Digital Converter (A/D) Module .. 65. Data EEPROM and Flash Program Memory Control .. 77. Enhanced Universal Asynchronous Receiver Transmitter (EUSART).
10 83. Special Features of the CPU .. 109. Instruction Set Summary .. 129. Development Support .. 139. Electrical 143. DC and AC Characteristics Graphs and Tables .. 163. Packaging 185. Appendix A: Data Sheet Revision 191. Appendix B: Migrating from other PIC Devices .. 191. Index .. 193. On-line Support .. 197. Systems Information and Upgrade Hot Line .. 197. Reader Response .. 198. Product Identification 199. TO OUR VALUED CUSTOMERS. 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 or fax the Reader Response Form in the back of this data Sheet to (480) 792-4150.