PIC16HV540T-04/SO - 8-bit OTP MCU 4MHz 18-SOIC | Microchip
MPN: PIC16HV540T-04/SO ✗ End of Life| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $2.15 | $2.15 |
| 10 | $1.95 | $19.50 |
| 100 | $1.65 | $165.00 |
| 500 | $1.4 | $700.00 |
| 1,000 | $1.2 | $1,200.00 |
PIC16HV540T-04/SO Overview
A microcontroller (MCU) is a single-chip computer that integrates a CPU core, program memory (ROM/OTP/Flash), working RAM, I/O peripherals, and clock generation onto one silicon die. The PIC16HV540 belongs to the taxonomy PIC16C -> PIC family -> 8-bit microcontroller -> microcontroller -> embedded processor -> semiconductor IC. It is a Harvard-architecture RISC device: program and data memories are separate, instructions are fixed-width single-word, and most instructions complete in one cycle, which keeps deterministic timing for interrupt-driven control loops.
Key features of the PIC16HV540T-04/SO include 12 programmable digital I/O pins with high-current sink capability, an 8-bit timer/counter (TMR0) with a programmable prescaler, a watchdog timer with its own on-chip RC oscillator, power-on reset, brown-out detection, and an internal 4 MHz RC oscillator option. The on-chip voltage regulator lets the part run from a single 9 V or 12 V wall-adapter supply while still presenting a clean 5 V to downstream logic. Power-saving SLEEP mode drops current to the microamp range, suitable for battery-backed or energy-harvesting designs.
Architecturally, the PIC16HV540 combines a 14-bit instruction word with an 8-bit data path and a two-stage pipeline. Program memory is OTP, allowing one-time customization for production volumes. The 12-bit-wide instruction words are fetched from the 512-word OTP array while the 25-byte general-purpose RAM handles variables and stack. The integrated voltage regulator is a parallel/shunt regulator rather than a series LDO, which means the input is tolerant of high voltages (commonly 9 V or 12 V) but cannot source large output currents to external loads.
Typical applications include low-cost appliance controllers, LED lighting controllers, remote controls, sensor signal conditioning with on-board A/D-free logic, automotive interior modules (non-safety), battery chargers, and any 8-bit embedded node that benefits from wide input voltage tolerance. The 25-byte RAM and 768-byte OTP keep it best suited to compact deterministic control rather than data-rich connectivity stacks.
Designers should choose this MCU when wide-input-voltage single-rail operation and ultra-low BOM cost matter more than peripheral density. The SOIC-18 footprint and 33-instruction core make firmware migration from other PIC16C5x parts straightforward. Note that OTP means firmware cannot be field-updated - mask-ROM equivalents (PIC16CR540) or Flash PIC16F equivalents should be considered when in-system reprogrammability is required.
Drop-in alternatives for PIC16HV540T-04/SO — 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 PIC16HV540T-04/SO (same form factor and footprint) — differing in Core Architecture, Watchdog Timer, Operating Temperature, Program Memory Size, Program Memory Type.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC16HV540-04/SO
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16HV540T-04I/SO
✅ Drop-In✓ In Stock
$1.78 / Unit
View Datasheet →PIC16HV540T-20/SO
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16HV540-04I/SO
✅ Drop-In✓ In Stock
$1.78 / Unit
View Datasheet →PIC16HV540-20I/SO
✅ Drop-In✓ In Stock
$1.39 / Unit
View Datasheet →PIC16HV540T-04/SO Maximum Ratings & Electrical Characteristics
| Product Family | PIC16C |
| Core Architecture | 8-bit RISC (Harvard) |
| Program Memory Type | OTP (One-Time-Programmable) |
| Program Memory Size | 768 B (512 x 12 words) |
| RAM Size | 25 B |
| Maximum CPU Frequency | 4 MHz |
| Instruction Cycle Time | 1 µs (200 ns per instruction at 4 MHz oscillator) |
| Instruction Set Size | 33 single-word instructions |
| I/O Pins | 12 |
| Timers | 1 x 8-bit (TMR0) with prescaler |
| Watchdog Timer | Yes (with dedicated on-chip RC oscillator) |
| On-Chip Voltage Regulator | Yes (shunt type, 5 V regulated from 3.0-15 V input) |
| Supply Voltage (VDD) | 3.0 V to 15 V (regulator mode) |
| Brown-Out Reset | Yes |
| Power-On Reset | Yes |
| Internal RC Oscillator | Yes (4 MHz typical) |
| Operating Temperature | -40C to +85C (industrial, inferred from -04I variant family) |
| Package | 18-pin SOIC (SO) |
| Mounting Type | Surface Mount |
| Lead-Free / RoHS | Compliant |
PIC16HV540T-04/SO Pin Configuration
| Pin 1 | RA2 — Bidirectional I/O port A bit 2 |
| Pin 2 | RA3 — Bidirectional I/O port A bit 3 |
| Pin 3 | T0CKI/RA4 — TMR0 clock input or port A bit 4 |
| Pin 4 | /MCLR — Master Clear (reset, active-low) |
| Pin 5 | VSS — Ground reference |
| Pin 6 | RB0/INT — Port B bit 0 / external interrupt input |
| Pin 7 | RB1 — Bidirectional I/O port B bit 1 |
| Pin 8 | RB2 — Bidirectional I/O port B bit 2 |
| Pin 9 | RB3 — Bidirectional I/O port B bit 3 |
| Pin 10 | RB4 — Bidirectional I/O port B bit 4 |
| Pin 11 | RB5 — Bidirectional I/O port B bit 5 |
| Pin 12 | RB6 — Bidirectional I/O port B bit 6 |
| Pin 13 | RB7 — Bidirectional I/O port B bit 7 |
| Pin 14 | VDD — Supply voltage (3.0 V to 15 V via on-chip regulator) |
| Pin 15 | OSC2/CLKOUT — Oscillator output / clock out (4 MHz crystal or RC) |
| Pin 16 | OSC1/CLKIN — Oscillator input / external clock in |
| Pin 17 | RA0 — Bidirectional I/O port A bit 0 |
| Pin 18 | RA1 — Bidirectional I/O port A bit 1 |
Typical Applications
PIC16HV540T-04/SO is suitable for 7 applications: 9V/12V Battery Appliance Controller, LED Lighting Controller / Dimmer, Remote Control and IR Transmitter, Automotive Interior Module (Non-Safety), Battery Charger / Smart Battery Front-End, Sensor Signal Conditioning Logic, Industrial Timer and Sequencer.
9V/12V Battery Appliance Controller
The PIC16HV540T-04/SO is purpose-built for 9 V or 12 V single-rail appliances because its on-chip shunt voltage regulator accepts 3.0-15 V on VDD and produces a regulated 5 V core supply without an external LDO. At 4 MHz CPU, 1 µs instruction cycle, and 768 B OTP plus 25 B RAM, the device drives 12 high-current-sink I/O pins suitable for relay coils, solenoids, buzzer drivers, and seven-segment LED multiplex displays. Per the Microchip PIC16HV540 datasheet (DS30390), brown-out reset and watchdog timer with dedicated RC oscillator protect unattended appliances from supply glitches, while SLEEP mode drops current to microamp levels for battery standby.
Recommended
LED Lighting Controller / Dimmer
The PIC16HV540T-04/SO drives LED lighting modules from a single 12 V supply without a separate 5 V regulator - the internal shunt regulator produces the regulated 5 V rail for the MCU core. The 8-bit TMR0 timer with programmable prescaler generates PWM dimming frequencies from tens of hertz up to several kilohertz, modulating LED brightness via 12 digital I/O pins. Brown-out detection ensures clean LED restart after supply brown-outs, and the 4 MHz instruction cycle delivers deterministic PWM edges free of jitter. The 25-byte RAM holds current dim levels, fade tables, and remote-control state machines.
Recommended
Remote Control and IR Transmitter
The PIC16HV540T-04/SO's 33-instruction PIC16C5x core, 4 MHz CPU, and 25-byte RAM are sized exactly right for IR remote control encoder firmware: NEC, RC5, SIRC, or proprietary protocols fit within 768 B OTP. SLEEP mode at microamp current extends battery life in handheld transmitters powered by a single 9 V cell, and the internal 4 MHz RC oscillator eliminates two external crystal components. The 12 I/O pins drive IR LEDs, keypad matrix rows/columns, LED indicators, and tactile feedback buzzers simultaneously.
Recommended
Automotive Interior Module (Non-Safety)
The PIC16HV540T-04/SO accepts the 12 V automotive battery rail directly through its on-chip shunt regulator, replacing an external 5 V LDO and saving BOM cost in interior accessories such as dome-light controllers, mirror adjusters, seat-position memories, and accessory timers. Per the Microchip PIC16HV540 datasheet, the device tolerates cranking transients up to 15 V via the regulator, and brown-out reset prevents spurious outputs during engine start. The 12 high-current-sink I/O pins drive relay coils and H-bridge enable signals directly. Note: not AEC-Q100 qualified; for safety-critical modules use a Q100-qualified part.
Recommended
Battery Charger / Smart Battery Front-End
The PIC16HV540T-04/SO is ideal as the supervisory MCU in a low-cost NiCd, NiMH, or lead-acid charger where it accepts the 9 V or 12 V wall-adapter rail directly without a 5 V LDO. The 768-byte OTP runs state machines for charge phase (trickle, bulk, equalization, float), and the 25-byte RAM tracks voltage, temperature, and timer counters. Brown-out detection and watchdog timer with dedicated RC oscillator ensure the charger fails safely if firmware locks up. The 8-bit TMR0 measures charge-elapsed time without burdening the main loop.
Recommended
Sensor Signal Conditioning Logic
In sensor modules where a 9 V or 12 V transducer supply is already present (PIR motion sensors, smoke detectors, gas sensor heaters), the PIC16HV540T-04/SO replaces a separate 5 V regulator by deriving the MCU rail internally. The PIC16C5x core runs calibration algorithms, debounce filtering, and alarm thresholds within 768 B OTP while keeping BOM minimal. The watchdog timer guarantees lock-up recovery for unattended safety-adjacent sensors, and SLEEP mode drops current to microamp levels for battery-backed detectors. Brown-out reset prevents false alarms on brown-out events.
Recommended
Industrial Timer and Sequencer
The PIC16HV540T-04/SO's 8-bit TMR0 with programmable prescaler generates timing intervals from microseconds to minutes, enabling industrial timer, sequencer, and pump-controller firmware. The on-chip shunt regulator accepts 24 V industrial control bus (with external dropping resistor) or 12 V supply directly, eliminating a 5 V LDO. Brown-out detection and watchdog timer with dedicated on-chip RC oscillator satisfy industrial reliability requirements, and 12 digital I/O pins drive opto-isolated SSR triggers, contactor coils, and indicator LEDs.
Recommended
Recommended Products Summary
Engineering reference data for PIC16HV540T-04/SO — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16HV540-04/SO | PIC16HV540T-04I/SO | PIC16HV540T-20/SO | PIC16HV540-04I/SO | PIC16HV540-20I/SO |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 18-SOIC | 18-SOIC - same | 18-SOIC - same | 18-SOIC - same | 18-SOIC - same | 18-SOIC - same |
| Maximum CPU Frequency | 4 MHz | 4 MHz | 4 MHz | 20 MHz | 4 MHz | 20 MHz |
| Program Memory (OTP) | 768 B | 768 B | 768 B | 768 B | 768 B | 768 B |
| RAM | 25 B | 25 B | 25 B | 25 B | 25 B | 25 B |
| I/O Pins | 12 | 12 | 12 | 12 | 12 | 12 |
| On-Chip Voltage Regulator | Yes (shunt, 3-15 V input) | Yes (shunt, 3-15 V input) | Yes (shunt, 3-15 V input) | Yes (shunt, 3-15 V input) | Yes (shunt, 3-15 V input) | Yes (shunt, 3-15 V input) |
| Operating Temperature Grade | Commercial (0 to +70C) | Commercial (0 to +70C) | Industrial (-40C to +85C) | Commercial (0 to +70C) | Industrial (-40C to +85C) | Industrial (-40C to +85C) |
| Shipping Carrier | Tape & Reel | Tube | Tape & Reel | Tape & Reel | Tube | Tube |
Key Differentiators
- On-chip high-voltage shunt regulator eliminates external 5 V LDO (vs PIC16F54-I/SO)
- Industrial temperature grade (-40C to +85C) (vs PIC16HV540T-04/SO (commercial))
- 5x speed upgrade with pin compatibility (vs PIC16HV540T-20/SO)
Design Notes
Estimated: at VDD = 12 V and MCU core current of 5 mA at 4 MHz, the on-chip shunt regulator dissipates approximately (12 V - 5 V) * 5 mA = 35 mW continuously. While small, this dissipation is constant whenever the MCU is active. Add an external series dropping resistor (e.g., 470 ohm, 1/4 W) on VDD to share thermal load and reduce regulator stress in 12 V applications. The shunt regulator is not a series LDO - it cannot source large currents to external 5 V loads.
Place a 0.1 µF decoupling capacitor within 5 mm of the VDD pin (pin 14) and another between VSS (pin 5) and ground. For designs using an external crystal or ceramic resonator, keep the oscillator traces short and surround them with a ground guard ring to suppress EMI coupling into nearby analog or relay-driver traces. The /MCLR pin (pin 4) should be pulled up to VDD through a 10 kohm resistor, with an optional 100 nF capacitor to VSS for noise filtering per Microchip layout guidance.
Do not assume the PIC16HV540T-04/SO is in-system reprogrammable - OTP program memory can be written exactly once via high-voltage parallel programming, not via ICSP. For prototyping, use the PIC16HV540/JW (UV-erasable windowed ceramic) or PIC16F54-I/SO (Flash-based) for iteration. Note also that brown-out reset threshold is not user-trimmed; verify reset behavior across the operating VDD range during characterization. Finally, ensure the watchdog timer LPOSC is enabled in firmware for unattended safety applications.
When driving relay coils or solenoids from the I/O pins, add a flyback diode (1N4148 or Schottky) directly across each inductive load to suppress back-EMF that can latch up the MCU. Separate high-current switching traces from sensitive signal traces by at least 3 mm or shield them with ground pours. The PIC16HV540's high-current-sink I/O pins can sink up to 25 mA per pin, but total port sink current is limited to 200 mA - derate accordingly when driving multiple relays simultaneously.
Compliance Information
RoHS and lead-free compliant per Microchip product page. Not AEC-Q100 qualified - for automotive safety-critical modules use a Q100-qualified Flash part. Lifecycle status: obsolete, last shipped by Microchip before 2018; new designs should target PIC16F54 or PIC16F716.