PIC12F509-E/SN - 8-bit MCU, 1.5KB Flash, 4MHz, 8-SOIC | Microchip
MPN: PIC12F509-E/SN ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $0.95 | $0.95 |
| 10 | $0.86 | $8.60 |
| 100 | $0.78 | $78.00 |
| 500 | $0.71 | $355.00 |
| 1,000 | $0.63 | $630.00 |
| 3,000 | $0.55 | $1,650.00 |
PIC12F509-E/SN Overview
What is an 8-bit microcontroller? An 8-bit microcontroller (MCU) is a single-chip computer that integrates a CPU, non-volatile program memory (ROM/Flash), volatile data memory (RAM), and peripherals (I/O, timers, ADC, communications) on one die. Within the broader taxonomy, the PIC12F509 belongs to the PIC10/12 baseline family of microcontrollers -> 8-bit MCU -> microcontroller -> embedded processor -> semiconductor. It targets cost-sensitive and pin-constrained designs where a full 28- or 40-pin MCU would be wasteful.
Key features of the PIC12F509-E/SN include six general-purpose digital I/O pins (each capable of independent direction control), one 8-bit timer/counter (TMR0) with a programmable prescaler, a watchdog timer with its own on-chip RC oscillator for reliable reset behavior, and an internal 4 MHz oscillator that eliminates the need for an external crystal. Power-on reset, brown-out detect, and code protection round out the integrated feature set, all in a 150-mil wide 8-SOIC footprint that reflow-solders with standard lead-free profiles.
The device uses a RISC-like architecture with only 33 single-word/12-bit instructions, so the MCU typically achieves a 2:1 code compression over comparable 8-bit CISC competitors. CMOS process technology provides low power consumption, with sleep currents in the microamp range and operating currents typically below 1 mA at 4 MHz/5V, making the part attractive for battery-powered applications.
Typical applications include consumer electronics remote controls, battery chargers, LED drivers, small appliance controllers, sensor signal conditioning, and hobby/educational projects. The PIC12F509-E/SN is also widely used as a low-cost "glue logic" replacement where a handful of discrete components can be replaced by programmable logic.
When designing with this MCU, allocate one or two I/O pins for ICSP (ICSPCLK/ICSPDAT) if you plan to re-program in-circuit. Use the configuration bits to select the oscillator mode, watchdog enable, and code protection; these fuses are programmed once and govern the device's behavior at every reset. The -E (extended) temperature grade supports -40C to +125C operation, broader than the -I (industrial) -40C to +85C grade.
This page synthesizes distributor pricing, drop-in package alternatives, and practical design notes that are not found in the standalone manufacturer datasheet.
Drop-in alternatives for PIC12F509-E/SN — same package, pin-to-pin compatible. Different-package parts requiring PCB rework are excluded.
Variants in this series
Same-series models that are drop-in compatible with PIC12F509-E/SN (same form factor and footprint) — differing in Package, Data EEPROM, Internal Oscillator, RoHS Status, ADC.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC12F509-I/SN
✅ Drop-In✓ In Stock
$0.71 / Unit
View Datasheet →PIC12F509-E/P
✅ Drop-In📋 Reference alternative (not in catalog)
PIC12F508-E/SN
✅ Drop-In✓ In Stock
$0.62 / Unit
View Datasheet →PIC12F1501-E/SN
✅ Drop-In✓ In Stock
$0.58 / Unit
View Datasheet →PIC12F1822-E/SN
✅ Drop-In📋 Reference alternative (not in catalog)
PIC12F1840-E/SN
✅ Drop-In✓ In Stock
$1.18 / Unit
View Datasheet →PIC12F509-E/SN Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC 8-bit (12-bit instruction word) |
| Program Memory Type | Flash |
| Program Memory Size | 1.5 KB (1K x 12 words) |
| RAM Size | 41 bytes |
| Data EEPROM | Not present |
| Maximum CPU Speed | 4 MHz |
| Internal Oscillator | 4 MHz RC |
| Supply Voltage Range | 2.0 V to 5.5 V |
| Number of I/O Pins | 6 |
| Timers | 1 x 8-bit (TMR0) |
| Watchdog Timer | Yes (independent on-chip RC oscillator) |
| ADC | None |
| Communication Interfaces | ICSP only (no UART, SPI, I2C) |
| Operating Temperature Range | -40C to +125C (Extended, -E grade) |
| Package | 8-SOIC (3.90 mm body width, 150 mil) |
| Mounting Type | Surface Mount |
| MSL Level | 1 (unlimited floor life) |
| RoHS Status | Compliant (lead-free) |
| ICSP Programming | Yes (ICSPCLK / ICSPDAT pins) |
PIC12F509-E/SN Pin Configuration
| Pin 1 | VDD — Positive supply voltage (2.0 V to 5.5 V) |
| Pin 2 | GP5/T1CKI/OSC1/CLKIN/ICSPCLK — General-purpose I/O / Timer1 clock input / external oscillator input / ICSP clock |
| Pin 3 | GP4/T1G/OSC2/CLKOUT/ICSPDAT — General-purpose I/O / Timer1 gate / oscillator output / clock output / ICSP data |
| Pin 4 | GP3/MCLR/VPP — General-purpose I/O (input only) / Master Clear reset (active low) / programming voltage |
| Pin 5 | GP2/COUT/T0CKI/INT — General-purpose I/O / comparator output / Timer0 clock input / external interrupt |
| Pin 6 | GP1/CIN-/ICSPCLK — General-purpose I/O / comparator inverting input / ICSP clock (alternate) |
| Pin 7 | GP0/CIN+/ICSPDAT — General-purpose I/O / comparator non-inverting input / ICSP data |
| Pin 8 | VSS — Ground reference |
Typical Applications
PIC12F509-E/SN is suitable for 7 applications: Consumer Remote Controls, Battery Chargers (Single-Cell Li-Ion / NiMH), LED Drivers and Light Controllers, Small Appliance and White-Good Controllers, Sensor Signal Conditioning and Smart Sensors, Hobby and Educational Projects, Replacement of Discrete Logic (Glue-Logic Replacement).
Consumer Remote Controls
The PIC12F509-E/SN's 4 MHz internal oscillator, 2.0V-5.5V supply, and only 6 required I/O pins map perfectly to low-cost infrared or RF remote controls. With 1.5 KB Flash the part easily holds keypad scanning, button-debounce state machines, and protocol bit-banging for SIRC/RC5/nec encoders, while the integrated watchdog timer resets the MCU on battery sag or accidental lockup. Sleep current in the microamp range lets a single CR2032 cell run a remote for years. Place a 100 nF decoupling cap directly on VDD (pin 1), connect the IR LED driver to any of GP0-GP2, and use GP3 as a wake-on-keypress interrupt.
Recommended
Battery Chargers (Single-Cell Li-Ion / NiMH)
The PIC12F509-E/SN is widely used as the controller for single-cell NiMH and Li-Ion chargers where its low cost and small footprint dominate the BOM. Three pins implement CC/CV control loops via PWM on a power MOSFET, one pin monitors battery voltage through a divider to the comparator, one pin reads temperature via an NTC, and one drives the status LED. The 2.0V-5.5V supply lets the MCU run directly from a USB or wall-adapter-derived rail, while the extended -40C to +125C grade tolerates the warm environment of an enclosed charger. Its 8-bit TMR0 generates the PWM base frequency without burdening the main loop.
Recommended
LED Drivers and Light Controllers
Driving a single RGB LED or a chain of constant-current LEDs requires only timer-based PWM and a state machine - exactly what the PIC12F509-E/SN delivers in a minimal 8-SOIC. The 4 MHz instruction rate easily handles 8-bit PWM at refresh rates above 1 kHz without flicker, and the 6 I/O pins drive R/G/B channels plus a control button and optional status LED. Sleep mode drops quiescent current to microamps, enabling battery-powered decorative lights that wake on a button press. The integrated brown-out detector and watchdog timer keep the lighting controller safe through cold-crank events in automotive interior lighting.
Recommended
Small Appliance and White-Good Controllers
Coffee makers, toasters, electric kettles, and small fans benefit from the PIC12F509-E/SN's low cost, integrated 4 MHz oscillator (no crystal needed), and extended temperature grade. The 1.5 KB Flash comfortably fits the appliance state machine (idle / heat-up / keep-warm / auto-shutoff), while TMR0 generates a one-second tick for timing. Six I/Os connect to a relay or TRIAC driver, a thermostat sensor, a buzzer, two push-buttons, and a status LED. The watchdog timer and brown-out reset keep the appliance in a safe state across brown-outs and ESD events.
Recommended
Sensor Signal Conditioning and Smart Sensors
In simple sensor modules - humidity, temperature, thermistor, or contact-closure interfaces - the PIC12F509-E/SN replaces op-amp comparators and discrete logic with programmable intelligence. The integrated comparator (CIN+/CIN- on GP0/GP1) handles threshold detection without external ICs, while TMR0 measures pulse widths from sensors like HC-SR04 ultrasonic rangefinders. The 2.0V minimum supply lets the part run from a single 1.5V cell with a boost converter, opening wireless IoT end-node applications. Six I/Os are sufficient for a one-wire sensor, a status LED, and a UART bit-bang to a wireless module.
Recommended
Hobby and Educational Projects
The PIC12F509-E/SN is one of the most popular 8-pin devices for hobbyists and educators because it packs a real RISC core, Flash memory, and in-circuit programming into a hand-solderable 8-SOIC. Students learn assembly language programming on the baseline 12-bit instruction set with only 33 opcodes, then port their projects to enhanced PIC16 or PIC18 cores. A simple PICkit 3/4/5 programmer plus MPLAB X IDE provides a free development chain on Windows, macOS, and Linux. Common student projects include blinker LEDs, programmable timers, dice simulators, servo testers, and standalone model-railway controllers.
Recommended
Replacement of Discrete Logic (Glue-Logic Replacement)
The PIC12F509-E/SN often replaces a 555 timer, a CD4017 Johnson counter, or a handful of 74HC00 gates when design requirements evolve beyond what discrete logic can deliver. A typical conversion takes a board originally stuffed with three 8-pin ICs, retargets it with one PIC12F509-E/SN, and recovers PCB area for added features. The integrated 4 MHz oscillator removes the RC timing components, and Flash lets the same hardware support multiple product variants via configuration bit selection. The result is a smaller, lower-cost BOM with end-of-line reprogrammability for late design changes.
Recommended
Recommended Products Summary
Engineering reference data for PIC12F509-E/SN — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC12F509-I/SN | PIC12F509-E/P | PIC12F508-E/SN | PIC12F1501-E/SN | PIC12F1822-E/SN |
|---|---|---|---|---|---|---|
| Package | 8-SOIC (3.90 mm) | 8-SOIC (3.90 mm) - same | 8-SOIC (3.90 mm) - same | 8-SOIC (3.90 mm) - same | 8-SOIC (3.90 mm) - same | 8-SOIC (3.90 mm) - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Program Memory | 1.5 KB Flash | 1.5 KB Flash | 1.5 KB Flash | 0.75 KB Flash | 1.75 KB Flash | 3.5 KB Flash |
| RAM | 41 bytes | 41 bytes | 41 bytes | 25 bytes | 64 bytes | 128 bytes |
| Max CPU Speed | 4 MHz | 4 MHz | 4 MHz | 4 MHz | 32 MHz | 32 MHz |
| I/O Pins | 6 | 6 | 6 | 6 | 6 | 6 |
| ADC | None | None | None | None | 10-bit | 10-bit |
| Supply Voltage | 2.0 V to 5.5 V | 2.0 V to 5.5 V | 2.0 V to 5.5 V | 2.0 V to 5.5 V | 1.8 V to 5.5 V | 1.8 V to 5.5 V |
| Temperature Grade | -40C to +125C (Extended) | -40C to +85C (Industrial) | -40C to +125C (Extended) | -40C to +125C (Extended) | -40C to +125C (Extended) | -40C to +125C (Extended) |
Key Differentiators
- Lowest cost 8-bit PIC MCU with Flash and integrated 4 MHz oscillator (vs PIC12F508-E/SN)
- Extended -40C to +125C temperature grade at no extra cost (vs PIC12F509-I/SN)
- Stable upgrade path to enhanced mid-range core in same 8-SOIC package (vs PIC12F1501-E/SN)
Design Notes
Decouple VDD (pin 1) directly to VSS (pin 8) with a 100 nF X7R ceramic capacitor placed within 3 mm of the package. For designs that drive heavy loads through the I/O pins, add a bulk 10 uF tantalum or aluminum-polymer capacitor in parallel. The PIC12F509-E/SN has no internal POR delay beyond a fixed RC interval; if the application requires slower supply ramp times, add an external RC on MCLR (pin 4) to guarantee a clean reset on power-up.
Never drive GP3 (pin 4) as a digital output - it is input-only because that pin also functions as MCLR and VPP. Connect MCLR directly to VDD through a 10 kohm pull-up resistor (do not leave it floating) or directly to VDD if the internal MCLR feature is disabled via the configuration bit. Avoid long traces on ICSPCLK and ICSPDAT to keep ICSP programming reliable; the Microchip programming specification requires these pins to be free of large capacitances during programming.
Keep the ICSP connector (typically a 6-pin 0.1-inch header with PICkit-standard pinout) on the same PCB side as the MCU and within 50 mm of pins 6 and 7 for reliable in-circuit programming. Provide a keepout area around the MCU antenna pins if you plan to use the internal oscillator at 4 MHz - although not RF-sensitive, long parallel traces between adjacent signal pins can introduce crosstalk into the comparator inputs on GP0/GP1. Place the decoupling capacitor on the VDD side of the package rather than under the part to ease inspection and rework.
The PIC12F509-E/SN's on-chip comparator (CIN+ on GP0, CIN- on GP1) has a typical input offset of +/- 5 mV and a response time of 200-400 ns; for sub-millivolt thresholds add external hysteresis with a 1 Mohm feedback resistor from COUT (GP2) to CIN+. For TMR0-based frequency or pulse-width measurement, gate the input signal through a Schmitt-trigger buffer (e.g. 74LVC1G17) if the source has slow edges below 10 V/us - the TMR0 input is not Schmitt-triggered.
Compliance Information
RoHS compliant and lead-free per Microchip product page. Not AEC-Q100 qualified; for AEC-Q100 designs Microchip recommends PIC16F15313 or PIC16F1xxx family. Halogen-free status not explicitly stated in the verified data; conflict-minerals compliance declared by Microchip.