PIC12(L)F1840 8-Pin Flash Microcontrollers with XLP Technology High-Performance RISC CPU Extreme Low-Power Management with PIC12LF1840 XLP Only 49 Instructions to Learn: - All single-cycle instructions except branches Sleep mode: 20 nA 1.8V, typical Operating Speed: Watchdog Timer: 500 nA 1.8V, typical - DC 32 MHz oscillator/clock input Timer1 Oscillator: 300 nA 32 kHz, 1.8V, typical - DC 125 ns instruction cycle Operating Current: 30 A/MHz 1.8V, typical Interrupt Capability with Automatic Context Saving Analog Features 16-Level Deep Hardware Stack with Optional Analog-to-Digital Converter (ADC) module: Overflow/Underflow Reset - 10-bit resolution, 4 channels Direct, Indirect and Relative Addressing modes: - Conversion available during Sleep - Two full 16-bit File Select Registers (FSRs) Analog Comparator module: - FSRs can read program and data memory - One rail-to-rail analog comparator - Power mode control Flexible Oscillator Structure - Software controllable hysteresis Precision 32 MHz Internal Oscillator Block: Voltage Reference module: - Factory calibrated to 1%, typical - Fixed Voltage Reference (FVR) with 1.024V, - Software selectable frequencies range of 2.048V and 4.096V output levels 31 kHz to 32 MHz - 5-bit rail-to-rail resistive DAC with positive 31 kHz Low-Power Internal Oscillator and negative reference selection Four Crystal modes up to 32 MHz Three External Clock modes up to 32 MHz Peripheral Highlights 4X Phase Lock Loop (PLL) 5 I/O Pins and 1 Input-Only Pin: Fail-Safe Clock Monitor: - High current sink/source 25 mA/25 mA - Allows for safe shutdown if peripheral clock - Programmable weak pull-ups stops - Programmable interrupt-on-change pins Two-Speed Oscillator Start-up Timer0: 8-Bit Timer/Counter with 8-Bit Prescaler Reference Clock module: Enhanced Timer1: - Programmable clock output frequency and - 16-bit timer/counter with prescaler duty-cycle - External Gate Input mode - Dedicated, low-power 32 kHz oscillator driver Special Microcontroller Features Timer2: 8-Bit Timer/Counter with 8-Bit Period Operating Voltage Range: Register, Prescaler and Postscaler - 2.3V-5.5V (PIC12F1840) Enhanced CCP (ECCP) module: - 1.8V-3.6V (PIC12LF1840) - Software selectable time bases Self-Reprogrammable under Software Control - Auto-shutdown and auto-restart Power-on Reset (POR), Power-up Timer (PWRT) - PWM steering and Oscillator Start-up Timer (OST) Master Synchronous Serial Port (MSSP) with SPI 2 TM Programmable Brown-out Reset (BOR) and I C with: Extended Watchdog Timer (WDT) - 7-bit address masking TM In-Circuit Serial Programming (ICSP) via - SMBus/PMBus compatibility Two Pins Enhanced Universal Synchronous Asynchronous In-Circuit Debug (ICD) via Two Pins Receiver Transmitter (EUSART) module: Enhanced Low-Voltage Programming (LVP) - RS-232, RS-485 and LIN compatible Programmable Code Protection - Auto-Baud Detect TM Power-Saving Sleep mode Capacitive Sensing (CPS) module (mTouch ): - 4 input channels 2011-2015 Microchip Technology Inc. DS40001441F-page 1PIC12(L)F1840 Peripheral Features (Continued) Data Signal Modulator module: - Selectable modulator and carrier sources SR Latch: - Multiple Set/Reset input options - Emulates 555 Timer applications PIC12(L)F1822/1840/PIC16(L)F182X/1847 Family Types Device PIC12(L)F1822 (1) 2K 256 128 6 4 4 1 2/1 1 1 0/1/0 Y I/H Y PIC12(L)F1840 (2) 4K 256 256 6 4 4 1 2/1 1 1 0/1/0 Y I/H Y PIC16(L)F1823 (1) 2K 256 128 12 8 8 2 2/1 1 1 1/0/0 Y I/H Y PIC16(L)F1824 (3) 4K 256 256 12 8 8 2 4/1 1 1 1/1/2 Y I/H Y PIC16(L)F1825 (4) 8K 256 1024 12 8 8 2 4/1 1 1 1/1/2 Y I/H Y PIC16(L)F1826 (5) 2K 256 256 16 12 12 2 2/1 1 1 1/0/0 Y I/H Y PIC16(L)F1827 (5) 4K 256 384 16 12 12 2 4/1 1 2 1/1/2 Y I/H Y PIC16(L)F1828 (3) 4K 256 256 18 12 12 2 4/1 1 1 1/1/2 Y I/H Y PIC16(L)F1829 (4) 8K 256 1024 18 12 12 2 4/1 1 2 1/1/2 Y I/H Y PIC16(L)F1847 (6) 8K 256 1024 16 12 12 2 4/1 1 2 1/1/2 Y I/H Y Note 1: I - Debugging, Integrated on Chip H - Debugging, available using Debug Header. 2: One pin is input-only. Data Sheet Index: (Unshaded devices are described in this document.) 1: DS41413 PIC12(L)F1822/PIC16(L)F1823 Data Sheet, 8/14-Pin Flash Microcontrollers. 2: DS41441 PIC12(L)F1840 Data Sheet, 8-Pin Flash Microcontrollers. 3: DS41419 PIC16(L)F1824/1828 Data Sheet, 28/40/44-Pin Flash Microcontrollers. 4: DS41440 PIC16(L)F1825/1829 Data Sheet, 14/20-Pin Flash Microcontrollers. 5: DS41391 PIC16(L)F1826/1827 Data Sheet, 18/20/28-Pin Flash Microcontrollers. 6: DS41453 PIC16(L)F1847 Data Sheet, 18/20/28-Pin Flash Microcontrollers. Note: For other small form-factor package availability and marking information, please visit