![](http://datasheet.mmic.net.cn/260000/PIC16F785_datasheet_15942845/PIC16F785_172.png)
PIC16F785
DS41249A-page 170
Preliminary
2004 Microchip Technology Inc.
OPAMP Control Register (OPACON).........................74
OPTION_REG (Option) ..............................................16
OSCCON (Oscillator Control) .....................................32
PCON (Power Control) .............................................108
PIE1 (Peripheral Interrupt Enable 1)...........................18
PIR1 (Peripheral Interrupt Register 1) ........................19
PORTA........................................................................33
PORTB........................................................................40
PORTC .......................................................................43
PWMCLK (PWM clock control)...................................90
PWMCON0 (PWM control 0) ......................................89
PWMCON1 (PWM control 1) ......................................95
PWMPH1 (PWM Phase 1 control)..............................91
PWMPH2 (PWM Phase 2 control)..............................92
REFCON (VR control).................................................71
Reset Values (special registers) ...............................112
Special Function registers.............................................9
Special Register Summary .......................11, 12, 13, 14
Status..........................................................................15
T1CON (Timer1 Control).............................................51
T2CON (Timer2 Control).............................................53
TRISA (Tristate PORTA).............................................34
TRISB (Tristate PORTB).............................................40
TRISC (Tristate PORTC) ............................................43
WDTCON (Watchdog Timer Control)........................118
WPUA (Weak Pull-up PORTA)...................................34
Resets...............................................................................105
Power-On Reset .......................................................106
Revision History................................................................165
RRF Instruction.................................................................130
S
SLEEP Instruction.............................................................130
Software Simulator (MPLAB SIM).....................................134
Software Simulator (MPLAB SIM30).................................134
Special Event Trigger..........................................................86
Special Function registers.....................................................9
Status Register....................................................................15
SUBLW Instruction............................................................130
SUBWF Instruction............................................................131
SWAPF Instruction............................................................131
T
Time-out Sequence...........................................................108
Timer0.................................................................................47
Associated registers....................................................48
External Clock.............................................................48
Interrupt.......................................................................47
Operation ....................................................................47
Prescaler.....................................................................48
Specifications............................................................153
Timer1.................................................................................49
Associated registers....................................................52
Asynchronous Counter Mode .....................................52
Reading and Writing ...........................................52
Interrupt.......................................................................50
Modes of Operations...................................................50
Operation During Sleep ..............................................52
Oscillator.....................................................................52
Prescaler.....................................................................50
Specifications............................................................153
Timer1 Gate
Inverting Gate .....................................................50
Selecting Source.................................................50
TMR1H Register .........................................................49
TMR1L Register..........................................................49
Timer2................................................................................. 53
Associated registers ................................................... 54
Operation.................................................................... 53
Postscaler................................................................... 53
PR2 Register .............................................................. 53
Prescaler .................................................................... 53
TMR2 Register............................................................ 53
TMR2 to PR2 Match Interrupt............................... 53, 54
Timing Diagrams
A/D Conversion......................................................... 158
A/D Conversion (Sleep Mode).................................. 159
Brown-out Reset (BOR)............................................ 152
Brown-out Reset Situations...................................... 107
Capture/Compare/PWM (CCP) ................................ 154
CLKOUT and I/O ...................................................... 150
External Clock........................................................... 148
Fail-Safe Clock Monitor (FSCM)................................. 31
INT Pin Interrupt ....................................................... 115
Reset, WDT, OST and Power-up Timer................... 151
Time-out Sequence
Case 1 .............................................................. 109
Case 2 .............................................................. 109
Case 3 .............................................................. 109
Timer0 and Timer1 External Clock........................... 153
Timer1 Incrementing Edge ......................................... 50
Two Phase PWM
Auto-Shutdown................................................... 93
Complementary Output ...................................... 96
Startup................................................................ 93
System Timing.................................................... 92
Two Speed Start-up.................................................... 30
Wake-up from Interrupt............................................. 120
Timing Parameter Symbology .......................................... 148
TRIS Instruction................................................................ 131
TRISA Register................................................................... 34
TRISB Register................................................................... 40
TRISC Register................................................................... 43
Two Phase PWM................................................................ 87
Activating.................................................................... 87
Active output level ...................................................... 88
Associated registers ................................................... 97
Auto shutdown............................................................ 88
Clock control (PWMCLK)............................................ 90
Control Register 0 (PWMCON0)................................. 89
Control Register 1 (PWMCON1)................................. 95
Master/Slave Operation.............................................. 87
Output Blanking.......................................................... 87
Phase 1 control (PWMPH1)........................................ 91
Phase 2 control (PWMPH1)........................................ 92
PWM Duty Cycle......................................................... 87
PWM Frequency......................................................... 87
PWM Period................................................................ 87
PWM Phase................................................................ 87
PWM Phase resolution............................................... 87
Shutdown.................................................................... 88
Two-Speed Clock Start-up Mode........................................ 29
V
Voltage References............................................................ 69
Associated registers ................................................... 72
Configuring CVref....................................................... 69
CVref (Comparator Reference)................................... 69
CVref Accuracy........................................................... 69
Fixed VR reference..................................................... 71
VR Stabilization .......................................................... 72
V
REF
. S
EE
A/D Reference Voltage