41639A

418
2012 Microchip Technology Inc. Preliminary DS41639A PIC16(L)F1454/5/9 Data Sheet 14/20-Pin Flash, 8-Bit USB Microcontrollers with XLP Technology

description

асдасд

Transcript of 41639A

2012 Microchip Technology Inc. Preliminary DS41639APIC16(L)F1454/5/9Data Sheet14/20-Pin Flash, 8-Bit USB Microcontrollerswith XLP TechnologyDS41639A-page2 Preliminary 2012 Microchip Technology Inc.Informationcontainedinthispublicationregardingdeviceapplications and the like is provided only for your convenienceand may be superseded by updates. It is your responsibility toensurethatyourapplicationmeetswithyourspecifications.MICROCHIPMAKESNOREPRESENTATIONSORWARRANTIESOFANYKINDWHETHEREXPRESSORIMPLIED,WRITTENORORAL,STATUTORYOROTHERWISE,RELATEDTOTHEINFORMATION,INCLUDINGBUTNOTLIMITEDTOITSCONDITION,QUALITY,PERFORMANCE,MERCHANTABILITYORFITNESSFORPURPOSE.Microchipdisclaimsallliabilityarisingfromthisinformationanditsuse.UseofMicrochipdevicesinlifesupportand/orsafetyapplicationsisentirelyatthe buyers risk, and the buyer agrees to defend, indemnify andholdharmlessMicrochipfromanyandalldamages,claims,suits,orexpensesresultingfromsuchuse.Nolicensesareconveyed,implicitlyorotherwise,underanyMicrochipintellectual property rights.TrademarksThe Microchip name and logo, the Microchip logo, dsPIC, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART, PIC32 logo, rfPIC and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor, MXDEV, MXLAB, SEEVAL 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, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, mTouch, Omniscient Code Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit, PICtail, REAL ICE, rfLAB, Select Mode, Total Endurance, TSHARC, UniWinDriver, 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. 2012, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper.ISBN: 9781620763476Note 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 ourproducts. Attempts to break Microchips 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 Act.Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. 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.QUALITY MANAGEMENTSYSTEM CERTIFIED BY DNV == ISO/TS 16949 == 2012 Microchip Technology Inc. Preliminary DS41639A-page3High-Performance RISC CPU: C Compiler Optimized Architecture Only 49 Instructions 14 Kbytes Linear Program Memory Addressing 1024 Bytes Linear Data Memory Addressing Operating Speed:- DC 48 MHz clock input- DC 83 ns instruction cycle- Selectable 3x or 4x PLL for specific frequencies Interrupt Capability with Automatic ContextSaving 16-Level Deep Hardware Stack with OptionalOverflow/Underflow Reset Direct, Indirect and Relative Addressing modes:- Two full 16-bit File Select Registers (FSRs) capable of accessing both data or program memory- FSRs can read program and data memorySpecial Microcontroller Features: Operating Voltage Range:- 1.8V to 3.6V (PIC16LF145X)- 2.3V to 5.5V (PIC16F145X) Self-Programmable under Software Control Power-on Reset (POR) Power-up Timer (PWRT) Programmable Brown-Out Reset (BOR) Low-Power BOR (LPBOR) Extended Watchdog Timer (WDT):- Programmable period from 1 ms to 256s Programmable Code Protection In-Circuit Serial Programming (ICSP) via Two Pins Enhanced Low-Voltage Programming (LVP) Power-Saving Sleep mode:Universal Serial Bus (USB) Features: Self-Tuning from USB Host (eliminates need for external crystal) USB V2.0 Compliant SIE Low Speed (1.5 Mb/s) and Full Speed (12 Mb/s) Supports Control, Interrupt, Isochronous and Bulk Transfers Supports up to Eight Bidirectional Endpoints 512-Byte Dual Access RAM for USB Interrupt-on-Change (IOC) on D+/D- for USB Host Detection Configurable Internal Pull-up Resistors for use with USBExtreme Low-Power ManagementPIC16LF145X with XLP: Sleep mode: 25 nA @ 1.8V, typical Watchdog Timer Current: 290 nA @ 1.8V, typical Timer1 Oscillator: 600 nA @ 32 kHz, typical Operating Current: 25 A/MHz @ 1.8V, typicalFlexible Oscillator Structure: 16 MHz Internal Oscillator Block:- Factory calibrated to 0.25%, typical- Software selectable frequency range from 16 MHz to 31 kHz- Tunable to 0.25% across temperature range- 48 MHz with 3x PLL 31 kHz Low-Power Internal Oscillator Clock Switching with run from:- Primary Oscillator- Secondary Oscillator (SOSC)- Internal Oscillator Clock Reference Output:- Clock Prescaler- CLKOUTAnalog Features(1): Analog-to-Digital Converter (ADC):- 10-bit resolution- Up to nine external channels- Two internal channels:- Fixed Voltage Reference channel- DAC output channel- Auto acquisition capability- Conversion available during Sleep Two Comparators:- Rail-to-rail inputs- Power mode control- Software controllable hysteresis Voltage Reference module:- Fixed Voltage Reference (FVR) with 1.024V, 2.048V and 4.096V output levels Up to One Rail-to-Rail Resistive 5-Bit DAC with Positive Reference SelectionNote 1: Analog features are not available on PIC16(L)F1454 devices.14/20-Pin, 8-Bit Flash USB Microcontroller with XLP TechnologyPIC16(L)F1454/5/9PIC16(L)F145XDS41639A-page4 Preliminary 2012 Microchip Technology Inc.Peripheral Features: Up to 14 I/O Pins and Three Input-only Pins:- High current sink/source 25 mA/25 mA- Individually programmable weak pull-ups- Individually programmableInterrupt-On-Change (IOC) pins Timer0: 8-Bit Timer/Counter with 8-Bit Programmable Prescaler Enhanced Timer1:- 16-bit timer/counter with prescaler- External Gate Input mode Timer2: 8-Bit Timer/Counter with 8-Bit Period Register, Prescaler and Postscaler Two 10-bit PWM modules Complementary Waveform Generator (CWG)(1):- Up to four selectable signal sources- Selectable falling and rising edge dead-band control- Polarity control- Up to four auto-shutdown sources- Multiple input sources: PWM, Comparators Master Synchronous Serial Port (MSSP) with SPI and I2C with:- 7-bit address masking- SMBus/PMBus compatibility Enhanced Universal Synchronous Asynchronous Receiver Transmitter (EUSART):- RS-232, RS-485 and LIN compatible- Auto-baud detect- Auto-wake-up on StartPIC16(L)F145X Family TypesNote 1: Not available on PIC16(L)F1454 devices.DeviceData Sheet IndexProgram MemoryFlash (words)Data SRAM(bytes)I/Os(2)10-bit ADC (ch)ComparatorsDACTimers(8/16-bit)PWMEUSARTMSSP (I2C/SPI)CWGUSBClock ReferenceDebug(1)XLPPIC16(L)F1454 (1) 8192 1024 11 2/1 2 1 1 1 1 I/H YPIC16(L)F1455 (1) 8192 1024 11 5 2 1 2/1 2 1 1 1 1 1 I/H YPIC16(L)F1459 (1) 8192 1024 17 9 2 1 2/1 2 1 1 1 1 1 I/H YNote 1: I - Debugging, Integrated on Chip; H - Debugging, Available using Debug Header;E - Emulation, Available using Emulation Header.2: Three pins are input-only.Data Sheet Index: 1: DS41639 PIC16(L)F1454/1455/1459 Data Sheet, 14/20-Pin Flash, 8-Bit USB Microcontrollers.Note: Forothersmallform-factorpackageavailabilityandmarkinginformation,pleasevisitwww.microchip.com/packaging or contact your local sales office. 2012 Microchip Technology Inc. Preliminary DS41639A-page5PIC16(L)F145XFIGURE 1: 14-PIN PDIP, SOIC, TSSOP DIAGRAM FOR PIC16(L)F1454/1455 FIGURE 2: 16-PIN QFN DIAGRAM FOR PIC16(L)F1454/1455PDIP, SOIC, TSSOPPIC16(L)F1454PIC16(L)F14551234141312115671098VDDRA5RA4MCLR/VPP/RA3RC5RC4RC3VSSRA0/D+/ICSPDAT(1)RA1/D-/ICSPCLK(1)VUSB3V3RC0/ICSPDATRC1/ICSPCLKRC2Note 1: LVP support for PIC18(L)F1XK50 legacy designs.2: See Table 1 and Table 2 for location of all peripheral functions.7 82311112591013 14 15 1664RA5RA4MCLR/VPP/RA3RC4RC3ICSPCLK/RC1RC2RC0/ICSPDATRA0/D+/ICSPDAT(1)VUSB3V3RA1/D-/ICSPCLK(1)VssVDDNCRC5NCQFN (4x4)Note 1: LVP support for PIC18(L)F1XK50 legacy designs.2: See Table 1 and Table 2 for location of all peripheral functions.PIC16(L)F1454PIC16(L)F1455PIC16(L)F145XDS41639A-page6 Preliminary 2012 Microchip Technology Inc.FIGURE 3: 20-PIN PDIP, SOIC, SSOP DIAGRAM FOR PIC16(L)F1459 FIGURE 4: 20-PIN QFN DIAGRAM FOR PIC16(L)F1459PIC16(L)F14591234141312115671098VDDRA5RA4MCLR/VPP/RA3RC5RC4VSSRA0/D+/ICSPDAT(1)RA1/D-/ICSPCLK(1)VUSB3V3RC0/ICSPDATRC1/ICSPCLKRC2 RC3 PDIP, SOIC, SSOP Note 1: LVP support for PIC18(L)F1XK50 legacy designs.2: See Table 3 for location of all peripheral functions.181716152019RC6RC7RB7RB4RB5RB68 923114151610116121317 18 19 20754MCLR/VPP/RA3RC5RC4RC3RC6RC7RB7RB4RB5RB6RC1/ICSPCLKRC0/ICSPDATVUSB3V3RA1/D-/ICSPCLK(1)RA0/D+/ICSPDAT(1)VssVDDRA4RA5RC2 QFN (4x4)Note 1: LVP support for PIC18(L)F1XK50 legacy designs.2: See Table 3 for location of all peripheral functions.PIC16(L)F1459 2012 Microchip Technology Inc. Preliminary DS41639A-page7PIC16(L)F145XTABLE 1: 14-PIN ALLOCATION TABLE (PIC16(L)F1454)I/O14-Pin PDIP/SOIC/TSSOP16-Pin QFNADCReferenceComparatorTimerCWGUSBEUSARTPWMMSSPInterruptBasicRA0 13 12 D+ IOC ICSPDAT(3)RA1 12 11 D- IOC ICSPCLK(3)RA2 RA3 4 3 T1G(2) SS(2)IOC MCLRVPPRA4 3 2 SOSCOT1G(1) SDO(2)IOC CLKOUTOSC2CLKR(1)RA5 2 1 SOSCIT1CKI PWM2(2) IOC CLKINOSC1RC0 10 9 SCLSCK ICSPDATRC1 9 8 SDASDIINT ICSPCLKRC2 8 7 SDO(1) RC3 7 6 PWM2(1)SS(1) CLKR(2)RC4 6 5 TKCK RC5 5 4 T0CKI RXDTPWM1 VDD 1 16 VDDVSS 14 13 VSSVUSB3V3 11 10 VUSB3V3 Note 1: Default location for peripheral pin function. Alternate location can be selected using the APFCON register.2: Alternate location for peripheral pin function selected by the APFCON register.3: LVP support for PIC18(L)F1XK50 legacy designs.PIC16(L)F145XDS41639A-page8 Preliminary 2012 Microchip Technology Inc.TABLE 2: 14-PIN ALLOCATION TABLE (PIC16(L)F1455)I/O14-Pin PDIP/SOIC/TSSOP16-Pin QFNADCReferenceComparatorTimerCWGUSBEUSARTPWMMSSPInterruptBasicRA0 13 12 D+ IOC ICSPDAT(3)RA1 12 11 D- IOC ICSPCLK(3)RA2 RA3 4 3 T1G(2) SS(2)IOC MCLRVPPRA4 3 2 AN3 SOSCOT1G(1) SDO(2)IOC CLKOUTOSC2CLKR(1)RA5 2 1 SOSCIT1CKI PWM2(2) IOC CLKINOSC1RC0 10 9 AN4 VREF+ C1IN+C2IN+ SCLSCK ICSPDATRC1 9 8 AN5 C1IN1-C2IN1- CWGFLT SDASDIINT ICSPCLKRC2 8 7 AN6 DACOUT1 C1IN2-C2IN2- SDO(1) RC3 7 6 AN7 DACOUT2 C1IN3-C2IN3- PWM2(1)SS(1) CLKR(2)RC4 6 5 C1OUTC2OUT CWG1B TKCK RC5 5 4 T0CKI CWG1A RXDTPWM1 VDD 1 16 VDDVSS 14 13 VSSVUSB3V3 11 10 VUSB3V3 Note 1: Default location for peripheral pin function. Alternate location can be selected using the APFCON register.2: Alternate location for peripheral pin function selected by the APFCON register.3: LVP support for PIC18(L)F1XK50 legacy designs. 2012 Microchip Technology Inc. Preliminary DS41639A-page9PIC16(L)F145XTABLE 3: 20-PIN ALLOCATION TABLE (PIC16(L)F1459)I/O20-Pin PDIP/SOIC/SSOP20-Pin QFNADCReferenceComparatorTimerCWGUSBEUSARTPWMMSSPInterruptBasicRA0 19 16 D+ IOC ICSPDAT(3)RA1 18 15 D- IOC ICSPCLK(3)RA2 RA3 4 1 T1G(2) SS(2)IOC MCLRVPPRA4 3 20 AN3 SOSCOT1G(1) IOC OSC2CLKOUTCLKR(1)RA5 2 19 SOSCIT1CKI IOC OSC1CLKINRB4 13 10 AN10 SDASDIIOC RB5 12 9 AN11 RXDX IOC RB6 11 8 SCLSCKIOC RB7 10 7 TXCK IOC RC0 16 13 AN4 VREF+C1IN+C2IN+ ICSPDATRC1 15 12 AN5 C1IN1-C2IN1- CWGFLT INT ICSPCLKRC2 14 11 AN6 DACOUT1 C1IN2-C2IN2- RC3 7 4 AN7 DACOUT2 C1IN3-C2IN3- CLKR(2)RC4 6 3 C1OUTC2OUT CWG1B RC5 5 2 T0CKI CWG1A PWM1 RC6 8 5 AN8 PWM2 SS(1) RC7 9 6 AN9 SDO VDD 1 18 VDDVSS 20 17 VSSVUSB3V3 17 14 VUSB3V3 Note 1: Default location for peripheral pin function. Alternate location can be selected using the APFCON register.2: Alternate location for peripheral pin function selected by the APFCON register.3: LVP support for PIC18(L)F1XK50 legacy designs.PIC16(L)F145XDS41639A-page10 Preliminary 2012 Microchip Technology Inc.Table of Contents1.0 Device Overview ........................................................................................................................................................................ 132.0 Enhanced Mid-Range CPU........................................................................................................................................................ 213.0 Memory Organization................................................................................................................................................................. 234.0 Device Configuration .................................................................................................................................................................. 515.0 Oscillator Module (With Fail-Safe Clock Monitor)....................................................................................................................... 576.0 Resets ........................................................................................................................................................................................ 797.0 Reference Clock Module ............................................................................................................................................................ 878.0 Interrupts .................................................................................................................................................................................... 919.0 Power-Down Mode (Sleep) ...................................................................................................................................................... 10310.0 Watchdog Timer (WDT) ........................................................................................................................................................... 10711.0 Flash Program Memory Control ............................................................................................................................................... 11212.0 I/O Ports ................................................................................................................................................................................... 12913.0 Interrupt-On-Change ................................................................................................................................................................ 14314.0 Fixed Voltage Reference (FVR) (PIC16(L)F1455/9 only)......................................................................................................... 14915.0 Temperature Indicator Module (PIC16(L)F1455/9 only)........................................................................................................... 15116.0 Analog-to-Digital Converter (ADC) Module(PIC16(L)F1455/9 only) ............................................................................................................................................................. 15317.0 Digital-to-Analog Converter (DAC) Module(PIC16(L)F1455/9 only) ............................................................................................................................................................. 16918.0 Comparator Module(PIC16(L)F1455/9 only) ............................................................................................................................................................. 17319.0 Timer0 Module ......................................................................................................................................................................... 18320.0 Timer1 Module with Gate Control............................................................................................................................................. 18721.0 Timer2 Module ......................................................................................................................................................................... 19922.0 Master Synchronous Serial Port (MSSP) Module .................................................................................................................... 20323.0 Enhanced Universal Synchronous Asynchronous Receiver Transmitter (EUSART) ............................................................... 25724.0 Pulse Width Modulation (PWM) Module................................................................................................................................... 28725.0 Complementary Waveform Generator (CWG) Module(PIC16(L)F1455/9 only)29326.0 Universal Serial Bus (USB) ...................................................................................................................................................... 30927.0 In-Circuit Serial Programming (ICSP) ............................................................................................................................... 33728.0 Instruction Set Summary .......................................................................................................................................................... 33929.0 Electrical Specifications............................................................................................................................................................ 35330.0 DC and AC Characteristics Graphs and Charts ....................................................................................................................... 38331.0 Development Support............................................................................................................................................................... 38532.0 Packaging Information.............................................................................................................................................................. 389Appendix A: Data Sheet Revision History.......................................................................................................................................... 407Index .................................................................................................................................................................................................. 409The Microchip Web Site..................................................................................................................................................................... 415Customer Change Notification Service .............................................................................................................................................. 415Customer Support .............................................................................................................................................................................. 415Reader Response .............................................................................................................................................................................. 416Product Identification System............................................................................................................................................................. 417 2012 Microchip Technology Inc. Preliminary DS41639A-page11PIC16(L)F145XTO OUR VALUED CUSTOMERSIt is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchipproducts. 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 viaE-mail at [email protected] or fax the Reader Response Form in the back of this data sheet to (480) 792-4150. Wewelcome your feedback.Most Current Data SheetTo obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at:http://www.microchip.comYou 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).ErrataAn errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for currentdevices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revisionof 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: Microchips Worldwide Web site; http://www.microchip.com Your local Microchip sales office (see last page)When contacting a sales office, please specify which device, revision of silicon and data sheet (include literature number) you areusing.Customer Notification SystemRegister on our web site at www.microchip.com to receive the most current information on all of our products.PIC16(L)F145XDS41639A-page12 Preliminary 2012 Microchip Technology Inc.NOTES: 2012 Microchip Technology Inc. Preliminary DS41639A-page13PIC16(L)F1454/5/91.0 DEVICE OVERVIEWThe PIC16(L)F1454/5/9 are described within this datasheet.Theyareavailablein14/20-pinpackages.Figure 1-1showsablockdiagramofthePIC16(L)F1454/5/9devices.Tables 1-2,1-3and 1-4show the pinout descriptions.ReferenceTable 1-1forperipheralsavailableperdevice.TABLE 1-1: DEVICE PERIPHERAL SUMMARYPeripheralPIC16F1454PIC16LF1454PIC16F1455PIC16LF1455 PIC16F1459PIC16LF1459Analog-to-Digital Converter (ADC) Clock Reference Complementary Wave Generator (CWG) Digital-to-Analog Converter (DAC) Enhanced Universal Synchronous/Asynchronous Receiver/Transmitter (EUSART) Fixed Voltage Reference (FVR) Temperature Indicator Universal Serial Bus (USB) ComparatorsC1 C2 Master Synchronous Serial PortsMSSP1 PWM ModulesPWM1 PWM2 TimersTimer0 Timer1 Timer2 PIC16(L)F1454/5/9DS41639A-page14 Preliminary 2012 Microchip Technology Inc.FIGURE 1-1: PIC16(L)F1454/5/9 BLOCK DIAGRAMPORTCNote 1: PIC16(L)F1455/9 only.2: PIC16(L)F1459 only.CPUProgramFlash MemoryRAMTimingGenerationINTRCOscillatorMCLR(Figure 2-1)Timer2 Timer1 Timer0PWM1 PWM2PORTACWG1(1)ADC10-Bit(1)FVR(1)Temp.Indicator(1)OSC1/CLKINOSC2/CLKOUTMSSP1C2(1)C1(1)DAC(1)PORTB(2)EUSARTCLKR USB 2012 Microchip Technology Inc. Preliminary DS41639A-page15PIC16(L)F1454/5/9TABLE 1-2: PIC16(L)F1454 PINOUT DESCRIPTIONName FunctionInput TypeOutput TypeDescriptionRA0/D+/ICSPDAT(3)RA0 TTL CMOS General purpose I/O.D+ XTAL XTAL USB differential plus line.ICSPDAT ST CMOS ICSP Data I/O.RA1/D-/ICSPCLK(3)RA1 TTL CMOS General purpose I/O.D- XTAL XTAL USB differential minus line.ICSPCLK ST ICSP Programming Clock.RA3/VPP/T1G(2)/SS(2)/MCLR RA3 TTL General purpose input with IOC and WPU.VPP HV Programming voltage.T1G ST Timer1 Gate input.SS ST Slave Select input.MCLR ST Master Clear with internal pull-up.RA4/SOSCO/CLKOUT/T1G(1)/SDO(2)/CLKR(1)/OSC2RA4 TTL CMOS General purpose I/O.SOSCO XTAL XTAL Secondary Oscillator Connection.CLKOUT CMOS FOSC/4 output.T1G ST Timer1 Gate input.SDO CMOS SPI data output.CLKR CMOS Clock reference output.OSC2 XTAL XTAL Primary Oscillator connection.RA5/CLKIN/SOSCI/T1CKI/PWM2(2)/OSC1RA5 TTL CMOS General purpose I/O.CLKIN CMOS External clock input (EC mode).SOSCI XTAL XTAL Secondary Oscillator Connection.T1CKI ST Timer1 clock input.PWM2 CMOS PWM output.OSC1 XTAL XTAL Primary Oscillator Connection.RC0/SCL/SCK/ICSPDAT RC0 TTL CMOS General purpose I/O.SCL I2C OD I2C clock.SCK ST CMOS SPI clock.ICSPDAT ST CMOS ICSP Data I/O.RC1/SDA/SDI/INT/ICSPCLK RC1 TTL CMOS General purpose I/O.SDA I2C OD I2C data input/output.SDI CMOS SPI data input.INT ST External input.ICSPCLK ST ICSP Programming Clock.RC2/SDO(1)RC2 TTL CMOS General purpose I/O.SDO CMOS SPI data output.RC3/PWM2(1)/SS(1)/CLKR(2)RC3 TTL CMOS General purpose I/O.PWM2 CMOS PWM output.SS ST Slave Select input.CLKR CMOS Clock reference output.Legend: AN = Analog input or output CMOS= CMOS compatible input or output OD = Open DrainTTL = TTL compatible input ST = Schmitt Trigger input with CMOS levels I2C = Schmitt Trigger input with I2C HV = High Voltage XTAL = Crystal levelsNote 1: Default location for peripheral pin function. Alternate location can be selected using the APFCON register.2: Alternate location for peripheral pin function selected by the APFCON register.3: LVP support for PIC18(L)F1XK50 legacy designs.PIC16(L)F1454/5/9DS41639A-page16 Preliminary 2012 Microchip Technology Inc.RC4/TX/CK RC4 TTL CMOS General purpose I/O.TX CMOS USART asynchronous transmit.CK ST CMOS USART synchronous clock.RC5/T0CKI/RX/DT/PWM1 RC5 TTL CMOS General purpose I/O.T0CKI ST Timer0 clock input.RX ST USART asynchronous input.DT ST CMOS USART synchronous data.PWM1 CMOS PWM output.VDD VDD Power Positive supply.VSS VSS Power Ground reference.VUSB3V3 VUSB3V3 Power Positive supply for USB transceiver.TABLE 1-2: PIC16(L)F1454 PINOUT DESCRIPTION (CONTINUED)Name FunctionInput TypeOutput TypeDescriptionLegend: AN = Analog input or output CMOS= CMOS compatible input or output OD = Open DrainTTL = TTL compatible input ST = Schmitt Trigger input with CMOS levels I2C = Schmitt Trigger input with I2C HV = High Voltage XTAL = Crystal levelsNote 1: Default location for peripheral pin function. Alternate location can be selected using the APFCON register.2: Alternate location for peripheral pin function selected by the APFCON register.3: LVP support for PIC18(L)F1XK50 legacy designs. 2012 Microchip Technology Inc. Preliminary DS41639A-page17PIC16(L)F1454/5/9TABLE 1-3: PIC16(L)F1455 PINOUT DESCRIPTIONName FunctionInput TypeOutput TypeDescriptionRA0/D+/ICSPDAT(3)RA0 TTL CMOS General purpose I/O.D+ XTAL XTAL USB differential plus line.ICSPDAT ST CMOS ICSP Data I/O.RA1/D-/ICSPCLK(3)RA1 TTL CMOS General purpose I/O.D- XTAL XTAL USB differential minus line.ICSPCLK ST ICSP Programming Clock.RA3/VPP/T1G(2)/SS(2)/MCLR RA3 TTL General purpose input with IOC and WPU.VPP HV Programming voltage.T1G ST Timer1 Gate input.SS ST Slave Select input.MCLR ST Master Clear with internal pull-up.RA4/AN3/SOSCO/CLKOUT/T1G(1)/SDO(2)/CLKR(1)/OSC2RA4 TTL CMOS General purpose I/O.AN3 AN A/D Channel input.SOSCO XTAL XTAL Secondary Oscillator Connection.CLKOUT CMOS FOSC/4 output.T1G ST Timer1 Gate input.SDO CMOS SPI data output.CLKR CMOS Clock reference output.OSC2 XTAL XTAL Primary Oscillator connection.RA5/CLKIN/SOSCI/T1CKI/PWM2(2)/OSC1RA5 TTL CMOS General purpose I/O.CLKIN CMOS External clock input (EC mode).SOSCI XTAL XTAL Secondary Oscillator Connection.T1CKI ST Timer1 clock input.PWM2 CMOS PWM output.OSC1 XTAL XTAL Primary Oscillator Connection.RC0/AN4/VREF+/C1IN+/C2IN+/SCL/SCK/ICSPDATRC0 TTL CMOS General purpose I/O.AN4 AN A/D Channel input.VREF+ AN Positive Voltage Reference input.C1IN+ AN Comparator positive input.C2IN+ AN Comparator positive input.SCL I2C OD I2C clock.SCK ST CMOS SPI clock.ICSPDAT ST CMOS ICSP Data I/O.Legend: AN = Analog input or output CMOS= CMOS compatible input or output OD = Open DrainTTL = TTL compatible input ST = Schmitt Trigger input with CMOS levels I2C = Schmitt Trigger input with I2C HV = High Voltage XTAL = Crystal levelsNote 1: Default location for peripheral pin function. Alternate location can be selected using the APFCON register.2: Alternate location for peripheral pin function selected by the APFCON register.3: LVP support for PIC18(L)F1XK50 legacy designs.PIC16(L)F1454/5/9DS41639A-page18 Preliminary 2012 Microchip Technology Inc.RC1/AN5/C1IN1-/C2IN1-/CWGFLT/SDA/SDI/INT/ICSPCLKRC1 TTL CMOS General purpose I/O.AN5 AN A/D Channel input.C1IN1- AN Comparator negative input.C2IN1- AN Comparator negative input.CWGFLT ST Complementary Waveform Generator Fault input.SDA I2C OD I2C data input/output.SDI CMOS SPI data input.INT ST External input.ICSPCLK ST ICSP Programming Clock.RC2/AN6/DACOUT1/C1IN2-/C2IN2-/SDO(1)RC2 TTL CMOS General purpose I/O.AN6 AN A/D Channel input.DACOUT1 AN Digital-to-Analog Converter output.C1IN2- AN Comparator negative input.C2IN2- AN Comparator negative input.SDO CMOS SPI data output.RC3/AN7/DACOUT2/C1IN3-/C2IN3-/PWM2(1)/SS(1)/CLKR(2)RC3 TTL CMOS General purpose I/O.AN7 AN A/D Channel input.DACOUT2 AN Digital-to-Analog Converter output.C1IN3- AN Comparator negative input.C2IN3- AN Comparator negative input.PWM2 CMOS PWM output.CLC2IN0 ST Configurable Logic Cell source input.CLKR CMOS Clock reference output.RC4/C1OUT/C2OUT/CWG1B/TX/CKRC4 TTL CMOS General purpose I/O.C1OUT CMOS Comparator output.C2OUT CMOS Comparator output.CWG1B CMOS CWG complementary output.TX CMOS USART asynchronous transmit.CK ST CMOS USART synchronous clock.RC5/T0CKI/CWG1A/RX/DT/PWM1RC5 TTL CMOS General purpose I/O.T0CKI ST Timer0 clock input.CWG1A CMOS CWG complementary output.RX ST USART asynchronous input.DT ST CMOS USART synchronous data.PWM1 CMOS PWM output.VDD VDD Power Positive supply.VSS VSS Power Ground reference.VUSB3V3 VUSB3V3 Power Positive supply for USB transceiver.TABLE 1-3: PIC16(L)F1455 PINOUT DESCRIPTION (CONTINUED)Name FunctionInput TypeOutput TypeDescriptionLegend: AN = Analog input or output CMOS= CMOS compatible input or output OD = Open DrainTTL = TTL compatible input ST = Schmitt Trigger input with CMOS levels I2C = Schmitt Trigger input with I2C HV = High Voltage XTAL = Crystal levelsNote 1: Default location for peripheral pin function. Alternate location can be selected using the APFCON register.2: Alternate location for peripheral pin function selected by the APFCON register.3: LVP support for PIC18(L)F1XK50 legacy designs. 2012 Microchip Technology Inc. Preliminary DS41639A-page19PIC16(L)F1454/5/9TABLE 1-4: PIC16(L)F1459 PINOUT DESCRIPTIONName FunctionInput TypeOutput TypeDescriptionRA0/D+/ICSPDAT(3)RA0 TTL CMOS General purpose I/O.D+ XTAL XTAL USB differential plus line.ICSPDAT ST CMOS ICSP Data I/O.RA1/D-/ICSPCLK(3)RA1 TTL CMOS General purpose I/O.D- XTAL XTAL USB differential minus line.ICSPCLK ST ICSP Programming Clock.RA3/VPP/T1G(2)/SS(2)/MCLR RA3 TTL General purpose input with IOC and WPU.VPP HV Programming voltage.T1G ST Timer1 Gate input.SS ST Slave Select input.MCLR ST Master Clear with internal pull-up.RA4/AN3/SOSCO/CLKOUT/T1G(1)/CLKR(1)/OSC2RA4 TTL CMOS General purpose I/O.AN3 AN A/D Channel input.SOSCO XTAL XTAL Secondary Oscillator Connection.CLKOUT CMOS FOSC/4 output.T1G ST Timer1 Gate input.CLKR CMOS Clock reference output.OSC2 XTAL XTAL Primary Oscillator connection.RA5/CLKIN/SOSCI/T1CKI/OSC1RA5 TTL CMOS General purpose I/O.CLKIN CMOS External clock input (EC mode).SOSCI XTAL XTAL Secondary Oscillator Connection.T1CKI ST Timer1 clock input.OSC1 XTAL XTAL Primary Oscillator Connection.RB4/AN10/SDA/SDI RB4 TTL CMOS General purpose I/O.AN10 AN A/D Channel input.SDA I2C OD I2C data input/output.SDI CMOS SPI data input.RB5/AN11/RX/DT RB5 TTL CMOS General purpose I/O.AN11 AN A/D Channel input.RX ST USART asynchronous input.DT ST CMOS USART synchronous data.RB6/SCL/SCK RB6 TTL CMOS General purpose I/O.SCL I2C OD I2C clock.SCK ST CMOS SPI clock.RB7/TX/CK RB7 TTL CMOS General purpose I/O.TX CMOS USART asynchronous transmit.CK ST CMOS USART synchronous clock.Legend: AN = Analog input or output CMOS= CMOS compatible input or output OD = Open DrainTTL = TTL compatible input ST = Schmitt Trigger input with CMOS levels I2C = Schmitt Trigger input with I2C HV = High Voltage XTAL = Crystal levelsNote 1: Default location for peripheral pin function. Alternate location can be selected using the APFCON register.2: Alternate location for peripheral pin function selected by the APFCON register.3: LVP support for PIC18(L)F1XK50 legacy designs.PIC16(L)F1454/5/9DS41639A-page20 Preliminary 2012 Microchip Technology Inc.RC0/AN4/VREF+/C1IN+/C2IN+/ICSPDATRC0 TTL CMOS General purpose I/O.AN4 AN A/D Channel input.VREF+ AN Positive Voltage Reference input.C1IN+ AN Comparator positive input.C2IN+ AN Comparator positive input.ICSPDAT ST CMOS ICSP Data I/O.RC1/AN5/C1IN1-/C2IN1-/CWGFLT/INT/ICSPCLKRC1 TTL CMOS General purpose I/O.AN5 AN A/D Channel input.C1IN1- AN Comparator negative input.C2IN1- AN Comparator negative input.CWGFLT ST Complementary Waveform Generator Fault input.INT ST External input.ICSPCLK ST ICSP Programming Clock.RC2/AN6/DACOUT1/C1IN2-/C2IN2-RC2 TTL CMOS General purpose I/O.AN6 AN A/D Channel input.DACOUT1 AN Digital-to-Analog Converter output.C1IN2- AN Comparator negative input.C2IN2- AN Comparator negative input.RC3/AN7/DACOUT2/C1IN3-/C2IN3-/CLKR(2)RC3 TTL CMOS General purpose I/O.AN7 AN A/D Channel input.DACOUT2 AN Digital-to-Analog Converter output.C1IN3- AN Comparator negative input.C2IN3- AN Comparator negative input.CLKR CMOS Clock reference output.RC4/C1OUT/C2OUT/CWG1BRC4 TTL CMOS General purpose I/O.C1OUT CMOS Comparator output.C2OUT CMOS Comparator output.CWG1B CMOS CWG complementary output.RC5/T0CKI/CWG1A/PWM1 RC5 TTL CMOS General purpose I/O.T0CKI ST Timer0 clock input.CWG1A CMOS CWG complementary output.PWM1 CMOS PWM output.RC6/AN8/SS(1)/PWM2 RC6 TTL CMOS General purpose I/O.AN8 AN A/D Channel input.SS ST Slave Select input.PWM2 CMOS PWM output.RC7/AN9/SDO RC7 TTL CMOS General purpose I/O.AN9 AN A/D Channel input.SDO CMOS SPI data output.VDD VDD Power Positive supply.VSS VSS Power Ground reference.VUSB3V3 VUSB3V3 Power Positive supply for USB transceiver.TABLE 1-4: PIC16(L)F1459 PINOUT DESCRIPTION (CONTINUED)Name FunctionInput TypeOutput TypeDescriptionLegend: AN = Analog input or output CMOS= CMOS compatible input or output OD = Open DrainTTL = TTL compatible input ST = Schmitt Trigger input with CMOS levels I2C = Schmitt Trigger input with I2C HV = High Voltage XTAL = Crystal levelsNote 1: Default location for peripheral pin function. Alternate location can be selected using the APFCON register.2: Alternate location for peripheral pin function selected by the APFCON register.3: LVP support for PIC18(L)F1XK50 legacy designs. 2012 Microchip Technology Inc. Preliminary DS41639A-page21PIC16(L)F1454/5/92.0 ENHANCED MID-RANGE CPUThis family of devices contain an enhanced mid-range8-bit CPU core. The CPU has 49 instructions. Interruptcapabilityincludesautomaticcontextsaving.Thehardware stack is 16 levels deep and has Overflow andUnderflowResetcapability.Direct,Indirect,andRelativeAddressingmodesareavailable.TwoFileSelectRegisters(FSRs)providetheabilitytoreadprogram and data memory. Automatic Interrupt Context Saving 16-level Stack with Overflow and Underflow File Select Registers Instruction SetFIGURE 2-1: CORE BLOCK DIAGRAMData Bus814ProgramBusInstruction regProgram Counter8 Level Stack(13-bit)Direct Addr712Addr MUXFSR regSTATUS regMUXALUInstructionDecode &ControlTimingGenerationOSC1/CLKINOSC2/CLKOUT88123InternalOscillatorBlockConfigurationData Bus814ProgramBusInstruction regProgram Counter8 Level Stack(13-bit)Direct Addr7Addr MUXFSR regSTATUS regMUXALUW RegInstructionDecode &ControlTimingGeneration883InternalOscillatorBlockConfiguration15Data Bus814ProgramBusInstruction RegProgram Counter16-Level Stack(15-bit)Direct Addr7RAM AddrAddr MUXIndirectAddrFSR0 RegSTATUS RegMUXALUInstructionDecode andControlTimingGeneration883InternalOscillatorBlockConfigurationFlashProgramMemoryRAMFSR reg FSR reg FSR1 Reg1515MUX15Program MemoryRead (PMR)12FSR reg FSR reg BSR Reg5Power-upTimerPower-onResetWatchdogTimerVDDBrown-outResetVSS VDD VSS VDD VSSPIC16(L)F1454/5/9DS41639A-page22 Preliminary 2012 Microchip Technology Inc.2.1 Automatic Interrupt Context SavingDuringinterrupts,certainregistersareautomaticallysaved in shadow registers and restored when returningfromtheinterrupt.Thissavesstackspaceandusercode. See Section 8.5 Automatic Context Saving,for more information.2.2 16-Level Stack with Overflow and UnderflowThese devices have an external stack memory 15 bitswide and 16 words deep. A Stack Overflow or Under-flow will set the appropriate bit (STKOVF or STKUNF)in the PCON register, and if enabled will cause a soft-ware Reset. See section Section 3.5 Stack for moredetails.2.3 File Select RegistersThere are two 16-bit File Select Registers (FSR). FSRscanaccessallfileregistersandprogrammemory,which allows one Data Pointer for all memory. When anFSR points to program memory, there is one additionalinstruction cycle in instructions using INDF to allow thedata to be fetched. General purpose memory can nowalsobeaddressedlinearly,providingtheabilitytoaccess contiguous data larger than 80 bytes. There arealsonewinstructionstosupporttheFSRs.SeeSection 3.6 Indirect Addressing for more details.2.4 Instruction SetThere are 49 instructions for the enhanced mid-rangeCPUtosupportthefeaturesoftheCPU.SeeSection 28.0InstructionSetSummaryformoredetails. 2012 Microchip Technology Inc. Preliminary DS41639A-page23PIC16(L)F1454/5/93.0 MEMORY ORGANIZATIONThese devices contain the following types of memory: Program Memory- Configuration Words- Device ID- User ID- Flash Program Memory Data Memory- Core Registers- Special Function Registers- Dual-Port General Purpose RAM- General Purpose RAM- Common RAMThe following features are associated with access andcontrol of program memory and data memory: PCL and PCLATH Stack Indirect Addressing3.1 Program Memory OrganizationTheenhancedmid-rangecorehasa15-bitprogramcountercapableofaddressinga32Kx14programmemoryspace.Table 3-1showsthememorysizesimplemented.Accessingalocationabovetheseboundarieswillcauseawrap-aroundwithintheimplementedmemoryspace.TheResetvectorisat0000handtheinterruptvectorisat0004h(SeeFigure 3-1).TABLE 3-1: DEVICE SIZES AND ADDRESSESDeviceProgram Memory Space (Words)Last Program Memory AddressHigh-Endurance FlashMemory Address Range (1)PIC16F1454PIC16LF14548,192 1FFFh 1F80h-1FFFhPIC16F1455PIC16LF14558,192 1FFFh 1F80h-1FFFhPIC16F1459PIC16LF14598,192 1FFFh 1F80h-1FFFhNote 1: High-endurance Flash applies to low byte of each address in the range.PIC16(L)F1454/5/9DS41639A-page24 Preliminary 2012 Microchip Technology Inc.FIGURE 3-1: PROGRAM MEMORY MAP AND STACK FOR PIC16(L)F1454/5/9 3.1.1 READING PROGRAM MEMORY AS DATAThere are two methods of accessing constants in pro-grammemory.ThefirstmethodistousetablesofRETLWinstructions.ThesecondmethodistosetanFSR to point to the program memory.3.1.1.1 RETLW InstructionThe RETLW instruction can be used to provide accessto tables of constants. The recommended way to createsuch a table is shown in Example 3-1.EXAMPLE 3-1: RETLW INSTRUCTIONThe BRW instruction makes this type of table very sim-pletoimplement.Ifyourcodemustremainportablewith previous generations of microcontrollers, then theBRW instruction is not available so the older table readmethod must be used.PC150000h0004hStack Level 0Stack Level 15Reset VectorInterrupt VectorStack Level 10005hOn-chipProgramMemoryPage 007FFhRollover to Page 00800h0FFFh1000h7FFFhPage 1Rollover to Page 3Page 2Page 317FFh1800h1FFFh2000hCALL, CALLW RETURN, RETLWInterrupt, RETFIE constantsBRW ;Add Index in W to;program counter to;select dataRETLW DATA0 ;Index0 dataRETLW DATA1 ;Index1 dataRETLW DATA2RETLW DATA3my_function; LOTS OF CODEMOVLW DATA_INDEXcall constants; THE CONSTANT IS IN W 2012 Microchip Technology Inc. Preliminary DS41639A-page25PIC16(L)F1454/5/93.1.1.2 Indirect Read with FSRThe program memory can be accessed as data by set-ting bit 7 of the FSRxH register and reading the match-ing INDFx register. The MOVIW instruction will place thelower eight bits of the addressed word in the W register.Writes to the program memory cannot be performed viatheINDFregisters.Instructionsthataccessthepro-gram memory via the FSR require one extra instructioncycle to complete. Example 3-2 demonstrates access-ing the program memory via an FSR.The High directive will set bit if a label points to alocation in program memory.EXAMPLE 3-2: ACCESSING PROGRAM MEMORY VIA FSRconstantsRETLW DATA0 ;Index0 dataRETLW DATA1 ;Index1 dataRETLW DATA2RETLW DATA3my_function; LOTS OF CODEMOVLW LOW constantsMOVWF FSR1LMOVLW HIGH constantsMOVWF FSR1HMOVIW 0[FSR1];THE PROGRAM MEMORY IS IN WPIC16(L)F1454/5/9DS41639A-page26 Preliminary 2012 Microchip Technology Inc.3.2 Data Memory OrganizationThedatamemoryispartitionedin32memorybankswith128bytesinabank.Eachbankconsistsof(Figure 3-2): 12 core registers 20 Special Function Registers (SFR) Up to 80 bytes of General Purpose RAM (GPR) Up to 80 bytes of Dual-Port General Purpose RAM (DPR) 16 bytes of common RAMThe active bank is selected by writing the bank numberintotheBankSelectRegister(BSR).Unimplementedmemorywillreadas0.Alldatamemorycanbeaccessedeitherdirectly(viainstructionsthatusethefileregisters)orindirectlyviathetwoFileSelectRegisters(FSR).SeeSection 3.6IndirectAddressing for more information.Data memory uses a 12-bit address. The upper 7-bitsof the address define the Bank address and the lower5-bits select the registers/RAM in that bank.3.2.1 CORE REGISTERSThecoreregisterscontaintheregistersthatdirectlyaffectthebasicoperation.Thecoreregistersoccupythefirst12addressesofeverydatamemorybank(addressesx00h/x08hthroughx0Bh/x8Bh).TheseregistersarelistedbelowinTable 3-2.Fordetailedinformation, see Table 3-11.TABLE 3-2: CORE REGISTERSAddresses BANKxx00h or x80h INDF0x01h or x81h INDF1x02h or x82h PCLx03h or x83h STATUSx04h or x84h FSR0Lx05h or x85h FSR0Hx06h or x86h FSR1Lx07h or x87h FSR1Hx08h or x88h BSRx09h or x89h WREGx0Ah or x8Ah PCLATHx0Bh or x8Bh INTCON 2012 Microchip Technology Inc. Preliminary DS41639A-page27PIC16(L)F1454/5/93.2.1.1 STATUS RegisterThe STATUS register, shown in Register 3-1, contains: the arithmetic status of the ALU the Reset statusTheSTATUSregistercanbethedestinationforanyinstruction,likeanyotherregister.IftheSTATUSregister is the destination for an instruction that affectsthe Z, DC or C bits, then the write to these three bits isdisabled. These bits are set or cleared according to thedevice logic. Furthermore, the TO and PD bits are notwritable. Therefore, the result of an instruction with theSTATUS register as destination may be different thanintended.For example, CLRF STATUS will clear the upper threebits and set the Z bit. This leaves the STATUS registeras 000u u1uu (where u = unchanged).Itisrecommended,therefore,thatonlyBCF,BSF,SWAPFandMOVWFinstructionsareusedtoaltertheSTATUSregister,becausetheseinstructionsdonotaffectanyStatusbits.ForotherinstructionsnotaffectinganyStatusbits(RefertoSection 28.0Instruction Set Summary). 3.3 Register Definitions: Status Note 1: TheCandDCbitsoperateasBorrowand Digit Borrow out bits, respectively, insubtraction.REGISTER 3-1: STATUS: STATUS REGISTERU-0 U-0 U-0 R-1/q R-1/q R/W-0/u R/W-0/u R/W-0/u TO PD Z DC(1)C(1)bit 7 bit 0Legend:R = Readable bit W = Writable bit U = Unimplemented bit, read as 0u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets1 = Bit is set 0 = Bit is cleared q = Value depends on conditionbit 7-5 Unimplemented: Read as 0bit 4 TO: Time-Out bit1 = After power-up, CLRWDT instruction or SLEEP instruction0 = A WDT time-out occurredbit 3 PD: Power-Down bit1 = After power-up or by the CLRWDT instruction0 = By execution of the SLEEP instructionbit 2 Z: Zero bit1 = The result of an arithmetic or logic operation is zero0 = The result of an arithmetic or logic operation is not zerobit 1 DC: Digit Carry/Digit Borrow bit (ADDWF, ADDLW, SUBLW, SUBWF instructions)(1)1 = A carry-out from the 4th low-order bit of the result occurred0 = No carry-out from the 4th low-order bit of the resultbit 0 C: Carry/Borrow bit(1) (ADDWF, ADDLW, SUBLW, SUBWF instructions)(1)1 = A carry-out from the Most Significant bit of the result occurred0 = No carry-out from the Most Significant bit of the result occurredNote 1: For Borrow, the polarity is reversed. A subtraction is executed by adding the twos complement of the second operand. For rotate (RRF, RLF) instructions, this bit is loaded with either the high-order or low-order bit of the source register.PIC16(L)F1454/5/9DS41639A-page28 Preliminary 2012 Microchip Technology Inc.3.3.1 SPECIAL FUNCTION REGISTERThe Special Function Registers are registers used bytheapplicationtocontrolthedesiredoperationofperipheral functions in the device. The Special FunctionRegisters occupy the 20 bytes after the core registers ofeverydatamemorybank(addressesx0Ch/x8Chthrough x1Fh/x9Fh). The registers associated with theoperation of the peripherals are described in the appro-priate peripheral chapter of this data sheet.3.3.2 GENERAL PURPOSE RAMThere are up to 80 bytes of GPR in each data memorybank.TheSpecialFunctionRegistersoccupythe20bytesafterthecoreregistersofeverydatamemorybank (addresses x0Ch/x8Ch through x1Fh/x9Fh).3.3.2.1 Linear Access to GPRThegeneralpurposeRAMcanbeaccessedinanon-bankedmethodviatheFSRs.Thiscansimplifyaccess to large memory structures. See Section 3.6.2Linear Data Memory for more information.RefertoTable 3-3forDualPortandUSBaddressinginformation.3.3.3 DUAL-PORT RAMPartofthedatamemoryismappedtoaspecial dualaccessRAM.WhentheUSBmodule isdisabled,theGPRs in these banks are used like any other GPR inthe data memory space.When the USB module is enabled, the memory in thesebanksisallocatedasbufferRAMforUSBoperation.Thisareaissharedbetweenthemicrocontrollercoreand the USB Serial Interface Engine (SIE) and is usedto transfer data directly between the two.It is theoretically possible to use the areas of USB RAMthatarenotallocatedasUSBbuffersfornormalscratchpad memory or other variable storage. In practice,the dynamic nature of buffer allocation makes this risky atbest.AdditionalinformationonUSBRAMandbufferoperation is provided in Section 26.0 Universal SerialBus (USB).3.3.4 COMMON RAMThere are 16 bytes of common RAM accessible from allbanks.TABLE 3-3: DUAL PORT RAM ADDRESSINGPort 0 Port 1CPU Banked Address CPU Linear Address USB Banked Address USB Linear Address020 - 06F 2000 - 204F 020 - 06F 2000 - 204F0A0 - 0EF 2050 - 209F 0A0 - 0EF 2050 - 209F120 - 16F 20A0 - 20EF 120 - 16F 20A0 - 20EF1A0 - 1EF 20F0 - 213F 1A0 - 1EF 20F0 - 213F220 - 26F 2140 - 218F 220 - 26F 2140 - 218F2A0 - 2EF 2190 - 21DF 2A0 - 2EF 2190 - 21DF320 - 32F 21E0 - 21EF 320 - 32F 21E0 - 21EF370 - 37F (1) 370 - 37F (1)Note 1: Accessible from banked memory only. 2012 Microchip Technology Inc. Preliminary DS41639A-page29PIC16(L)F1454/5/9FIGURE 3-2: BANKED MEMORY PARTITIONING 3.3.5 DEVICE MEMORY MAPSThememorymapsforPIC16(L)F1454/5/9areasshown in Table 3-8 and Table 3-9.0Bh0Ch1Fh20h6Fh70h7Fh00hCommon RAM(16 bytes)Dual Port RAM(80 bytes maximum)Core Registers(12 bytes)Special Function Registers(20 bytes maximum)Memory Region 7-bit Bank Offset(1)General Purpose RAM(80 bytes maximum)ORNote 1: If the USB module is disabled, data memory is GPR. If enabled, data memory can be DPR. Refer to Mem-ory Map for RAM type details.PIC16(L)F1454/5/9DS41639A-page 30Preliminary 2012 Microchip Technology Inc.TABLE 3-4: PIC16(L)F1454 MEMORY MAP, BANK 0-7BANK 0 BANK 1 BANK 2 BANK 3 BANK 4 BANK 5 BANK 6 BANK 7000hCore Registers (Table 3-2)080hCore Registers (Table 3-2)100hCore Registers (Table 3-2)180hCore Registers (Table 3-2)200hCore Registers (Table 3-2)280hCore Registers (Table 3-2)300hCore Registers (Table 3-2)380hCore Registers (Table 3-2)00Bh 08Bh 10Bh 18Bh 20Bh 28Bh 30Bh 38Bh00Ch PORTA 08Ch TRISA 10Ch LATA 18Ch 20Ch WPUA 28Ch 30Ch 38Ch 00Dh 08Dh 10Dh 18Dh 20Dh 28Dh 30Dh 38Dh 00Eh PORTC 08Eh TRISC 10Eh LATC 18Eh 20Eh 28Eh 30Eh 38Eh 00Fh 08Fh 10Fh 18Fh 20Fh 28Fh 30Fh 38Fh 010h 090h 110h 190h 210h 290h 310h 390h 011h PIR1 091h PIE1 111h 191h PMADRL 211h SSP1BUF 291h 311h 391h IOCAP012h PIR2 092h PIE2 112h 192h PMADRH 212h SSP1ADD 292h 312h 392h IOCAN013h 093h 113h 193h PMDATL 213h SSP1MSK 293h 313h 393h IOCAF014h 094h 114h 194h PMDATH 214h SSP1STAT 294h 314h 394h 015h TMR0 095h OPTION_REG 115h 195h PMCON1 215h SSP1CON1 295h 315h 395h 016h TMR1L 096h PCON 116h BORCON 196h PMCON2 216h SSP1CON2 296h 316h 396h 017h TMR1H 097h WDTCON 117h 197h VREGCON 217h SSP1CON3 297h 317h 397h 018h T1CON 098h OSCTUNE 118h 198h 218h 298h 318h 398h 019h T1GCON 099h OSCCON 119h 199h RCREG 219h 299h 319h 399h 01Ah TMR2 09Ah OSCSTAT 11Ah 19Ah TXREG 21Ah 29Ah 31Ah 39Ah CLKRCON01Bh PR2 09Bh 11Bh 19Bh SPBRG 21Bh 29Bh 31Bh 39Bh CRCON01Ch T2CON 09Ch 11Ch 19Ch SPBRGH 21Ch 29Ch 31Ch 39Ch 01Dh 09Dh 11Dh APFCON 19Dh RCSTA 21Dh 29Dh 31Dh 39Dh 01Eh 09Eh 11Eh 19Eh TXSTA 21Eh 29Eh 31Eh 39Eh 01Fh 09Fh 11Fh 19Fh BAUDCON 21Fh 29Fh 31Fh 39Fh 020hDual-PortGeneralPurposeRegister80 Bytes0A0hDual-PortGeneralPurposeRegister80 Bytes120hDual-PortGeneralPurposeRegister80 Bytes1A0hDual-PortGeneralPurposeRegister80 Bytes220hDual-PortGeneralPurposeRegister80 Bytes2A0hDual-PortGeneralPurposeRegister80 Bytes320h Dual-PortGeneralPurposeRegister16Bytes3A0hGeneralPurposeRegister80 Bytes0EFh32Fh330h GeneralPurposeRegister64 Bytes06Fh 16Fh 1EFh 26Fh 2EFh 36Fh 3EFh070hDual-PortCommon RAM0F0hCommon RAM(Accesses70h 7Fh)170hCommon RAM(Accesses70h 7Fh)1F0hCommon RAM(Accesses70h 7Fh)270hCommon RAM(Accesses70h 7Fh)2F0hCommon RAM(Accesses70h 7Fh)370hCommon RAM(Accesses70h 7Fh)3F0hCommon RAM(Accesses70h 7Fh)07Fh 0FFh 17Fh 1FFh 27Fh 2FFh 37Fh 3FFhLegend: = Unimplemented data memory locations, read as 0. 2012 Microchip Technology Inc.PreliminaryDS41639A-page 31PIC16(L)F1454/5/9TABLE 3-5: PIC16(L)F1455 MEMORY MAP, BANK 0-7BANK 0 BANK 1 BANK 2 BANK 3 BANK 4 BANK 5 BANK 6 BANK 7000hCore Registers (Table 3-2)080hCore Registers (Table 3-2)100hCore Registers (Table 3-2)180hCore Registers (Table 3-2)200hCore Registers (Table 3-2)280hCore Registers (Table 3-2)300hCore Registers (Table 3-2)380hCore Registers (Table 3-2)00Bh 08Bh 10Bh 18Bh 20Bh 28Bh 30Bh 38Bh00Ch PORTA 08Ch TRISA 10Ch LATA 18Ch ANSELA 20Ch WPUA 28Ch 30Ch 38Ch 00Dh 08Dh 10Dh 18Dh 20Dh 28Dh 30Dh 38Dh 00Eh PORTC 08Eh TRISC 10Eh LATC 18Eh ANSELC 20Eh 28Eh 30Eh 38Eh 00Fh 08Fh 10Fh 18Fh 20Fh 28Fh 30Fh 38Fh 010h 090h 110h 190h 210h 290h 310h 390h 011h PIR1 091h PIE1 111h CM1CON0 191h PMADRL 211h SSP1BUF 291h 311h 391h IOCAP012h PIR2 092h PIE2 112h CM1CON1 192h PMADRH 212h SSP1ADD 292h 312h 392h IOCAN013h 093h 113h CM2CON0 193h PMDATL 213h SSP1MSK 293h 313h 393h IOCAF014h 094h 114h CM2CON1 194h PMDATH 214h SSP1STAT 294h 314h 394h 015h TMR0 095h OPTION_REG 115h CMOUT 195h PMCON1 215h SSP1CON1 295h 315h 395h 016h TMR1L 096h PCON 116h BORCON 196h PMCON2 216h SSP1CON2 296h 316h 396h 017h TMR1H 097h WDTCON 117h FVRCON 197h VREGCON 217h SSP1CON3 297h 317h 397h 018h T1CON 098h OSCTUNE 118h DACCON0 198h 218h 298h 318h 398h 019h T1GCON 099h OSCCON 119h DACCON1 199h RCREG 219h 299h 319h 399h 01Ah TMR2 09Ah OSCSTAT 11Ah 19Ah TXREG 21Ah 29Ah 31Ah 39Ah CLKRCON01Bh PR2 09Bh ADRESL 11Bh 19Bh SPBRG 21Bh 29Bh 31Bh 39Bh CRCON01Ch T2CON 09Ch ADRESH 11Ch 19Ch SPBRGH 21Ch 29Ch 31Ch 39Ch 01Dh 09Dh ADCON0 11Dh APFCON 19Dh RCSTA 21Dh 29Dh 31Dh 39Dh 01Eh 09Eh ADCON1 11Eh 19Eh TXSTA 21Eh 29Eh 31Eh 39Eh 01Fh 09Fh ADCON2 11Fh 19Fh BAUDCON 21Fh 29Fh 31Fh 39Fh 020hDual-PortGeneralPurposeRegister80 Bytes0A0hDual-PortGeneralPurposeRegister80 Bytes120hDual-PortGeneralPurposeRegister80 Bytes1A0hDual-PortGeneralPurposeRegister80 Bytes220hDual-PortGeneralPurposeRegister80 Bytes2A0hDual-PortGeneralPurposeRegister80 Bytes320h Dual-PortGeneralPurposeRegister16Bytes3A0hGeneralPurposeRegister80 Bytes0EFh32Fh330h GeneralPurposeRegister64 Bytes06Fh 16Fh 1EFh 26Fh 2EFh 36Fh 3EFh070hDual-PortCommon RAM0F0hCommon RAM(Accesses70h 7Fh)170hCommon RAM(Accesses70h 7Fh)1F0hCommon RAM(Accesses70h 7Fh)270hCommon RAM(Accesses70h 7Fh)2F0hCommon RAM(Accesses70h 7Fh)370hCommon RAM(Accesses70h 7Fh)3F0hCommon RAM(Accesses70h 7Fh)07Fh 0FFh 17Fh 1FFh 27Fh 2FFh 37Fh 3FFhLegend: = Unimplemented data memory locations, read as 0.PIC16(L)F1454/5/9DS41639A-page 32Preliminary 2012 Microchip Technology Inc.TABLE 3-6: PIC16(L)F1459 MEMORY MAP, BANK 0-7BANK 0 BANK 1 BANK 2 BANK 3 BANK 4 BANK 5 BANK 6 BANK 7000hCore Registers (Table 3-2)080hCore Registers (Table 3-2)100hCore Registers (Table 3-2)180hCore Registers (Table 3-2)200hCore Registers (Table 3-2)280hCore Registers (Table 3-2)300hCore Registers (Table 3-2)380hCore Registers (Table 3-2)00Bh 08Bh 10Bh 18Bh 20Bh 28Bh 30Bh 38Bh00Ch PORTA 08Ch TRISA 10Ch LATA 18Ch ANSELA 20Ch WPUA 28Ch 30Ch 38Ch 00Dh PORTB 08Dh TRISB 10Dh LATB 18Dh ANSELB 20Dh WPUB 28Dh 30Dh 38Dh 00Eh PORTC 08Eh TRISC 10Eh LATC 18Eh ANSELC 20Eh 28Eh 30Eh 38Eh 00Fh 08Fh 10Fh 18Fh 20Fh 28Fh 30Fh 38Fh 010h 090h 110h 190h 210h 290h 310h 390h 011h PIR1 091h PIE1 111h CM1CON0 191h PMADRL 211h SSP1BUF 291h 311h 391h IOCAP012h PIR2 092h PIE2 112h CM1CON1 192h PMADRH 212h SSP1ADD 292h 312h 392h IOCAN013h 093h 113h CM2CON0 193h PMDATL 213h SSP1MSK 293h 313h 393h IOCAF014h 094h 114h CM2CON1 194h PMDATH 214h SSP1STAT 294h 314h 394h IOCBP015h TMR0 095h OPTION_REG 115h CMOUT 195h PMCON1 215h SSP1CON1 295h 315h 395h IOCBN016h TMR1L 096h PCON 116h BORCON 196h PMCON2 216h SSP1CON2 296h 316h 396h IOCBF017h TMR1H 097h WDTCON 117h FVRCON 197h VREGCON 217h SSP1CON3 297h 317h 397h 018h T1CON 098h OSCTUNE 118h DACCON0 198h 218h 298h 318h 398h 019h T1GCON 099h OSCCON 119h DACCON1 199h RCREG 219h 299h 319h 399h 01Ah TMR2 09Ah OSCSTAT 11Ah 19Ah TXREG 21Ah 29Ah 31Ah 39Ah CLKRCON01Bh PR2 09Bh ADRESL 11Bh 19Bh SPBRG 21Bh 29Bh 31Bh 39Bh CRCON01Ch T2CON 09Ch ADRESH 11Ch 19Ch SPBRGH 21Ch 29Ch 31Ch 39Ch 01Dh 09Dh ADCON0 11Dh APFCON 19Dh RCSTA 21Dh 29Dh 31Dh 39Dh 01Eh 09Eh ADCON1 11Eh 19Eh TXSTA 21Eh 29Eh 31Eh 39Eh 01Fh 09Fh ADCON2 11Fh 19Fh BAUDCON 21Fh 29Fh 31Fh 39Fh 020hDual-PortGeneralPurposeRegister80 Bytes0A0hDual-PortGeneralPurposeRegister80 Bytes120hDual-PortGeneralPurposeRegister80 Bytes1A0hDual-PortGeneralPurposeRegister80 Bytes220hDual-PortGeneralPurposeRegister80 Bytes2A0hDual-PortGeneralPurposeRegister80 Bytes320h Dual-PortGeneralPurposeRegister16Bytes3A0hGeneralPurposeRegister80 Bytes32Fh330hGeneralPurposeRegister64 Bytes06Fh 0EFh 16Fh 1EFh 26Fh 2EFh 36Fh3EFh070hDual-PortCommon RAM0F0hCommon RAM(Accesses70h 7Fh)170hCommon RAM(Accesses70h 7Fh)1F0hCommon RAM(Accesses70h 7Fh)270hCommon RAM(Accesses70h 7Fh)2F0hCommon RAM(Accesses70h 7Fh)370hCommon RAM(Accesses70h 7Fh)3F0hCommon RAM(Accesses70h 7Fh)07Fh 0FFh 17Fh 1FFh 27Fh 2FFh 37Fh 3FFhLegend: = Unimplemented data memory locations, read as 0. 2012 Microchip Technology Inc.PreliminaryDS41639A-page 33PIC16(L)F1454/5/9TABLE 3-7: PIC16(L)F1454 MEMORY MAP, BANK 8-23BANK 8 BANK 9 BANK 10 BANK 11 BANK 12 BANK 13 BANK 14 BANK 15400h40BhCore Registers (Table 3-2)480h48BhCore Registers (Table 3-2)500h50BhCore Registers (Table 3-2)580h58BhCore Registers (Table 3-2)600h60BhCore Registers (Table 3-2)680h68BhCore Registers (Table 3-2)700h70BhCore Registers (Table 3-2)780h78BhCore Registers (Table 3-2)40Ch 48Ch 50Ch 58Ch 60Ch 68Ch 70Ch 78Ch 40Dh 48Dh 50Dh 58Dh 60Dh 68Dh 70Dh 78Dh 40Eh 48Eh 50Eh 58Eh 60Eh 68Eh 70Eh 78Eh 40Fh 48Fh 50Fh 58Fh 60Fh 68Fh 70Fh 78Fh 410h 490h 510h 590h 610h 690h 710h 790h 411h 491h 511h 591h 611h PWM1DCL 691h 711h 791h 412h 492h 512h 592h 612h PWM1DCH 692h 712h 792h 413h 493h 513h 593h 613h PWM1CON 693h 713h 793h 414h 494h 514h 594h 614h PWM2DCL 694h 714h 794h 415h 495h 515h 595h 615h PWM2DCH 695h 715h 795h 416h 496h 516h 596h 616h PWM2CON 696h 716h 796h 417h 497h 517h 597h 617h 697h 717h 797h 418h 498h 518h 598h 618h 698h 718h 798h 419h 499h 519h 599h 619h 699h 719h 799h 41Ah 49Ah 51Ah 59Ah 61Ah 69Ah 71Ah 79Ah 41Bh 49Bh 51Bh 59Bh 61Bh 69Bh 71Bh 79Bh 41Ch 49Ch 51Ch 59Ch 61Ch 69Ch 71Ch 79Ch 41Dh 49Dh 51Dh 59Dh 61Dh 69Dh 71Dh 79Dh 41Eh 49Eh 51Eh 59Eh 61Eh 69Eh 71Eh 79Eh 41Fh 49Fh 51Fh 59Fh 61Fh 69Fh 71Fh 79Fh 420hGeneralPurposeRegister80 Bytes4A0hGeneralPurposeRegister80 Bytes520hGeneralPurposeRegister80 Bytes5A0hGeneralPurposeRegister80 Bytes620h GeneralPurposeRegister48 Bytes6A0hUnimplementedRead as 0720hUnimplementedRead as 07A0hUnimplementedRead as 064Fh650hUnimplementedRead as 046Fh 4EFh 56Fh 5EFh 66Fh 6EFh 76Fh 7EFh470hCommon RAM(Accesses70h 7Fh)4F0hCommon RAM(Accesses70h 7Fh)570hCommon RAM(Accesses70h 7Fh)5F0hCommon RAM(Accesses70h 7Fh)670hCommon RAM(Accesses70h 7Fh)6F0hCommon RAM(Accesses70h 7Fh)770hCommon RAM(Accesses70h 7Fh)7F0hCommon RAM(Accesses70h 7Fh)47Fh 4FFh 57Fh 5FFh 67Fh 6FFh 77Fh 7FFhBANK 16 BANK 17 BANK 18 BANK 19 BANK 20 BANK 21 BANK 22 BANK 23800h80BhCore Registers (Table 3-2 )880h88BhCore Registers (Table 3-2)900h90BhCore Registers (Table 3-2)980h98BhCore Registers (Table 3-2)A00hA0BhCore Registers (Table 3-2)A80hA8BhCore Registers (Table 3-2)B00hB0BhCore Registers (Table 3-2)B80hB8BhCore Registers (Table 3-2)80ChUnimplementedRead as 088ChUnimplementedRead as 090ChUnimplementedRead as 098ChUnimplementedRead as 0A0ChUnimplementedRead as 0A8ChUnimplementedRead as 0B0ChUnimplementedRead as 0B8ChUnimplementedRead as 086Fh 8EFh 96Fh 9EFh A6Fh AEFh B6Fh BEFh870hCommon RAM(Accesses70h 7Fh)8F0hCommon RAM(Accesses70h 7Fh)970hCommon RAM(Accesses70h 7Fh)9F0hCommon RAM(Accesses70h 7Fh)A70hCommon RAM(Accesses70h 7Fh)AF0hCommon RAM(Accesses70h 7Fh)B70hCommon RAM(Accesses70h 7Fh)BF0hCommon RAM(Accesses70h 7Fh)87Fh 8FFh 97Fh 9FFh A7Fh AFFh B7Fh BFFhLegend: = Unimplemented data memory locations, read as 0.PIC16(L)F1454/5/9DS41639A-page 34Preliminary 2012 Microchip Technology Inc.TABLE 3-8: PIC16(L)F1455/9 MEMORY MAP, BANK 8-23BANK 8 BANK 9 BANK 10 BANK 11 BANK 12 BANK 13 BANK 14 BANK 15400h40BhCore Registers (Table 3-2)480h48BhCore Registers (Table 3-2)500h50BhCore Registers (Table 3-2)580h58BhCore Registers (Table 3-2)600h60BhCore Registers (Table 3-2)680h68BhCore Registers (Table 3-2)700h70BhCore Registers (Table 3-2)780h78BhCore Registers (Table 3-2)40Ch 48Ch 50Ch 58Ch 60Ch 68Ch 70Ch 78Ch 40Dh 48Dh 50Dh 58Dh 60Dh 68Dh 70Dh 78Dh 40Eh 48Eh 50Eh 58Eh 60Eh 68Eh 70Eh 78Eh 40Fh 48Fh 50Fh 58Fh 60Fh 68Fh 70Fh 78Fh 410h 490h 510h 590h 610h 690h 710h 790h 411h 491h 511h 591h 611h PWM1DCL 691h CWG1DBR 711h 791h 412h 492h 512h 592h 612h PWM1DCH 692h CWG1DBF 712h 792h 413h 493h 513h 593h 613h PWM1CON 693h CWG1CON0 713h 793h 414h 494h 514h 594h 614h PWM2DCL 694h CWG1CON1 714h 794h 415h 495h 515h 595h 615h PWM2DCH 695h CWG1CON2 715h 795h 416h 496h 516h 596h 616h PWM2CON 696h 716h 796h 417h 497h 517h 597h 617h 697h 717h 797h 418h 498h 518h 598h 618h 698h 718h 798h 419h 499h 519h 599h 619h 699h 719h 799h 41Ah 49Ah 51Ah 59Ah 61Ah 69Ah 71Ah 79Ah 41Bh 49Bh 51Bh 59Bh 61Bh 69Bh 71Bh 79Bh 41Ch 49Ch 51Ch 59Ch 61Ch 69Ch 71Ch 79Ch 41Dh 49Dh 51Dh 59Dh 61Dh 69Dh 71Dh 79Dh 41Eh 49Eh 51Eh 59Eh 61Eh 69Eh 71Eh 79Eh 41Fh 49Fh 51Fh 59Fh 61Fh 69Fh 71Fh 79Fh 420hGeneralPurposeRegister80 Bytes4A0hGeneralPurposeRegister80 Bytes520hGeneralPurposeRegister80 Bytes5A0hGeneralPurposeRegister80 Bytes620h GeneralPurposeRegister48 Bytes6A0hUnimplementedRead as 0720hUnimplementedRead as 07A0hUnimplementedRead as 064Fh650hUnimplementedRead as 046Fh 4EFh 56Fh 5EFh 66Fh 6EFh 76Fh 7EFh470hCommon RAM(Accesses70h 7Fh)4F0hCommon RAM(Accesses70h 7Fh)570hCommon RAM(Accesses70h 7Fh)5F0hCommon RAM(Accesses70h 7Fh)670hCommon RAM(Accesses70h 7Fh)6F0hCommon RAM(Accesses70h 7Fh)770hCommon RAM(Accesses70h 7Fh)7F0hCommon RAM(Accesses70h 7Fh)47Fh 4FFh 57Fh 5FFh 67Fh 6FFh 77Fh 7FFhBANK 16 BANK 17 BANK 18 BANK 19 BANK 20 BANK 21 BANK 22 BANK 23800h80BhCore Registers (Table 3-2 )880h88BhCore Registers (Table 3-2)900h90BhCore Registers (Table 3-2)980h98BhCore Registers (Table 3-2)A00hA0BhCore Registers (Table 3-2)A80hA8BhCore Registers (Table 3-2)B00hB0BhCore Registers (Table 3-2)B80hB8BhCore Registers (Table 3-2)80ChUnimplementedRead as 088ChUnimplementedRead as 090ChUnimplementedRead as 098ChUnimplementedRead as 0A0ChUnimplementedRead as 0A8ChUnimplementedRead as 0B0ChUnimplementedRead as 0B8ChUnimplementedRead as 086Fh 8EFh 96Fh 9EFh A6Fh AEFh B6Fh BEFh870hCommon RAM(Accesses70h 7Fh)8F0hCommon RAM(Accesses70h 7Fh)970hCommon RAM(Accesses70h 7Fh)9F0hCommon RAM(Accesses70h 7Fh)A70hCommon RAM(Accesses70h 7Fh)AF0hCommon RAM(Accesses70h 7Fh)B70hCommon RAM(Accesses70h 7Fh)BF0hCommon RAM(Accesses70h 7Fh)87Fh 8FFh 97Fh 9FFh A7Fh AFFh B7Fh BFFhLegend: = Unimplemented data memory locations, read as 0. 2012 Microchip Technology Inc.PreliminaryDS41639A-page 35PIC16(L)F1454/5/9TABLE 3-9: PIC16(L)F1454/5/9 MEMORY MAP, BANK 24-31Legend: = Unimplemented data memory locations, read as 0.BANK 24 BANK 25 BANK 26 BANK 27 BANK 28 BANK 29 BANK 30 BANK 31C00hC0BhCore Registers (Table 3-2)C80hC8BhCore Registers (Table 3-2)D00hD0BhCore Registers (Table 3-2)D80hD8BhCore Registers (Table 3-2)E00hE0BhCore Registers (Table 3-2)E80hE8BhCore Registers (Table 3-2)F00hF0BhCore Registers (Table 3-2)F80hF8BhCore Registers (Table 3-2)C0Ch C8Ch D0Ch D8Ch E0Ch E8Ch F0Ch F8ChSee Table 3-10 for register map-ping detailsC0Dh C8Dh D0Dh D8Dh E0Dh E8Dh F0Dh F8DhC0Eh C8Eh D0Eh D8Eh E0Eh E8Eh UCON F0Eh F8EhC0Fh C8Fh D0Fh D8Fh E0Fh E8Fh USTAT F0Fh F8FhC10h C90h D10h D90h E10h E90h UIR F10h F90hC11h C91h D11h D91h E11h E91h UCFG F11h F91hC12h C92h D12h D92h E12h E92h UIE F12h F92hC13h C93h D13h D93h E13h E93h UEIR F13h F93hC14h C94h D14h D94h E14h E94h UFRMH F14h F94hC15h C95h D15h D95h E15h E95h UFRML F15h F95hC16h C96h D16h D96h E16h E96h UADDR F16h F96hC17h C97h D17h D97h E17h E97h UEIE F17h F97hC18h C98h D18h D98h E18h E98h UEP0 F18h F98hC19h C99h D19h D99h E19h E99h UEP1 F19h F99hC1Ah C9Ah D1Ah D9Ah E1Ah E9Ah UEP2 F1Ah F9AhC1Bh C9Bh D1Bh D9Bh E1Bh E9Bh UEP3 F1Bh F9BhC1Ch C9Ch D1Ch D9Ch E1Ch E9Ch UEP4 F1Ch F9ChC1Dh C9Dh D1Dh D9Dh E1Dh E9Dh UEP5 F1Dh F9DhC1Eh C9Eh D1Eh D9Eh E1Eh E9Eh UEP6 F1Eh F9EhC1Fh C9Fh D1Fh D9Fh E1Fh E9Fh UEP7 F1Fh F9FhC20hUnimplementedRead as 0CA0hUnimplementedRead as 0D20hUnimplementedRead as 0DA0hUnimplementedRead as 0E20hUnimplementedRead as 0EA0hUnimplementedRead as 0F20hUnimplementedRead as 0FA0hC6Fh CEFh D6Fh DEFh E6Fh EEFh F6Fh FEFhC70hCommon RAM(Accesses70h 7Fh)CF0hCommon RAM(Accesses70h 7Fh)D70hCommon RAM(Accesses70h 7Fh)DF0hCommon RAM(Accesses70h 7Fh)E70hCommon RAM(Accesses70h 7Fh)EF0hCommon RAM(Accesses70h 7Fh)F70hCommon RAM(Accesses70h 7Fh)FF0hCommon RAM(Accesses70h 7Fh)CFFh CFFh D7Fh DFFh E7Fh EFFh F7Fh FFFhPIC16(L)F1454/5/9DS41639A-page36 Preliminary 2012 Microchip Technology Inc.TABLE 3-10: PIC16(L)F1454/5/9 MEMORY MAP, BANK 30-31

Bank 31F8ChFE3hUnimplementedRead as 0FE4hSTATUS_SHADFE5hWREG_SHADFE6hBSR_SHADFE7hPCLATH_SHADFE8hFSR0L_SHADFE9hFSR0H_SHADFEAhFSR1L_SHADFEBhFSR1H_SHADFEChFEDh STKPTRFEEh TOSLFEFh TOSHLegend:= Unimplemented data memory locations, read as 0. 2012 Microchip Technology Inc. Preliminary DS41639A-page37PIC16(L)F1454/5/93.3.6 CORE FUNCTION REGISTERS SUMMARYThe Core Function registers listed in Table 3-11 can beaddressed from any Bank.TABLE 3-11: CORE FUNCTION REGISTERS SUMMARYAddr Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2Bit 1 Bit 0Value onPOR, BORValue on all other Resets Bank 0-31x00h or x80hINDF0Addressing this location uses contents of FSR0H/FSR0L to address data memory(not a physical register)xxxx xxxx uuuu uuuux01h or x81hINDF1Addressing this location uses contents of FSR1H/FSR1L to address data memory(not a physical register)xxxx xxxx uuuu uuuux02h or x82hPCL Program Counter (PC) Least Significant Byte 0000 0000 0000 0000x03h or x83hSTATUS TO PD Z DC C ---1 1000 ---q quuux04h or x84hFSR0L Indirect Data Memory Address 0 Low Pointer 0000 0000 uuuu uuuux05h or x85hFSR0H Indirect Data Memory Address 0 High Pointer 0000 0000 0000 0000x06h or x86hFSR1L Indirect Data Memory Address 1 Low Pointer 0000 0000 uuuu uuuux07h or x87hFSR1H Indirect Data Memory Address 1 High Pointer 0000 0000 0000 0000x08h or x88hBSR BSR ---0 0000 ---0 0000x09h or x89hWREG Working Register 0000 0000 uuuu uuuux0Ah or x8AhPCLATH Write Buffer for the upper 7 bits of the Program Counter -000 0000 -000 0000x0Bh or x8BhINTCON GIEPEIE TMR0IE INTE IOCIE TMR0IF INTF IOCIF 0000 0000 0000 0000Legend: x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, read as 0, r = reserved. Shaded locations are unimplemented, read as 0.PIC16(L)F1454/5/9DS41639A-page38 Preliminary 2012 Microchip Technology Inc.TABLE 3-12: SPECIAL FUNCTION REGISTER SUMMARYAddressName Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2Bit 1 Bit 0Value onPOR, BORValue on all other Resets Bank 000Ch PORTA RA5 RA4 RA3 RA1 RA0 --xx x-xx --xx x-xx00Dh PORTB(1)RB7 RB6 RB5 RB4 xxxx ---- xxxx ----00Eh PORTC RC7(1)RC6(1)RC5 RC4 RC3 RC2 RC1 RC0 xxxx xxxx xxxx xxxx00Fh Unimplemented 010h Unimplemented 011h PIR1 TMR1GIF ADIF RCIF TXIF SSP1IF TMR2IF TMR1IF 0000 0-00 0000 0-00012h PIR2 OSFIF C2IF C1IF BCL1IF USBIF ACTIF 000- 000- 000- 000-013h Unimplemented 014h Unimplemented 015h TMR0 Holding Register for the 8-bit Timer0 Count xxxx xxxx uuuu uuuu016h TMR1L Holding Register for the Least Significant Byte of the 16-bit TMR1 Count xxxx xxxx uuuu uuuu017h TMR1H Holding Register for the Most Significant Byte of the 16-bit TMR1 Count xxxx xxxx uuuu uuuu018h T1CON TMR1CS T1CKPS T1OSCEN T1SYNC TMR1ON 0000 00-0 uuuu uu-u019h T1GCON TMR1GE T1GPOL T1GTM T1GSPM T1GGO/DONET1GVAL T1GSS 0000 0x00 uuuu uxuu01Ah TMR2 Timer2 Module Register 0000 0000 0000 000001Bh PR2 Timer2 Period Register 1111 1111 1111 111101Ch T2CON T2OUTPS TMR2ON T2CKPS -000 0000 -000 000001Dh Unimplemented 01Eh Unimplemented 01Fh Unimplemented Bank 108Ch TRISA TRISA5 TRISA4 (2) (2)(2)--11 ---- --11 ----08Dh TRISB(1)TRISB7 TRISB6 TRISB5 TRISB4 1111 ---- 1111 ----08Eh TRISC TRISC7(1)TRISC6(1)TRISC5 TRISC4 TRISC3 TRISC2 TRISC1 TRISC0 1111 1111 1111 111108Fh Unimplemented 090h Unimplemented 091h PIE1 TMR1GIE ADIE RCIE TXIE SSP1IE TMR2IE TMR1IE 0000 0-00 0000 0-00092h PIE2 OSFIE C2IE C1IE BCL1IE USBIE ACTIE 000- 000- 000- 000-093h Unimplemented 094h Unimplemented 095h OPTION_REG WPUEN INTEDG TMR0CS TMR0SE PSA PS 1111 1111 1111 1111096h PCON STKOVF STKUNF RWDT RMCLR RI POR BOR 00-1 11qq qq-q qquu097h WDTCON WDTPS SWDTEN --01 0110 --01 0110098h OSCTUNE TUN -000 0000 -uuu uuuu099h OSCCON SPLLEN SPLLMULT IRCF SCS 0011 1100 0011 110009Ah OSCSTAT SOSCR PLLRDY OSTS HFIOFR LFIOFR HFIOFS 00q0 --00 qqqq --qq09Bh ADRESL(2)A/D Result Register Low xxxx xxxx uuuu uuuu09Ch ADRESH(2)A/D Result Register High xxxx xxxx uuuu uuuu09Dh ADCON0(2) CHS GO/DONE ADON -000 0000 -000 000009Eh ADCON1(2)ADFM ADCS ADPREF 0000 --00 0000 --0009Fh ADCON2(2) TRIGSEL -000 ---- -000 ----Legend: x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, r = reserved. Shaded locations are unimplemented, read as 0.Note 1: PIC16(L)F1459 only.2: PIC16(L)F1455/9 only.3: Unimplemented, read as 1. 2012 Microchip Technology Inc. Preliminary DS41639A-page39PIC16(L)F1454/5/9 Bank 210Ch LATA LATA5 LATA4 --xx ---- --uu ----10Dh LATB(1)LATB7 LATB6 LATB5 LATB4 xxxx ---- uuuu ----10Eh LATC LATC7(1)LATC6(1)LATC5 LATC4 LATC3 LATC2 LATC1 LATC0 xxxx xxxx uuuu uuuu10Fh Unimplemented 110h Unimplemented 111h CM1CON0(2)C1ON C1OUT C1OE C1POL C1SP C1HYS C1SYNC 0000 -100 0000 -100112h CM1CON1(2)C1INTP C1INTN C1PCH C1NCH 0000 -000 0000 -000113h CM2CON0(2)C2ON C2OUT C2OE C2POL C2SP C2HYS C2SYNC 0000 -100 0000 -100114h CM2CON1(2)C2INTP C2INTN C2PCH C2NCH 0000 -000 0000 -000115h CMOUT(2) MC2OUT MC1OUT ---- --00 ---- --00116h BORCON SBOREN BORFS BORRDY 10-- ---q uu-- ---u117h FVRCON(2)FVREN FVRRDY TSEN TSRNG CDAFVR ADFVR 0q00 0000 0q00 0000118h DACCON0(2)DACEN DACOE1 DACOE2 DACPSS 0-00 00-- 0-00 00--119h DACCON1(2) DACR ---0 0000 ---0 000011Ahto11Ch Unimplemented 11Dh APFCON CLKRSEL SDOSEL(1)SSSELT1GSEL P2SEL(1) 000- --00 000- --0011Eh Unimplemented 11Fh Unimplemented Bank 318Ch ANSELA(2) ANSA4 ---1 ---- ---1 ----18Dh ANSELB(1) ANSB5 ANSB4 --11 ---- --11 ----18Eh ANSELC(2)ANSC7(1)ANSC6(1) ANSC3 ANSC2 ANSC1 ANSC0 11-- 1111 11-- 111118Fh Unimplemented 190h Unimplemented 191h PMADRL Flash Program Memory Address Register Low Byte 0000 0000 0000 0000192h PMADRH (2)Flash Program Memory Address Register High Byte 1000 0000 1000 0000193h PMDATL Flash Program Memory Read Data Register Low Byte xxxx xxxx uuuu uuuu194h PMDATH Flash Program Memory Read Data Register High Byte --xx xxxx --uu uuuu195h PMCON1 (2)CFGS LWLO FREE WRERR WREN WR RD 1000 x000 1000 q000196h PMCON2 Flash Program Memory Control Register 20000 0000 0000 0000197h VREGCON(1) VREGPM Reserved ---- --01 ---- --01198h Unimplemented 199h RCREG USART Receive Data Register 0000 0000 0000 000019Ah TXREG USART Transmit Data Register 0000 0000 0000 000019Bh SPBRGL Baud Rate Generator Data Register Low 0000 0000 0000 000019Ch SPBRGH Baud Rate Generator Data Register High 0000 0000 0000 000019Dh RCSTA SPEN RX9 SREN CREN ADDEN FERR OERR RX9D 0000 000x 0000 000x19Eh TXSTA CSRC TX9 TXEN SYNC SENDB BRGH TRMT TX9D 0000 0010 0000 001019Fh BAUDCON ABDOVF RCIDL SCKP BRG16 WUE ABDEN 01-0 0-00 01-0 0-00TABLE 3-12: SPECIAL FUNCTION REGISTER SUMMARY (CONTINUED)AddressName Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2Bit 1 Bit 0Value onPOR, BORValue on all other ResetsLegend: x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, r = reserved. Shaded locations are unimplemented, read as 0.Note 1: PIC16(L)F1459 only.2: PIC16(L)F1455/9 only.3: Unimplemented, read as 1.PIC16(L)F1454/5/9DS41639A-page40 Preliminary 2012 Microchip Technology Inc. Bank 420Ch WPUA WPUA5 WPUA4 WPUA3 --11 1--- --11 1---20Dh WPUB(1)WPUB7 WPUB6 WPUB5 WPUB4 1111 ---- 1111 ----20Ehto210h Unimplemented 211h SSP1BUF Synchronous Serial Port Receive Buffer/Transmit Register xxxx xxxx uuuu uuuu212h SSP1ADD ADD 0000 0000 0000 0000213h SSP1MSK MSK 1111 1111 1111 1111214h SSP1STAT SMP CKE D/A P S R/W UA BF 0000 0000 0000 0000215h SSP1CON1 WCOL SSPOV SSPEN CKP SSPM 0000 0000 0000 0000216h SSP1CON2 GCEN ACKSTAT ACKDT ACKEN RCEN PEN RSEN SEN 0000 0000 0000 0000217h SSP1CON3 ACKTIM PCIE SCIE BOEN SDAHT SBCDE AHEN DHEN 0000 0000 0000 0000218hto21Fh Unimplemented Bank 528Chto29Fh Unimplemented Bank 630Chto31Fh Unimplemented Bank 738Chto390h Unimplemented 391h IOCAP IOCAP5 IOCAP4 IOCAP3 IOCAP1 IOCAP0 --00 0-00 --00 0-00392h IOCAN IOCAN5 IOCAN4 IOCAN3 IOCAN1 IOCAN0 --00 0-00 --00 0-00393h IOCAF IOCAF5 IOCAF4 IOCAF3 IOCAF1 IOCAF0 --00 0-00 --00 0-00394h IOCBP(1)IOCBP7 IOCBP6 IOCBP5 IOCBP4 0000 ---- 0000 ----395h IOCBN(1)IOCBN7 IOCBN6 IOCBN5 IOCBN4 0000 ---- 0000 ----396h IOCBF(1)IOCBF7 IOCBF6 IOCBF5 IOCBF4 0000 ---- 0000 ----397hto399h Unimplemented 39Ah CLKRCON CLKREN CLKROE CLKRSLR CLKRDC CLKRDIV 0011 0000 0011 000039Bh ACTCON ACTEN ACTUD ACTSRC ACTLOCK ACTORS 00-0 0-0- 00-0 0-0-39Chto39Fh Unimplemented Bank 840Chto41Fh Unimplemented Bank 948Chto49Fh Unimplemented TABLE 3-12: SPECIAL FUNCTION REGISTER SUMMARY (CONTINUED)AddressName Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2Bit 1 Bit 0Value onPOR, BORValue on all other ResetsLegend: x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, r = reserved. Shaded locations are unimplemented, read as 0.Note 1: PIC16(L)F1459 only.2: PIC16(L)F1455/9 only.3: Unimplemented, read as 1. 2012 Microchip Technology Inc. Preliminary DS41639A-page41PIC16(L)F1454/5/9 Bank 1050Chto51Fh Unimplemented Bank 1158Chto59Fh Unimplemented Bank 1260Chto610h Unimplemented 611h PWM1DCL PWM1DCL 00-- ---- 00-- ----612h PWM1DCH PWM1DCH xxxx xxxx uuuu uuuu613h PWM1CON0 PWM1EN PWM1OE PWM1OUT PWM1POL 0000 ---- 0000 ----614h PWM2DCL PWM2DCL 00-- ---- 00-- ----615h PWM2DCH PWM2DCH xxxx xxxx uuuu uuuu616h PWM2CON0 PWM2EN PWM2OE PWM2OUT PWM2POL 0000 ---- 0000 ----617hto61Fh Unimplemented Bank 1368Chto690h Unimplemented 691h CWG1DBR(2) CWG1DBR --00 0000 --00 0000692h CWG1DBF(2) CWG1DBF --xx xxxx --xx xxxx693h CWG1CON0(2)G1EN G1OEB G1OEA G1POLB G1POLA G1CS0 0000 0--0 0000 0--0694h CWG1CON1(2)G1ASDLB G1ASDLA G1IS 0000 --00 0000 --00695h CWG1CON2(2)G1ASE G1ARSEN G1ASDC2 G1ASDC1 G1ASDSFLT 00-- 0001 00-- 000-696hto69Fh Unimplemented Banks 14-28x0Ch/x8Ch x1Fh/x9Fh Unimplemented TABLE 3-12: SPECIAL FUNCTION REGISTER SUMMARY (CONTINUED)AddressName Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2Bit 1 Bit 0Value onPOR, BORValue on all other ResetsLegend: x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, r = reserved. Shaded locations are unimplemented, read as 0.Note 1: PIC16(L)F1459 only.2: PIC16(L)F1455/9 only.3: Unimplemented, read as 1.PIC16(L)F1454/5/9DS41639A-page42 Preliminary 2012 Microchip Technology Inc. Bank 29E8Ch Unimplemented E8Dh Unimplemented E8EhUCONPPBRST SE0 PKTDIS USBEN RESUME SUSPND -0x0 000- -0u0 000-E8FhUSTATENDP DIR PPBI -xxx xxx- -uuu uuu-E90hUIRSOFIF STALLIF IDLEIF TRNIF ACTVIF UERRIF URSTIF-000 0000 -000 0000E91hUCFG UTEYE ReservedUPUEN Reserved FSEN PPB00-0 -000 00-0 -000E92hUIESOFIE STALLIE IDLEIE TRNIE ACTVIE UERRIE URSTIE-000 0000 -000 0000E93hUEIR BTSEF BTOEF DFN8EF CRC16EF CRC5EF PIDEF0--0 -000 0--0 -000E94hUFRMH FRM10 FRM9 FRM8---- -xxx ---- -uuuE95hUFRML FRM7 FRM6 FRM5 FRM4 FRM3 FRM2 FRM1 FRM0xxxx xxxx uuuu uuuuE96hUADDRADDR6 ADDR5 ADDR4 ADDR3 ADDR2 ADDR1 ADDR0-000 0000 -000 0000E97hUEIE BTSEE BTOEE DFN8EE CRC16EE CRC5EE PIDEE0--0 0000 0--0 0000E98hUEP7 EPHSHK EPCONDIS EPOUTEN EPINEN EPSTALL---0 0000 ---0 0000E99hUEP6 EPHSHK EPCONDIS EPOUTEN EPINEN EPSTALL---0 0000 ---0 0000E9AhUEP5 EPHSHK EPCONDIS EPOUTEN EPINEN EPSTALL---0 0000 ---0 0000E9BhUEP4 EPHSHK EPCONDIS EPOUTEN EPINEN EPSTALL---0 0000 ---0 0000E9ChUEP3 EPHSHK EPCONDIS EPOUTEN EPINEN EPSTALL---0 0000 ---0 0000E9DhUEP2 EPHSHK EPCONDIS EPOUTEN EPINEN EPSTALL---0 0000 ---0 0000E9EhUEP1 EPHSHK EPCONDIS EPOUTEN EPINEN EPSTALL---0 0000 ---0 0000E9FhUEP0 EPHSHK EPCONDIS EPOUTEN EPINEN EPSTALL---0 0000 ---0 0000 Bank 30F0Ch F1Fh Unimplemented TABLE 3-12: SPECIAL FUNCTION REGISTER SUMMARY (CONTINUED)AddressName Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2Bit 1 Bit 0Value onPOR, BORValue on all other ResetsLegend: x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, r = reserved. Shaded locations are unimplemented, read as 0.Note 1: PIC16(L)F1459 only.2: PIC16(L)F1455/9 only.3: Unimplemented, read as 1. 2012 Microchip Technology Inc. Preliminary DS41639A-page43PIC16(L)F1454/5/9 Bank 31F8Ch FE3h Unimplemented FE4h STATUS_SHAD Z_SHAD DC_SHAD C_SHAD ---- -xxx ---- -uuuFE5h WREG_SHADWorking Register Shadow xxxx xxxx uuuu uuuuFE6h BSR_SHAD Bank Select Register Shadow ---x xxxx ---u uuuuFE7h PCLATH_SHAD Program Counter Latch High Register Shadow -xxx xxxx uuuu uuuuFE8h FSR0L_SHADIndirect Data Memory Address 0 Low Pointer Shadow xxxx xxxx uuuu uuuuFE9h FSR0H_SHADIndirect Data Memory Address 0 High Pointer Shadow xxxx xxxx uuuu uuuuFEAh FSR1L_SHADIndirect Data Memory Address 1 Low Pointer Shadow xxxx xxxx uuuu uuuuFEBh FSR1H_SHADIndirect Data Memory Address 1 High Pointer Shadow xxxx xxxx uuuu uuuuFECh Unimplemented FEDhSTKPTR Current Stack Pointer ---1 1111 ---1 1111FEEhTOSLTop-of-Stack Low byte xxxx xxxx uuuu uuuuFEFhTOSH Top-of-Stack High byte -xxx xxxx -uuu uuuuTABLE 3-12: SPECIAL FUNCTION REGISTER SUMMARY (CONTINUED)AddressName Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2Bit 1 Bit 0Value onPOR, BORValue on all other ResetsLegend: x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, r = reserved. Shaded locations are unimplemented, read as 0.Note 1: PIC16(L)F1459 only.2: PIC16(L)F1455/9 only.3: Unimplemented, read as 1.PIC16(L)F1454/5/9DS41639A-page44 Preliminary 2012 Microchip Technology Inc.3.4 PCL and PCLATHThe Program Counter (PC) is 15 bits wide. The low bytecomesfromthePCLregister,whichisareadableandwritable register. The high byte (PC) is not directlyreadableorwritableandcomesfromPCLATH.OnanyReset,thePCiscleared.Figure 3-3showsthefivesituations for the loading of the PC. FIGURE 3-3: LOADING OF PC IN DIFFERENT SITUATIONS3.4.1 MODIFYING PCLExecuting any instruction with the PCL register as thedestination simultaneously causes the Program Coun-ter PC bits (PCH) to be replaced by the contentsof the PCLATH register. This allows the entire contentsoftheprogramcountertobechangedbywritingthedesired upper seven bits to the PCLATH register. Whenthe lower eight bits are written to the PCL register, all15 bits of the program counter will change to the valuescontained in the PCLATH register and those being writ-ten to the PCL register.3.4.2 COMPUTED GOTOA computed GOTO is accomplished by adding an offset tothe program counter (ADDWF PCL). When performing atable read using a computed GOTO method, care shouldbe exercised if the table location crosses a PCL memoryboundary(each256-byteblock).RefertoApplicationNote AN556, Implementing a Table Read (DS00556).3.4.3 COMPUTED FUNCTION CALLSA computed function CALL allows programs to maintaintables of functions and provide another way to executestatemachines or look-up tables. When performing atablereadusingacomputedfunctionCALL,careshould be exercised if the table location crosses a PCLmemory boundary (each 256-byte block).If using the CALL instruction, the PCH and PCLregistersareloadedwiththeoperandoftheCALLinstruction. PCH is loaded with PCLATH.The CALLW instruction enables computed calls by com-bining PCLATH and W to form the destination address.A computed CALLW is accomplished by loading the Wregister with the desired address and executing CALLW.ThePCLregisterisloadedwiththevalueofWandPCH is loaded with PCLATH.3.4.4 BRANCHINGThebranchinginstructionsaddanoffsettothePC.Thisallowsrelocatablecodeandcodethatcrossespageboundaries.Therearetwoformsofbranching,BRW andBRA.ThePC willhaveincremented tofetchthenextinstructioninbothcases.Whenusingeitherbranching instruction, a PCL memory boundary may becrossed.IfusingBRW,loadtheWregisterwiththedesiredunsigned address and execute BRW. The entire PC willbe loaded with the address PC + 1 + W.If using BRA, the entire PC will be loaded with PC + 1 +,the signed value of the operand of the BRA instruction.PCL PCH 0 14PCPCL PCH 0 14PCALU Result8 76PCLATH0Instruction withPCL as DestinationGOTO, CALLOPCODE 11 46PCLATH0PCL PCH 0 14PCW8 7 6PCLATH0CALLWPCL PCH 0 14PCPC + W15BRWPCL PCH 0 14PCPC + OPCODE 15BRA 2012 Microchip Technology Inc. Preliminary DS41639A-page45PIC16(L)F1454/5/93.5 StackAlldeviceshavea16-level x 15-bitwidehardwarestack(refertoFigures 3-4through 3-7).Thestackspace is not part of either program or data space. ThePCisPUSHedontothestackwhenCALLorCALLWinstructionsareexecutedoraninterruptcausesabranch. The stack is POPed in the event of a RETURN,RETLW or a RETFIE instruction execution. PCLATH isnot affected by a PUSH or POP operation.The stack operates as a circular buffer if the STVRENbitisprogrammedto0(ConfigurationWords).Thismeans that after the stack has been PUSHed sixteentimes, the seventeenth PUSH overwrites the value thatwas stored from the first PUSH. The eighteenth PUSHoverwritesthesecondPUSH(andsoon).TheSTKOVF and STKUNF flag bits will be set on an Over-flow/Underflow,regardlessofwhethertheResetisenabled.3.5.1 ACCESSING THE STACKThestackisavailablethroughtheTOSH,TOSLandSTKPTR registers. STKPTR is the current value of theStackPointer.TOSH:TOSLregisterpairpointstotheTOP of the stack. Both registers are read/writable. TOSis split into TOSH and TOSL due to the 15-bit size of thePC. To access the stack, adjust the value of STKPTR,whichwillpositionTOSH:TOSL,thenread/writetoTOSH:TOSL. STKPTR is five bits to allow detection ofoverflow and underflow.During normal program operation, CALL, CALLW andInterruptswillincrementSTKPTRwhileRETLW,RETURN, and RETFIE will decrement STKPTR. At anytime STKPTR can be inspected to see how much stackis left. The STKPTR always points at the currently usedplace onthe stack. Therefore,aCALLorCALLW willincrement theSTKPTRand then writethePC,and areturnwillunloadthePCandthendecrementtheSTKPTR.Reference Figure 3-4 through Figure 3-7 for examplesof accessing the stack.FIGURE 3-4: ACCESSING THE STACK EXAMPLE 1Note 1: Therearenoinstructions/mnemonicscalled PUSH or POP. These are actionsthatoccurfromtheexecutionoftheCALL,CALLW,RETURN,RETLWandRETFIEinstructionsorthevectoringtoan interrupt address.Note: Care should be taken when modifying theSTKPTR while interrupts are enabled.0x0F0x0E0x0D0x0C0x0B0x0A0x090x080x070x060x050x040x030x020x010x000x0000STKPTR = 0x1FInitial Stack Configuration:After Reset, the stack is empty. Theempty stack is initialized so the StackPointer is pointing at 0x1F. If the StackOverflow/Underflow Reset is enabled, theTOSH/TOSL registers will return 0. Ifthe Stack Overflow/Underflow Reset isdisabled, the TOSH/TOSL registers willreturn the contents of stack address 0x0F. 0x1F STKPTR = 0x1FStack Reset Disabled(STVREN = 0) Stack Reset Enabled(STVREN = 1) TOSH:TOSLTOSH:TOSLPIC16(L)F1454/5/9DS41639A-page46 Preliminary 2012 Microchip Technology Inc.FIGURE 3-5: ACCESSING THE STACK EXAMPLE 2FIGURE 3-6: ACCESSING THE STACK EXAMPLE 30x0F0x0E0x0D0x0C0x0B0x0A0x090x080x070x060x050x040x030x020x01Return Address 0x00 STKPTR = 0x00This figure shows the stack configurationafter the first CALL or a single interrupt.If a RETURNinstruction is executed, thereturn address will be placed in theProgram Counter and the Stack Pointerdecremented to the empty state (0x1F).TOSH:TOSL0x0F0x0E0x0D0x0C0x0B0x0A0x090x080x07Return Address 0x06Return Address 0x05Return Address 0x04Return Address 0x03Return Address 0x02Return Address 0x01Return Address 0x00STKPTR = 0x06After seven CALLs or six CALLs and aninterrupt, the stack looks like the figureon the left.A series of RETURN instructionswill repeatedly place the return addresses into the Program Counter and pop the stack.TOSH:TOSL 2012 Microchip Technology Inc. Preliminary DS41639A-page47PIC16(L)F1454/5/9FIGURE 3-7: ACCESSING THE STACK EXAMPLE 43.5.2 OVERFLOW/UNDERFLOW RESETIftheSTVRENbitinConfigurationWordsisprogrammed to 1, the device will be reset if the stackisPUSHedbeyondthesixteenthlevelorPOPedbeyondthefirstlevel,settingtheappropriatebits(STKOVForSTKUNF,respectively)inthePCONregister.3.6 Indirect AddressingTheINDFnregistersarenotphysicalregisters.AnyinstructionthataccessesanINDFnregisteractuallyaccessestheregisterat the addressspecifiedbytheFileSelectRegisters(FSR).IftheFSRnaddressspecifies one of the two INDFn registers, the read willreturn 0 and the write will not occur (though Status bitsmay be affected). The FSRn register value is createdby the pair FSRnH and FSRnL.The FSR registers form a 16-bit address that allows anaddressing space with 65536 locations. These locationsare divided into three memory regions: Traditional Data Memory Linear Data Memory Program Flash Memory0x0F0x0E0x0D0x0C0x0B0x0A0x090x080x070x060x050x040x030x020x01Return Address 0x00 STKPTR = 0x10When the stack is full, the next CALL oran interrupt will set the Stack Pointer to0x10.This is identical to address 0x00so the stack will wrap and overwrite thereturn address at 0x00.If the StackOverflow/Underflow Reset is enabled, aReset will occur and location 0x00 willnot be overwritten.Return AddressReturn AddressReturn AddressReturn AddressReturn AddressReturn AddressReturn AddressReturn AddressReturn AddressReturn AddressReturn AddressReturn AddressReturn AddressReturn AddressReturn AddressTOSH:TOSLPIC16(L)F1454/5/9DS41639A-page48 Preliminary 2012 Microchip Technology Inc.FIGURE 3-8: INDIRECT ADDRESSING0x00000x0FFFTraditionalFSRAddressRangeData Memory0x1000ReservedLinearData MemoryReserved0x20000x29AF0x29B00x7FFF0x80000xFFFF0x00000x0FFF0x00000x7FFFProgramFlash MemoryNote: Not all memory regions are completely implemented. Consult device memory tables for memory limits.0x1FFF 2012 Microchip Technology Inc. Preliminary DS41639A-page49PIC16(L)F1454/5/93.6.1 TRADITIONAL DATA MEMORYThetraditionaldatamemoryisaregionfromFSRaddress 0x000 to FSR address 0xFFF. The addressescorrespond to the absolute addresses of all SFR, GPR,DPR and common registers.FIGURE 3-9: TRADITIONAL DATA MEMORY MAPIndirect Addressing Direct AddressingBank Select Location Select4 BSR 6 0 From Opcode FSRxL 7 0Bank Select Location Select00000 00001 00010 111110x000x7FBank 0 Bank 1 Bank 2 Bank 310 FSRxH 7 00 0 0 0PIC16(L)F1454/5/9DS41639A-page50 Preliminary 2012 Microchip Technology Inc.3.6.2 LINEAR DATA MEMORYThelineardatamemoryistheregionfromFSRaddress 0x2000 to FSR address 0x29AF. This region isa virtual region that points back to the 80-byte blocks ofDPR or GPR memory in all the banks.Unimplementedmemoryreadsas0x00.Useofthelinear datamemoryregionallows buffers tobe largerthan 80 bytes because incrementing the FSR beyondone bank will go directly to the DPR or GPR memory ofthe next bank.The 16 bytes of common memory are not included inthe linear data memory region.FIGURE 3-10: LINEAR DATA MEMORY MAP3.6.3 PROGRAM FLASH MEMORYTomakeconstantdataaccesseasier,theentireprogram Flash memory is mapped to the upper half ofthe FSR address space. When the MSB of FSRnH isset,thelower15bitsaretheaddressinprogrammemory which will be accessed through INDF. Only thelower eight bits of each memory location is accessiblevia INDF. Writing to the program Flash memory cannotbeaccomplishedviatheFSR/INDFinterface.Allinstructions that access program Flash memory via theFSR/INDFinterfacewillrequireoneadditionalinstruction cycle to complete.FIGURE 3-11: PROGRAM FLASH MEMORY MAP70 17 0 0Location Select0x2000FSRnH FSRnL0x020Bank 00x06F0x0A0Bank 10x0EF0x120Bank 20x16F0xF20Bank 300xF6F0x29AF0717 0 0Location Select0x8000FSRnH FSRnL0x00000x7FFF0xFFFFProgramFlashMemory(low 8bits) 2012 Microchip Technology Inc. Preliminary DS41639A-page51PIC16(L)F1454/5/94.0 DEVICE CONFIGURATIONDevice configuration consists of Configuration Words,Code Protection and Device ID.4.1 Configuration WordsThereareseveralConfigurationWordbitsthatallowdifferentoscillatorandmemoryprotectionoptions.TheseareimplementedasConfigurationWord1at8007h and Configuration Word 2 at 8008h.Note: TheDEBUGbitinConfigurationWordsismanagedautomaticallybydevicedevelopmenttoolsincludingdebuggersandprogrammers.Fornormaldeviceoperation, this bit should be maintained asa '1'.PIC16(L)F1454/5/9DS41639A-page52 Preliminary 2012 Microchip Technology Inc.4.2 Register Definitions: Configuration Words REGISTER 4-1: CONFIG1: CONFIGURATION WORD 1R/P-1 R/P-1 R/P-1 R/P-1 R/P-1 U-1FCMEN IESO CLKOUTEN BOREN bit 13 bit 8R/P-1 R/P-1 R/P-1 R/P-1 R/P-1 R/P-1 R/P-1 R/P-1CP MCLRE PWRTE WDTE FOSCbit 7 bit 0Legend:R = Readable bit P = Programmable bit U = Unimplemented bit, read as 10 = Bit is cleared 1 = Bit is set -n = Value when blank or after Bulk Erasebit 13FCMEN: Fail-Safe Clock Monitor Enable bit1 = Fail-Safe Clock Monitor is enabled0 = Fail-Safe Clock Monitor is disabledbit 12 IESO: Internal External Switchover bit1 = Internal/External Switchover mode is enabled0 = Internal/External Switchover mode is disabledbit 11 CLKOUTEN: Clock Out Enable bit1 = CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin0 = CLKOUT function is enabled on the CLKOUT pin bit 10-9 BOREN: Brown-out Reset Enable bits(1)11 = BOR enabled10 = BOR enabled during operation and disabled in Sleep01 = BOR controlled by SBOREN bit of the BORCON register00 = BOR disabledbit 8 Unimplemented: Read as 1bit 7 CP: Code Protection bit(2)1 = Program memory code protection is disabled0 = Program memory code protection is enabledbit 6 MCLRE: MCLR/VPP Pin Function Select bitIf LVP bit = 1:This bit is ignored.If LVP bit = 0:1 = MCLR/VPP pin function is MCLR; Weak pull-up enabled.0 = MCLR/VPPpinfunctionisdigitalinput;MCLRinternallydisabled;Weakpull-upundercontrol ofWPUA register.bit 5 PWRTE: Power-Up Timer Enable bit1 = PWRT disabled0 = PWRT enabledbit 4-3 WDTE: Watchdog Timer Enable bits11 = WDT enabled10 = WDT enabled while running and disabled in Sleep01 = WDT controlled by the SWDTEN bit in the WDTCON register00 = WDT disabled 2012 Microchip Technology Inc. Preliminary DS41639A-page53PIC16(L)F1454/5/9bit 2-0 FOSC: Oscillator Selection bits111 = ECH: External clock, High-Power mode: on CLKIN pin110 = ECM: External clock, Medium-Power mode: on CLKIN pin101 = ECL: External clock, Low-Power mode: on CLKIN pin100 = INTOSC oscillator: I/O function on OSC1 pin011 = EXTRC oscillator: RC function connected to CLKIN pin010 = HS oscillator: High-speed crystal/resonator on OSC1 and OSC2 pins001 = XT oscillator: Crystal/resonator on OSC1 and OSC2 pins000 = LP oscillator