PIC16F887

Click here to load reader

download PIC16F887

of 288

  • date post

    15-Nov-2014
  • Category

    Documents

  • view

    16
  • download

    4

Embed Size (px)

Transcript of PIC16F887

PIC16F882/883/884/886/887 Data Sheet28/40/44-Pin, Enhanced Flash-Based 8-Bit CMOS Microcontrollers with nanoWatt Technology

2007 Microchip Technology Inc.

Preliminary

DS41291D

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 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.

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 WARRANTIES 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 devices in life support and/or safety applications is entirely at the buyers risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.

Trademarks The Microchip name and logo, the Microchip logo, Accuron, dsPIC, KEELOQ, KEELOQ logo, 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, Linear Active Thermistor, Migratable Memory, MXDEV, MXLAB, PS logo, 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, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, PICkit, 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 Companys 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, Microchips quality system for the design and manufacture of development systems is ISO 9001:2000 certified.

DS41291D-page ii

Preliminary

2007 Microchip Technology Inc.

PIC16F882/883/884/886/88728/40/44-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt TechnologyHigh-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 modes

Peripheral Features: 24/35 I/O pins with individual direction control: - High current source/sink for direct LED drive - Interrupt-on-Change pin - 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) - Fixed voltage reference (0.6V) - Comparator inputs and outputs externally accessible - SR Latch mode - External Timer1 Gate (count enable) A/D Converter: - 10-bit resolution and 11/14 channels Timer0: 8-bit timer/counter with 8-bit programmable prescaler Enhanced Timer1: - 16-bit timer/counter with prescaler - External Gate Input mode - Dedicated low-power 32 kHz oscillator Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler Enhanced Capture, Compare, PWM+ module: - 16-bit Capture, max. resolution 12.5 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 Capture, Compare, PWM module: - 16-bit Capture, max. resolution 12.5 ns - 16-bit Compare, max. resolution 200 ns - 10-bit PWM, max. frequency 20 kHz Enhanced USART module: - Supports RS-485, RS-232, and LIN 2.0 - Auto-Baud Detect - Auto-Wake-Up on Start bit In-Circuit Serial ProgrammingTM (ICSPTM) via two pins Master Synchronous Serial Port (MSSP) module supporting 3-wire SPI (all 4 modes) and I2C Master and Slave Modes with I2C address mask

Special Microcontroller Features: Precision Internal Oscillator: - Factory calibrated to 1% - Software selectable frequency range of 8 MHz to 31 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 (2.0V-5.5V) Industrial and Extended Temperature range Power-on Reset (POR) Power-up Timer (PWRT) 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 with pull-up/input pin Programmable code protection High Endurance Flash/EEPROM cell: - 100,000 write Flash endurance - 1,000,000 write EEPROM endurance - Flash/Data EEPROM retention: > 40 years Program memory Read/Write during run time In-Circuit Debugger (on board)

Low-Power Features: Standby Current: - 50 nA @ 2.0V, typical Operating Current: - 11 A @ 32 kHz, 2.0V, typical - 220 A @ 4 MHz, 2.0V, typical Watchdog Timer Current: - 1 A @ 2.0V, typical

2007 Microchip Technology Inc.

Preliminary

DS41291D-page 1

PIC16F882/883/884/886/887Program Memory Flash (words) 2048 4096 4096 8192 8192 Data Memory SRAM (bytes) 128 256 256 368 368 EEPROM (bytes) 128 256 256 256 256 I/O 10-bit A/D (ch) 11 11 14 11 14 ECCP/ CCP 1/1 1/1 1/1 1/1 1/1 Timers 8/16-bit 2/1 2/1 2/1 2/1 2/1

Device

EUSART

MSSP

Comparators

PIC16F882 PIC16F883 PIC16F884 PIC16F886 PIC16F887

28 24 35 24 35

1 1 1 1 1

1 1 1 1 1

2 2 2 2 2

DS41291D-page 2

Preliminary

2007 Microchip Technology Inc.

PIC16F882/883/884/886/887Pin Diagrams PIC16F882/883/886, 28-Pin PDIP, SOIC, SSOP28-pin PDIP, SOIC, SSOPRE3/MCLR/VPP RA0/AN0/ULPWU/C12IN0RA1/AN1/C12IN1RA2/AN2/VREF-/CVREF/C2IN+ RA3/AN3/VREF+/C1IN+ RA4/T0CKI/C1OUT RA5/AN4/SS/C2OUT VSS RA7/OSC1/CLKIN RA6/OSC2/CLKOUT RC0/T1OSO/T1CKI RC1/T1OSI/CCP2 RC2/P1A/CCP1 RC3/SCK/SCL 1 2 3 4 5 6 7 8 9 10 11 12 13 14 28 27 26 25 24 23 22 21 20 19 18 17 16 15 RB7/ICSPDAT RB6/ICSPCLK RB5/AN13/T1G RB4/AN11/P1D RB3/AN9/PGM/C12IN2RB2/AN8/P1B RB1/AN10/P1C/C12IN3RB0/AN12/INT VDD VSS RC7/RX/DT RC6/TX/CK RC5/SDO RC4/SDI/SDA

TABLE 1:I/O RA0 RA1 RA2 RA3 RA4 RA5 RA6 RA7 RB0 RB1 RB2 RB3 RB4 RB5 RB6 RB7 RC0 RC1 RC2 RC3 RC4 RC5 RC6 RC7 RE3 Note 1: Pin 2 3 4 5 6 7 10 9 21 22 23 24 25 26 27 28 11 12 13 14 15 16 17 18 1 20 8 19

PIC16F882/883/886 28-PIN SUMMARY (PDIP, SOIC, SSOP)Analog AN0/ULPWU AN1 AN2 AN3 AN4 AN12 AN10 AN8 AN9 AN11 AN13 Comparators C12IN0C12IN1C2IN+ C1IN+ C1OUT C2OUT C12IN3 C12IN2 Timers T0CKI T1G T1OSO/T1CKI T1OSI ECCP P1C P1B P1D CCP2 CCP1/P1A EUSART TX/CK RX/DT MSSP SS SCK/SCL SDI/SDA SDO Interrupt Pull-up IOC/INT IOC IOC IOC IOC IOC IOC IOC Y Y Y Y Y Y Y Y Y(1) Basic VREF-/CVREF VREF+ OSC2/CLKOUT OSC1/CLKIN PGM ICSPCLK ICSPDAT MCLR/VPP VDD VSS VSS

Pull-up activated only with external MCLR configuration.

2007 Microchip Technology Inc.

Preliminary

PIC16F882/883/886

DS41291D-page 3

PIC16F882/883/884/886/887Pin Diagrams PIC16F882/883/886, 28-Pin QFN28-pin QFN RA1/AN1/C12IN1RA0/AN0/ULPWU/C12IN0RE3/MCLR/VPP RB7/ICSPDAT RB6/ICSPCLK RB5/AN13/T1G RB4/AN11/P1D 1 21 2 20 3 19 PIC16F882/883/886 18 4 5