![](http://datasheet.mmic.net.cn/260000/PIC16F785_datasheet_15942845/PIC16F785_170.png)
PIC16F785
DS41249A-page 168
Preliminary
2004 Microchip Technology Inc.
Initializing PORTC.......................................................43
Interrupt Context Saving ...........................................116
Code Protection ................................................................121
Comparator Module ............................................................61
Associated registers....................................................72
C1 Output State Versus Input Conditions...................61
C2 Output State Versus Input Conditions...................64
Comparator Interrupts.................................................67
Effects of a RESET.....................................................67
Comparator Voltage Reference (CV
REF
)
Specifications............................................................155
Comparators
C2OUT as T1 Gate.....................................................50
Specifications............................................................155
Compare Module. SeeCapture/Compare/PWM (CCP)
CONFIG Register..............................................................104
Configuration Bits..............................................................103
CPU Features ...................................................................103
D
Data EEPROM Memory
Associated registers..................................................102
Code Protection ..................................................99, 102
Data Memory.........................................................................9
DC Characteristics
Extended and Industrial ............................................146
Industrial and Extended ............................................141
Demonstration Boards
PICDEM 1.................................................................136
PICDEM 17...............................................................137
PICDEM 18R ............................................................137
PICDEM 2 Plus.........................................................136
PICDEM 3.................................................................136
PICDEM 4.................................................................136
PICDEM LIN .............................................................137
PICDEM USB............................................................137
PICDEM.net Internet/Ethernet ..................................136
Development Support .......................................................133
Device Overview ...................................................................5
E
EEADR Register .................................................................99
EECON1 Register.............................................................100
EECON2 Register.............................................................100
EEDAT Register..................................................................99
EEPROM Data Memory
Avoiding Spurious Write............................................101
Reading.....................................................................101
Write Verify ...............................................................101
Writing.......................................................................101
Electrical Specifications ....................................................139
Errata ....................................................................................3
Evaluation and Programming Tools..................................137
F
Fail-Safe Clock Monitor.......................................................30
Fail-Safe Condition Clearing.......................................31
Reset and Wake-up from Sleep..................................31
Firmware Instructions........................................................123
Fuses. See Configuration Bits
G
General Purpose Register File..............................................9
I
ID Locations...................................................................... 121
In-Circuit Debugger........................................................... 122
In-Circuit Serial Programming (ICSP)............................... 121
Indirect Addressing, INDF and FSR registers..................... 22
Instruction Format............................................................. 123
Instruction Set................................................................... 123
ADDLW..................................................................... 125
ADDWF..................................................................... 125
ANDLW..................................................................... 125
ANDWF..................................................................... 125
BCF .......................................................................... 125
BSF........................................................................... 125
BTFSC...................................................................... 125
BTFSS...................................................................... 125
CALL......................................................................... 126
CLRF ........................................................................ 126
CLRW....................................................................... 126
CLRWDT .................................................................. 126
COMF....................................................................... 126
DECF........................................................................ 126
DECFSZ ................................................................... 126
GOTO....................................................................... 127
INCF ......................................................................... 127
INCFSZ..................................................................... 127
IORLW...................................................................... 127
IORWF...................................................................... 127
MOVF ....................................................................... 127
MOVLW.................................................................... 128
MOVWF.................................................................... 128
NOP.......................................................................... 128
RETFIE..................................................................... 128
RETLW..................................................................... 129
RETURN................................................................... 129
RLF........................................................................... 129
RRF .......................................................................... 130
SLEEP...................................................................... 130
SUBLW..................................................................... 130
SUBWF..................................................................... 131
SWAPF..................................................................... 131
TRIS ......................................................................... 131
XORLW .................................................................... 132
XORWF .................................................................... 132
Summary Table ........................................................ 124
INTCON Register................................................................ 17
Internal Oscillator Block
INTOSC
Specifications ................................................... 150
Internal Sampling Switch (R
SS
) Impedance........................ 83
Interrupts........................................................................... 113
(CCP) Compare.......................................................... 57
A/D.............................................................................. 82
Associated registers ................................................. 115
Comparator................................................................. 67
Context Saving ......................................................... 116
Data EEPROM Memory Write.................................. 100
Interrupt-on-change.................................................... 35
Oscillator Fail (OSF)................................................... 30
PORTA Interrupt-on-change..................................... 114
RA2/INT.................................................................... 114
TMR0........................................................................ 114
TMR1.......................................................................... 50
TMR2 to PR2 Match............................................. 53, 54
INTOSC Specifications..................................................... 150
IOCA (interrupt-on-change)................................................ 35
IOCA Register..................................................................... 35