PIC16F870/871
CLRW ...................................................................... 108
CLRWDT .................................................................. 108
COMF ...................................................................... 109
DECF ....................................................................... 109
DECFSZ ................................................................... 109
GOTO ...................................................................... 109
INCF ......................................................................... 109
INCFSZ .................................................................... 109
IORLW ..................................................................... 110
IORWF ..................................................................... 110
MOVF ....................................................................... 110
MOVLW ................................................................... 110
MOVWF ................................................................... 110
NOP ......................................................................... 110
RETFIE .................................................................... 111
RETLW .................................................................... 111
RETURN .................................................................. 111
RLF .......................................................................... 111
RRF .......................................................................... 111
SLEEP ..................................................................... 111
SUBLW .................................................................... 112
SUBWF .................................................................... 112
SWAPF .................................................................... 112
XORLW .................................................................... 112
XORWF .................................................................... 112
Summary Table ........................................................ 106
INTCON ............................................................................. 15
INTCON Register ............................................................... 18
GIE Bit ........................................................................ 18
INTE Bit ...................................................................... 18
INTF Bit ...................................................................... 18
PEIE Bit ...................................................................... 18
RBIE Bit ..................................................................... 18
RBIF Bit ................................................................ 18, 29
T0IE Bit ...................................................................... 18
T0IF Bit ...................................................................... 18
Internal Sampling Switch (Rss) Impedence ....................... 82
Interrupt Sources .......................................................... 89, 99
Block Diagram ............................................................ 99
Interrupt on Change (RB7:RB4 ) ................................ 29
RB0/INT Pin, External ...................................... 7, 8, 100
TMR0 Overflow ........................................................ 100
USART Receive/Transmit Complete ......................... 63
Interrupts, Context Saving During .................................... 100
Interrupts, Enable Bits
Global Interrupt Enable (GIE Bit) ......................... 18, 99
Interrupt on Change (RB7:RB4) Enable
(RBIE Bit) ........................................................... 18, 100
Peripheral Interrupt Enable (PEIE Bit) ....................... 18
RB0/INT Enable (INTE Bit) ........................................ 18
TMR0 Overflow Enable (T0IE Bit) .............................. 18
Interrupts, Flag Bits
Interrupt on Change (RB7:RB4) Flag
(RBIF Bit) ..................................................... 18, 29, 100
RB0/INT Flag (INTF Bit) ............................................. 18
TMR0 Overflow Flag (T0IF Bit) .......................... 18, 100
K
KeeLoq® Evaluation and Programming Tools ................. 116
L
Loading of PC .................................................................... 24
M
Master Clear (MCLR) ....................................................... 7, 8
MCLR Reset, Normal Operation .................... 93, 95, 96
MCLR Reset, SLEEP ..................................... 93, 95, 96
Memory Organization
Data Memory ............................................................. 11
Program Memory ....................................................... 11
MPLAB Integrated Development Environment Software . 113
O
OPCODE Field Descriptions ............................................ 105
OPTION ............................................................................. 15
OPTION_REG Register ..................................................... 17
INTEDG Bit ................................................................ 17
PS2:PS0 Bits ............................................................. 17
PSA Bit ...................................................................... 17
RBPU Bit ................................................................... 17
T0CS Bit .................................................................... 17
T0SE Bit .................................................................... 17
OSC1/CLKIN Pin ............................................................. 7, 8
OSC2/CLKOUT Pin ......................................................... 7, 8
Oscillator Configuration ............................................... 89, 91
HS ........................................................................ 91, 95
LP ........................................................................ 91, 95
RC ................................................................. 91, 92, 95
XT ........................................................................ 91, 95
Oscillator, WDT ................................................................ 101
Output of TMR2 ................................................................. 55
P
Packaging ........................................................................ 137
Paging, Program Memory ............................................ 11, 24
Parallel Slave Port (PSP) ......................................... 9, 33, 36
Block Diagram ........................................................... 36
RE0/RD/AN5 Pin ............................................. 9, 35, 36
RE1/WR/AN6 Pin ............................................. 9, 35, 36
RE2/CS/AN7 Pin .............................................. 9, 35, 36
Read Waveforms ....................................................... 37
Select (PSPMODE Bit) .................................. 33, 34, 36
Write Waveforms ....................................................... 37
PCL Register ................................................... 13, 14, 15, 24
PCLATH Register ............................................ 13, 14, 15, 24
PCON Register ...................................................... 15, 23, 94
BOR Bit ...................................................................... 23
POR Bit ...................................................................... 23
PIC16F876 Pinout Description ............................................ 7
PICDEM-1 Low-Cost PICmicro Demo Board .................. 115
PICDEM-2 Low-Cost PIC16CXX Demo Board ................ 115
PICDEM-3 Low-Cost PIC16CXXX Demo Board ............. 115
PICSTART® Plus Entry Level Development System ...... 115
PIE1 Register ............................................................... 15, 19
PIE2 Register ............................................................... 15, 21
Pinout Descriptions
PIC16F870 .................................................................. 7
PIC16F871 .................................................................. 8
PIR1 Register .................................................................... 20
PIR2 Register .................................................................... 22
POP ................................................................................... 24
PORTA ...................................................................... 7, 8, 15
Analog Port Pins ...................................................... 7, 8
Initialization ................................................................ 27
PORTA Register ........................................................ 27
RA3,RA0 and RA5 Port Pins ..................................... 27
RA4/T0CKI Pin .................................................. 7, 8, 27
RA5/AN4 Pin ........................................................... 7, 8
TRISA Register .......................................................... 27
DS30569A-page 146
Preliminary
© 1999 Microchip Technology Inc.