
PIC16F785

20-Pin Flash-Based, 8-Bit CMOS Microcontroller
with Two-Phase Asynchronous Feedback PWM
Dual High-Speed Comparators and
Dual Operational Amplifiers

High-Performance RISC CPU:

 Only 35 instructions to learn:
  - All single-cycle instructions except branches
 Operating speed:
  - DC  20 MHz oscillator/clock input
  - DC  200 ns instruction cycle
 Interrupt capability
 8-level deep hardware stack
 Direct, Indirect and Relative Addressing modes

Special Microcontroller Features:

 Precision Internal Oscillator:
  - Factory calibrated to 1%
  - Software selectable frequency range of
    8 MHz to 32 kHz
  - Software tunable
  - Two-Speed Start-up mode
  - Crystal fail detect for critical applications
  - Clock mode switching during operation for
    power savings
 Power-saving Sleep mode
 Wide operating voltage range (2.0V-5.5V)
 Industrial and Extended temperature range
 Power-on Reset (POR)
 Power-up Timer (PWRT) and Oscillator Start-up
  Timer (OST)
 Brown-out Reset (BOR) with software control
  option
 Enhanced Low-Current Watchdog Timer (WDT)
  with on-chip oscillator (software selectable
  nominal 268 seconds with full prescaler) with
  software enable
 Multiplexed Master Clear with pull-up/input pin
 Programmable code protection
 High-Endurance Flash/EEPROM cell:
  - 100,000 write Flash endurance
  - 1,000,000 write EEPROM endurance
  - Flash/Data EEPROM retention: > 40 years

Low-Power Features:

 Standby Current:
  - 30 nA @ 2.0V, typical
 Operating Current:
  - 8.5A @ 32 kHz, 2.0V, typical
  - 100A @ 1 MHz, 2.0V, typical
 Watchdog Timer Current:
  - 1A @ 2.0V, typical
 Timer1 Oscillator Current:
  - 2A @ 32 kHz, 2.0V, typical

Peripheral Features:

 High-speed Comparator module with:
  - Two independent analog comparators
  - Programmable on-chip voltage reference
    (CVREF) module (% of VDD)
  - 1.2V band gap voltage reference
  - Comparator inputs and outputs externally
    accessible
  - < 40 ns propagation delay
  - 2 mv offset, typical
 Operational Amplifier module with 2 independent
  op amps:
  - 3 MHz GBWP, typical
  - All I/O pins externally accessible
 Two-Phase Asynchronous Feedback PWM module:
  - Complementary output with programmable
    dead band delay
  - Infinite resolution analog duty cycle
  - Sync Output/Input for multi-phase PWM
  - FOSC/2 maximum PWM frequency
 A/D Converter:
  - 10-bit resolution and 14 channels (2 internal)
 17 I/O pins and 1 input-only pin:
  - High-current source/sink for direct LED drive
  - Interrupt-on-pin change
  - Individually programmable weak pull-ups
 Timer0: 8-bit timer/counter with 8-bit
  programmable prescaler
 Enhanced Timer1:
  - 16-bit timer/counter with prescaler
  - External gate Input mode
  - Option to use OSC1 and OSC2 in LP mode
    as Timer1 oscillator, if INTOSC mode selected
 Timer2: 8-bit timer/counter with 8-bit period
  register, prescaler and postscaler
 Capture, Compare, PWM module:
  - 16-bit Capture, max resolution 12.5 ns
  - Compare, max resolution 200 ns
  - 10-bit PWM with 1 output channel, max
    frequency 20 kHz
 In-Circuit Serial ProgrammingTM (ICSPTM) via two pins