PIC16F785-I/SO - 8-Bit 20MHz 3.5KB Flash MCU | Microchip
MPN: PIC16F785-I/SO β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $2.55 | $2.55 |
| 10 | $2.27 | $22.70 |
| 100 | $1.95 | $195.00 |
| 500 | $1.7 | $850.00 |
| 1,000 | $1.45 | $1,450.00 |
PIC16F785-I/SO Overview
A microcontroller (MCU) is a single-chip computer that integrates a CPU, memory, and programmable I/O peripherals. The PIC16F785 belongs to the mid-range PIC16 family, a sub-family of 8-bit RISC microcontrollers that sit within the broader hierarchy of microcontrollers -> embedded processors -> semiconductors. The 14-bit instruction word and 35 single-word instruction set make PIC16 mid-range MCUs easy to program while delivering deterministic 200 ns instruction execution at 20 MHz.
Key features include 18 digital I/O pins, two on-chip operational amplifiers, two high-speed comparators, two 10-bit PWM modules with Two-Phase Asynchronous Feedback, a 10-bit ADC with up to 12 channels, and an internal 8 MHz oscillator. The device operates from 2.0V to 5.5V and supports Microchip's nanoWatt Technology for ultra-low-power sleep modes. On-chip peripherals are tuned for analog-intensive applications such as LED lighting, motor control, and power conversion.
The architecture combines a Harvard-style 14-bit program bus with an 8-bit data bus, supported by a hardware multiplier-free ALU optimized for bit-manipulation and control-loop math. Internal configurable oscillator options let designers trade frequency accuracy for BOM cost, while the integrated op-amps eliminate external analog front-end components, shrinking PCB area and improving noise immunity by keeping sensitive analog signals on-chip.
Typical applications include LED drivers (analog dimming and constant-current regulation using the on-chip op-amps), BLDC and DC motor control (using comparators for back-EMF sensing), battery chargers (using ADC for voltage/current monitoring), and AC/DC power supply primary-side regulation (where the Two-Phase Asynchronous Feedback PWM enables valley-switching topologies). The wide 2.0V-5.5V operating range makes the part usable in 2-cell battery packs, 3.3V logic rails, and 5V industrial systems.
When designing with the PIC16F785, leave a decoupling capacitor (typically 100 nF ceramic) within 5 mm of the VDD pin and tie the MCLR pin to VDD through a 10 kohm pull-up (unless in-circuit serial programming is used). Two on-chip op-amps share pins with digital I/O; verify the pin assignment table in the datasheet when both analog and digital functions are needed simultaneously.
This page synthesizes real-time distributor pricing, drop-in alternatives, and practical design guidance not found in the standalone Microchip datasheet. It also surfaces cross-brand considerations for engineers managing multi-vendor BOMs.
Drop-in alternatives for PIC16F785-I/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 PIC16F785-I/SO (same form factor and footprint) β differing in Package, Core Architecture, MSL Level, Operating Temperature, Timers.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
PIC16F785T-I/SO
β Drop-Inβ In Stock
$1.41 / Unit
View Datasheet βPIC16F785-E/SO
β Drop-Inπ Reference alternative (not in catalog)
PIC16F785-I/SP
β Drop-Inπ Reference alternative (not in catalog)
PIC16F785T-E/SO
β Drop-In β οΈ εζ°εΎ ιͺθ―π Reference alternative (not in catalog)
PIC16F785-E/SS
β Drop-Inβ In Stock
$1.25 / Unit
View Datasheet βPIC16F785-I/SO Maximum Ratings & Electrical Characteristics
| Architecture | PIC16 mid-range x14 (8-bit RISC) |
| Instruction Set Width | 14-bit |
| Maximum CPU Speed | 20 MHz (200 ns instruction cycle) |
| Program Memory (Flash) | 3.5 KB (2K x 14 words) |
| SRAM | 128 bytes |
| EEPROM Data Memory | 256 bytes |
| Digital I/O Pins | 18 |
| Supply Voltage (VDD) | 2.0 V to 5.5 V |
| Operating Temperature | -40C to +85C (Industrial) |
| On-Chip Operational Amplifiers | 2 |
| High-Speed Comparators | 2 |
| ADC | 10-bit, up to 12 channels |
| PWM Modules | 2 x 10-bit with Two-Phase Asynchronous Feedback |
| Internal Oscillator | 8 MHz (factory calibrated) |
| Package | 20-pin SOIC (SO), 300 mil |
| Mounting Type | Surface Mount |
| Low-Power Mode | nanoWatt Technology (sleep current < 1 uA typical) |
| MSL Level | 1 |
| RoHS Status | Compliant |
| Lead-Free | Yes |
PIC16F785-I/SO Pin Configuration
| Pin 1 | RA3/AN3/VREF+/C1IN+ β GPIO RA3 / Analog input 3 / Voltage reference + / Comparator 1 input + |
| Pin 2 | RA4/T0CKI/C2OUT β GPIO RA4 / Timer0 clock input / Comparator 2 output |
| Pin 3 | RA5/AN4/C2IN+/HLVDIN β GPIO RA5 / Analog input 4 / Comparator 2 input + / High/Low voltage detect input |
| Pin 4 | VSS β Ground reference |
| Pin 5 | RA6/OSC2/CLKO/AN6 β GPIO RA6 / Oscillator output / Clock output / Analog input 6 |
| Pin 6 | RA7/OSC1/CLKI/AN7 β GPIO RA7 / Oscillator input / Clock input / Analog input 7 |
| Pin 7 | RA1/AN1/C1IN1-/C2IN1- β GPIO RA1 / Analog input 1 / Comparator 1 input 1- / Comparator 2 input 1- |
| Pin 8 | RA2/AN2/VREF-/C1OUT β GPIO RA2 / Analog input 2 / Voltage reference - / Comparator 1 output |
| Pin 9 | RA0/AN0/C1IN0+ β GPIO RA0 / Analog input 0 / Comparator 1 input 0+ |
| Pin 10 | VDD β Positive supply voltage (2.0V to 5.5V) |
| Pin 11 | RB0/INT/AN12/CCP1 β GPIO RB0 / External interrupt / Analog input 12 / CCP1 PWM output |
| Pin 12 | RB1/AN10/C2IN3-/P1C β GPIO RB1 / Analog input 10 / Comparator 2 input 3- / PWM 1 output C |
| Pin 13 | RB2/AN8/C2IN2-/P1B β GPIO RB2 / Analog input 8 / Comparator 2 input 2- / PWM 1 output B |
| Pin 14 | RB3/AN9/C1IN3-/PGM β GPIO RB3 / Analog input 9 / Comparator 1 input 3- / ICSP programming |
| Pin 15 | RB4/AN11/C2IN0-/P1D β GPIO RB4 / Analog input 11 / Comparator 2 input 0- / PWM 1 output D |
| Pin 16 | RB5/AN13/P2B β GPIO RB5 / Analog input 13 / PWM 2 output B |
| Pin 17 | RB6/ICSPCLK β GPIO RB6 / ICSP clock / ICD clock |
| Pin 18 | RB7/ICSPDAT β GPIO RB7 / ICSP data / ICD data |
| Pin 19 | RA3/MCLR/VPP β Master Clear reset input (active low) / Programming voltage input |
| Pin 20 | P2A β PWM 2 output A |
Typical Applications
PIC16F785-I/SO is suitable for 7 applications: LED Lighting Drivers, BLDC and DC Motor Control, Battery Chargers, AC/DC Power Supply Primary-Side Regulation, Sensor Signal Conditioning and IoT Edge Nodes, Automotive Interior Lighting and Body Electronics, Industrial Process Control and Instrumentation.
LED Lighting Drivers
The PIC16F785-I/SO is purpose-built for LED lighting because its two on-chip op-amps amplify the low-side shunt voltage across the sense resistor, and its two high-speed comparators provide fast over-current protection in constant-current topologies. The integrated Two-Phase Asynchronous Feedback PWM module supports valley-switching for high-efficiency flyback converters at the AC mains side, reducing switching losses by 30-50% compared to fixed-frequency PWM. With 18 I/O pins and a 10-bit ADC for temperature and lumen feedback, the part drives a complete dimmable LED luminaire from a single chip. Typical reference designs deliver 90%+ efficiency at 100 kHz switching frequency.
Recommended
BLDC and DC Motor Control
For sensorless BLDC motor control, the PIC16F785's two high-speed comparators perform back-EMF zero-crossing detection directly, eliminating the need for external comparator ICs and reducing BOM cost. The two integrated op-amps condition the shunt-resistor voltage for the 10-bit ADC to measure phase current. The 10-bit PWM with programmable dead-time drives a three-phase half-bridge through gate drivers like the MCP14E4. At 20 MHz the MCU sustains the entire commutation loop, including ADC sampling, comparator triggering, and PWM update, in well under 50 us, leaving CPU headroom for RPM control loops.
Recommended
Battery Chargers
The PIC16F785 is well suited to single- and multi-cell Li-ion or NiMH chargers because its 10-bit ADC monitors battery voltage and charge current simultaneously, while the integrated op-amps amplify the current-sense shunt signal. The 2.0V to 5.5V operating range supports 1-cell Li-ion packs directly from a USB 5V rail. The Two-Phase Asynchronous Feedback PWM enables primary-side regulation in AC/DC adapters without an opto-coupler, while nanoWatt Technology sleep modes drop quiescent current to sub-microamp levels for always-connected standby. Watchdog timer and brown-out reset improve charger safety for unattended batteries.
Recommended
AC/DC Power Supply Primary-Side Regulation
The PIC16F785's Two-Phase Asynchronous Feedback PWM is specifically designed for primary-side regulation (PSR) in isolated AC/DC converters such as 5V/12V phone chargers and appliance power supplies. The high-speed comparators detect transformer demagnetization for valley-switching, while the 10-bit ADC reads the auxiliary winding voltage to infer output voltage without an opto-coupler. This topology removes the opto-isolator and TL431 reference, cutting BOM cost by 15-25% and improving long-term reliability. With 3.5KB Flash the firmware fits CV/CC control loops, cable-compensation tables, and fault handling.
Recommended
Sensor Signal Conditioning and IoT Edge Nodes
For IoT edge nodes that read analog sensors (temperature, pressure, gas) and transmit over UART or PWM, the PIC16F785 offers an integrated analog chain: two op-amps condition sensor outputs, the 10-bit ADC digitizes them, and nanoWatt Technology sleep modes keep battery life in the multi-year range. The 2.0V minimum supply lets the part run from a single CR2032 coin cell down to its end-of-life voltage. The internal 8 MHz oscillator eliminates an external crystal, saving board area and BOM cost in compact wireless sensor modules.
Recommended
Automotive Interior Lighting and Body Electronics
The PIC16F785's on-chip analog peripherals and PWM channels make it a strong fit for ambient lighting controllers, HVAC damper drivers, and seat-control modules. When paired with the -E temperature grade variant (PIC16F785-E/SO, -40C to +125C), the same silicon covers AEC-Q100 Grade 2 automotive environments. The two op-amps handle current-sense for multiple LED strings with PWM dimming at frequencies above the audible band, while the comparators provide fast short-circuit protection. CAN or LIN networking can be implemented bit-banged on the 18 I/O pins for low-speed body networks.
Recommended
Industrial Process Control and Instrumentation
In factory automation and process control, the PIC16F785 can implement small PLC-style controllers, signal isolators, and loop-powered transmitters. The two integrated op-amps handle 4-20 mA current-loop signal conditioning, while the 10-bit ADC digitizes process variables for local display or transmission. The wide 2.0V-5.5V supply tolerates noisy 24V industrial rails when powered through a small linear regulator. Robust peripherals including the watchdog timer, brown-out reset, and high-speed comparators support fault detection required in industrial environments.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F785-I/SO β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F785T-I/SO | PIC16F785-E/SO | PIC16F785-I/SP | PIC16F785T-E/SO | PIC16F785-E/SS |
|---|---|---|---|---|---|---|
| Package | 20-SOIC (SO) | 20-SOIC (SO) - same | 20-SOIC (SO) - same | 20-PDIP (SP) - through-hole | 20-SOIC (SO) - same | 20-SSOP (SS) - same pinout |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Flash Program Memory | 3.5 KB | 3.5 KB | 3.5 KB | 3.5 KB | 3.5 KB | 3.5 KB |
| SRAM | 128 bytes | 128 bytes | 128 bytes | 128 bytes | 128 bytes | 128 bytes |
| Maximum CPU Speed | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| Operating Temperature | -40C to +85C (Industrial) | -40C to +85C | -40C to +125C (Extended) | -40C to +85C | -40C to +125C | -40C to +125C |
| On-Chip Op-Amps | 2 | 2 | 2 | 2 | 2 | 2 |
| High-Speed Comparators | 2 | 2 | 2 | 2 | 2 | 2 |
| Packaging Format | Tube | Tape & Reel (T suffix) | Tube | Tube | Tape & Reel | Tube |
Key Differentiators
- Two on-chip op-amps eliminate external analog ICs in LED and motor designs (vs PIC16F690-I/SO)
- Two-Phase Asynchronous Feedback PWM enables primary-side regulation (vs PIC16F73-I/SO)
- Single MCU solution for AC/DC + LED driver + charger (vs PIC16F76-I/SO)
Design Notes
Place a 100 nF decoupling capacitor within 5 mm of the VDD pin (pin 11) and a bulk capacitor (1-10 uF) near the IC. The 2.0V-5.5V supply range tolerates battery droop, but fast digital transitions on I/O pins can inject supply noise; an additional 10 nF ceramic in parallel with the bulk cap helps in PWM-heavy designs.
The two on-chip op-amps and comparators share pins with the digital I/O port (RA0-RA7). When using analog functions, configure the corresponding TRIS bits to disable digital output drivers to avoid cross-talk. The op-amp output pin (RA2) and comparator outputs (RA2/RA4) must be configured as inputs at all times when their analog function is enabled.
Route the analog signal traces (RA0-RA7 in analog mode) away from the PWM outputs (RB0, RB1-RB4, RB5) to minimize coupling. For LED-driver and motor-control designs with high di/dt, place a ground pour under the IC and use short, wide ground returns. The exposed pad on the SSOP package (PIC16F785-E/SS variant) should be soldered to a ground copper pour to improve thermal dissipation.
When using the Two-Phase Asynchronous Feedback PWM for primary-side regulation, the comparator input pins (C1IN+/C1IN-/C2IN+/C2IN-) carry the demagnetization-sensing waveform from the auxiliary winding. Add a 100 pF-1 nF ceramic cap close to the comparator input pin to filter switching noise, and keep these traces short and shielded by a ground trace.
MCLR (pin 19) must be tied to VDD through a 10 kohm pull-up for normal operation, unless in-circuit serial programming is used (in which case follow the Microchip ICSP specification). Leaving MCLR floating causes intermittent resets. For high-noise environments, add a 100 nF cap from MCLR to ground for additional reset noise immunity.
Compliance Information
RoHS compliant per Microchip product page. Not AEC-Q100 qualified as standard - automotive designs should consider PIC16F785-E/SO extended temperature grade. For full halogen-free status, request the Material Declaration Sheet.