PIC16F785-E/P - 8-Bit 20MHz 3.5KB Flash MCU w/ PWM & Op-Amps | Microchip
MPN: PIC16F785-E/P ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $2.35 | $2.35 |
| 10 | $2.1 | $21.00 |
| 100 | $1.84 | $184.00 |
| 500 | $1.62 | $810.00 |
| 1,000 | $1.41 | $1,410.00 |
| 3,000 | $1.22 | $3,660.00 |
PIC16F785-E/P Overview
What is a PIC16F-series 8-bit microcontroller? The PIC16F family is Microchip's mid-range 14-bit instruction architecture line, sitting between the baseline PIC10/12/16/17 families and the enhanced PIC18 family. It uses a RISC-style Harvard architecture that executes most instructions in a single 200 ns instruction cycle at 20 MHz. PIC microcontrollers integrate CPU, memory, and peripherals on a single die and are widely used for embedded control where deterministic timing, low cost, and on-chip analog peripherals matter more than raw compute throughput.
The PIC16F785 distinguishes itself with two on-chip operational amplifiers, two analog comparators with hysteresis, a 10-bit ADC with up to 14 channels, and a Capture/Compare/PWM (CCP) module plus an Enhanced Capture/Compare/PWM (ECCP) module that supports full-bridge, half-bridge, and single-shot PWM modes. The ECCP block can be configured for two-phase asynchronous feedback switching power topologies, making this MCU especially attractive for digital power conversion.
Typical applications include LED drivers and lighting controls, switch-mode power supply (SMPS) digital control loops, battery chargers, motor control, sensor signal conditioning, and general-purpose embedded control in consumer and industrial products. The internal 8 MHz and 32 kHz MOSFET drivers (where applicable) plus nanoWatt sleep modes support battery-powered designs with extended runtime.
When designing with this part, allocate adequate decoupling (100 nF plus bulk) close to VDD, and follow Microchip AN530 and TB3013 for PWM-driven SMPS loop compensation. Industrial-grade variants operate over -40C to +85C; this E (extended) variant covers -40C to +125C. For an SOIC footprint, choose PIC16F785-E/SO.
This page synthesizes distributor pricing, drop-in alternatives, application context, and engineering notes drawn from the Microchip datasheet and authorized distributor listings - context not consolidated on a single manufacturer page.
Drop-in alternatives for PIC16F785-E/P — 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 PIC16F785-E/P (same form factor and footprint) — differing in Package, Comparators, I/O Pins, Mounting Type, Program Memory (Flash).
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC16F785-I/P
✅ Drop-In✓ In Stock
$1.88 / Unit
View Datasheet →PIC16F685-I/P
✅ Drop-In✓ In Stock
$1.32 / Unit
View Datasheet →PIC16F677-I/P
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F690-I/P
✅ Drop-In✓ In Stock
$1.89 / Unit
View Datasheet →PIC16F716-I/P
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F785-E/P Maximum Ratings & Electrical Characteristics
| Product Type | 8-bit Flash Microcontroller |
| Architecture | PIC16 mid-range (14-bit instruction, RISC) |
| Program Memory | 3.5 KB (2K x 14) Flash |
| RAM | 128 bytes |
| EEPROM | 128 bytes |
| Maximum CPU Speed | 20 MHz (200 ns instruction cycle) |
| Operating Voltage Range | 2.0 V to 5.5 V |
| I/O Pins | 17 (maximum), 12 with interrupt-on-change |
| A/D Converter | 10-bit, up to 14 channels |
| Comparators | 2 (with hysteresis) |
| Operational Amplifiers | 2 on-chip op-amps |
| PWM Modules | 1x CCP + 1x ECCP (full-bridge capable) |
| Timers | Timer0, Timer1, Timer2 |
| Package | 20-pin PDIP (300 mil, through-hole) |
| Operating Temperature Range | -40C to +125C (E suffix - extended) |
| Mounting Type | Through-Hole |
| MSL Level | 1 (unlimited floor life) |
| Lead-Free / RoHS | Lead-free; RoHS status per lot |
| Power-Saving Modes | nanoWatt Technology (sleep, watchdog timer disable) |
| In-Circuit Programming | ICSP via PGD/PGC |
PIC16F785-E/P Pin Configuration
| Pin 1 | RA0/AN0/C1-/C2-/OP1- — GPIO RA0 / ADC channel 0 / Comparator1 inverting / Comparator2 inverting / Op-amp1 inverting input |
| Pin 2 | RA1/AN1/C1+/C2+/OP1+ — GPIO RA1 / ADC channel 1 / Comparator1 non-inverting / Comparator2 non-inverting / Op-amp1 non-inverting input |
| Pin 3 | RA2/AN2/OP1OUT/C1OUT — GPIO RA2 / ADC channel 2 / Op-amp1 output / Comparator1 output |
| Pin 4 | RA3/AN3/C2OUT/VREF+/OP2- — GPIO RA3 / ADC channel 3 / Comparator2 output / Voltage reference / Op-amp2 inverting input |
| Pin 5 | RA4/AN4/OP2+/T0CKI — GPIO RA4 / ADC channel 4 / Op-amp2 non-inverting input / Timer0 clock input |
| Pin 6 | RA5/AN5/OP2OUT/SS/HLVDIN — GPIO RA5 / ADC channel 5 / Op-amp2 output / SPI slave select / High-Low Voltage detect input |
| Pin 7 | RA6/OSC2/CLKOUT — GPIO RA6 / Crystal oscillator output / Clock output |
| Pin 8 | RA7/OSC1/CLKIN — GPIO RA7 / Crystal oscillator input / External clock input |
| Pin 9 | RC0 — GPIO RC0 |
| Pin 10 | RC1 — GPIO RC1 |
| Pin 11 | RC2/P1B/CCP1 — GPIO RC2 / Enhanced PWM output 1B / CCP1 output |
| Pin 12 | RC3/P1C/CCP2 — GPIO RC3 / Enhanced PWM output 1C / CCP2 output |
| Pin 13 | RC4/P1D — GPIO RC4 / Enhanced PWM output 1D |
| Pin 14 | RC5/P1A — GPIO RC5 / Enhanced PWM output 1A |
| Pin 15 | RC6/TX/CK — GPIO RC6 / USART asynchronous transmit / USART synchronous clock |
| Pin 16 | RC7/RX/DT — GPIO RC7 / USART asynchronous receive / USART synchronous data |
| Pin 17 | VSS — Ground reference |
| Pin 18 | VDD — Positive supply voltage (2.0-5.5 V) |
| Pin 19 | RB7 — GPIO RB7 (interrupt-on-change) |
| Pin 20 | RB6 — GPIO RB6 (interrupt-on-change) |
Typical Applications
PIC16F785-E/P is suitable for 7 applications: LED Lighting Drivers & Dimming Control, Switch-Mode Power Supply (SMPS) Digital Control, Battery Charging & Power Management, Brushless DC (BLDC) Motor Control, Sensor Signal Conditioning & Data Acquisition, Industrial Control & Automation, Consumer Appliance Control.
LED Lighting Drivers & Dimming Control
The PIC16F785-E/P's ECCP full-bridge PWM and two on-chip op-amps are well-suited to LED driver and dimmer control. Place the MCU at the heart of a constant-current buck or boost driver: one op-amp serves as the transconductance error amplifier sensing shunt current, while the ECCP module generates the switching waveform at adjustable dead-band. According to the Microchip datasheet, the 20 MHz core runs the LED current-control loop with sub-microsecond resolution, while nanoWatt sleep cuts quiescent current in standby. The 10-bit ADC samples LED string current for closed-loop regulation across 2.0-5.5 V inputs.
Recommended
Switch-Mode Power Supply (SMPS) Digital Control
The PIC16F785-E/P's two-phase asynchronous feedback PWM mode directly supports digital control of SMPS converters. One on-chip op-amp senses output voltage, the other senses current, and the ECCP drives the synchronous-FET timing with programmable dead-band to prevent shoot-through. At 20 MHz / 5 MIPS the MCU runs compensation algorithms at 100 kHz switching frequency with ample headroom. Per Microchip app note AN530, this part targets digital SMPS where analog-only control is replaced with adaptive firmware without sacrificing transient response.
Recommended
Battery Charging & Power Management
The PIC16F785-E/P is well-matched to NiMH, Li-ion, or lead-acid charger controllers. The two comparators can implement windowed charge-current monitoring without external analog ICs, while the op-amps amplify shunt voltage. CCP plus ECCP modules generate PWM for buck or buck-boost charging stages, and the 10-bit ADC reads battery voltage and temperature for charge-state termination. Wide 2.0-5.5 V VDD range lets the same MCU run directly from a 2-cell battery stack. Extended -40C to +125C range supports automotive and outdoor deployments.
Recommended
Brushless DC (BLDC) Motor Control
The PIC16F785-E/P can drive small three-phase brushless DC motors using its ECCP full-bridge PWM mode plus back-EMF sensing through the on-chip comparators. With 5 MIPS instruction throughput, sensorless back-EMF zero-crossing detection can be implemented in firmware for sensorless commutation at moderate speeds. The on-chip op-amps condition current-sense signals from low-side shunt resistors without external amplifiers, saving BOM cost. The 20-PDIP package simplifies hand-soldered prototype and lab motor tuning.
Recommended
Sensor Signal Conditioning & Data Acquisition
The PIC16F785-E/P is ideal for low-cost sensor front-ends and data-acquisition modules. The two on-chip op-amps provide programmable gain for thermocouples, strain gauges, or current shunts; the comparators trigger on thresholds; and the 10-bit ADC samples up to 14 channels at up to 100 ksps. EEPROM stores per-unit calibration constants, while the 128-byte RAM buffers samples. ICSP permits in-field firmware updates without removing the part from the PCB - useful for industrial sensor networks.
Recommended
Industrial Control & Automation
Industrial control systems use the PIC16F785-E/P for relay drivers, valve actuation, and process-loop control. The 17 I/O pins drive relays, optocouplers, and digital inputs; the ECCP module generates PWM for proportional valves; and the comparator/op-amp analog front-end handles 4-20 mA loop signal conditioning. nanoWatt technology and the extended -40C to +125C temperature grade make this part a fit for factory-floor controllers, HVAC damper drives, and irrigation controllers. Robust ICSP supports in-field firmware maintenance.
Recommended
Consumer Appliance Control
Consumer appliances (washing machines, dishwashers, induction cookers, microwave ovens) use the PIC16F785-E/P as a cost-optimized control MCU. The two op-amps handle current sensing for motor protection; the ECCP drives power triacs or IGBTs at appliance-grade frequencies; the ADC reads user knobs and safety sensors; and EEPROM stores cycle settings. The extended temperature grade and through-hole 20-PDIP package align with high-volume consumer manufacturing using wave-solder assembly.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F785-E/P — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F785-I/P | PIC16F685-I/P | PIC16F677-I/P | PIC16F690-I/P | PIC16F716-I/P |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 20-pin PDIP | 20-pin PDIP - same | 20-pin PDIP - same | 20-pin PDIP - same | 20-pin PDIP - same | 20-pin PDIP - same |
| Program Memory | 3.5 KB Flash | 3.5 KB Flash | 7 KB Flash | 3.5 KB Flash | 7 KB Flash | 3.5 KB Flash |
| RAM | 128 B | 128 B | 256 B | 128 B | 256 B | 128 B |
| Maximum CPU Speed | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| On-Chip Op-Amps | 2 | 2 | 0 | 0 | 0 | 0 |
| Comparators | 2 with hysteresis | 2 with hysteresis | 2 | 2 | 2 | 0 |
| ECCP Full-Bridge PWM | Yes | Yes | Yes | No | Yes | No |
| Operating Temperature | -40C to +125C (E) | -40C to +85C (I) | -40C to +85C (I) | -40C to +85C (I) | -40C to +85C (I) | -40C to +85C (I) |
Key Differentiators
- Two on-chip op-amps eliminate external analog ICs in feedback loops (vs PIC16F685-I/P)
- Two-phase asynchronous feedback PWM supports digital SMPS without external logic (vs PIC16F677-I/P)
- Extended -40C to +125C operating range covers automotive and harsh industrial (vs PIC16F785-I/P)
- 20-PDIP through-hole package simplifies prototyping and education (vs PIC16F785-E/SO)
Design Notes
Place a 100 nF ceramic decoupling capacitor as physically close as possible to the VDD pin (pin 18), with a 10 uF bulk capacitor on the same VDD node. The PIC16F785-E/P draws sharp transient currents during CCP/ECCP edge switching; insufficient decoupling causes brown-out resets. Microchip's datasheet (DS41291E) recommends ESR below 1 ohm for the bulk capacitor. Estimated: a 10 uF X5R 16V 0805 ceramic provides roughly 8 mOhms ESR at 100 kHz, comfortably meeting this requirement.
Keep analog op-amp inputs (RA0, RA1, RA3, RA4) traces short and guarded from PWM digital traces (RC2-RC5 P1A-P1D). The on-chip op-amps have limited PSRR, so high dV/dt from the ECCP output edges can couple into the analog chain if the layout is poor. Microchip app note AN530 recommends separating analog ground and digital ground on the PCB with a single-point tie near the MCU VSS pin (pin 17). When using the on-chip op-amps as error amplifiers in a SMPS loop, this layout discipline is essential for clean regulation.
Do not assume the on-chip op-amps can drive heavy loads - their output stage is intended for feedback loops only and is rated for low current. External buffering (such as a TC1413 gate driver) is needed to drive power MOSFETs. Also note that the analog multiplexer on the ADC is shared with comparator inputs - reconfiguring ADC channel changes comparator source. Always set the CMCON register before ADCON0 channel selection to avoid unexpected comparator reference shifts during ADC conversion.
The PIC16F785-E/P is rated for -40C to +125C junction operation. With its modest CMOS power dissipation (a few mA at 20 MHz), the die rarely needs explicit thermal management in the 20-PDIP package. Estimated: typical IDD of 5 mA at 5 V yields 25 mW - well within the 20-PDIP thermal resistance of approximately 80 C/W. Heat becomes relevant only if you drive the I/O pins above their 25 mA per-pin spec or run at 5.5 V with all pins simultaneously sourcing current.
Compliance Information
RoHS and REACH compliance per Microchip material declaration. Standard mid-range PIC16F parts are not AEC-Q100 qualified; for AEC-Q100 automotive applications request the automotive-grade PIC variant from Microchip. Halogen-free status not specifically published in the cited snippets.