0% found this document useful (0 votes)
22 views7 pages

PIC886 Basico

MANUAL PIC886

Uploaded by

hinamah591
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views7 pages

PIC886 Basico

MANUAL PIC886

Uploaded by

hinamah591
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

PIC16F882/883/884/886/887

Pin Diagrams – PIC16F882/883/886, 28-Pin PDIP, SOIC, SSOP


28-pin PDIP, SOIC, SSOP

RE3/MCLR/VPP 1 28 RB7/ICSPDAT
RA0/AN0/ULPWU/C12IN0- 2 27 RB6/ICSPCLK
RA1/AN1/C12IN1- 3 26 RB5/AN13/T1G
RA2/AN2/VREF-/CVREF/C2IN+ 4 25 RB4/AN11/P1D

PIC16F882/883/886
RA3/AN3/VREF+/C1IN+ 5 24 RB3/AN9/PGM/C12IN2-
RA4/T0CKI/C1OUT 6 23 RB2/AN8/P1B
RA5/AN4/SS/C2OUT 7 22 RB1/AN10/P1C/C12IN3-
VSS 8 21 RB0/AN12/INT
RA7/OSC1/CLKIN 9 20 VDD
RA6/OSC2/CLKOUT 10 19 VSS
RC0/T1OSO/T1CKI 11 18 RC7/RX/DT
RC1/T1OSI/CCP2 12 17 RC6/TX/CK
RC2/P1A/CCP1 13 16 RC5/SDO
RC3/SCK/SCL 14 15 RC4/SDI/SDA

TABLE 1: PIC16F882/883/886 28-PIN SUMMARY (PDIP, SOIC, SSOP)


I/O Pin Analog Comparators Timers ECCP EUSART MSSP Interrupt Pull-up Basic
RA0 2 AN0/ULPWU C12IN0- — — — — — — —
RA1 3 AN1 C12IN1- — — — — — — —
RA2 4 AN2 C2IN+ — — — — — — VREF-/CVREF
RA3 5 AN3 C1IN+ — — — — — — VREF+
RA4 6 — C1OUT T0CKI — — — — — —
RA5 7 AN4 C2OUT — — — SS — — —
RA6 10 — — — — — — — — OSC2/CLKOUT
RA7 9 — — — — — — — — OSC1/CLKIN
RB0 21 AN12 — — — — — IOC/INT Y —
RB1 22 AN10 C12IN3- — P1C — — IOC Y —
RB2 23 AN8 — — P1B — — IOC Y —
RB3 24 AN9 C12IN2- — — — — IOC Y PGM
RB4 25 AN11 — — P1D — — IOC Y —
RB5 26 AN13 — T1G — — — IOC Y —
RB6 27 — — — — — — IOC Y ICSPCLK
RB7 28 — — — — — — IOC Y ICSPDAT
RC0 11 — — T1OSO/T1CKI — — — — — —
RC1 12 — — T1OSI CCP2 — — — — —
RC2 13 — — — CCP1/P1A — — — — —
RC3 14 — — — — — SCK/SCL — — —
RC4 15 — — — — — SDI/SDA — — —
RC5 16 — — — — — SDO — — —
RC6 17 — — — — TX/CK — — — —
RC7 18 — — — — RX/DT — — — —
RE3 1 — — — — — — — Y(1) MCLR/VPP
— 20 — — — — — — — — VDD
— 8 — — — — — — — — VSS
— 19 — — — — — — — — VSS
Note 1: Pull-up activated only with external MCLR configuration.

© 2007 Microchip Technology Inc. Preliminary DS41291D-page 3


PIC16F882/883/884/886/887
2.0 MEMORY ORGANIZATION FIGURE 2-2: PROGRAM MEMORY MAP
AND STACK FOR THE
2.1 Program Memory Organization PIC16F883/PIC16F884

The PIC16F882/883/884/886/887 has a 13-bit program PC<12:0>


counter capable of addressing a 2K x 14 (0000h-07FFh)
CALL, RETURN 13
for the PIC16F882, 4K x 14 (0000h-0FFFh) for the
RETFIE, RETLW
PIC16F883/PIC16F884, and 8K x 14 (0000h-1FFFh) for
the PIC16F886/PIC16F887 program memory space.
Stack Level 1
Accessing a location above these boundaries will cause
a wraparound within the first 8K x 14 space. The Reset Stack Level 2

vector is at 0000h and the interrupt vector is at 0004h


(see Figures 2-2 and 2-3).
Stack Level 8

FIGURE 2-1: PROGRAM MEMORY MAP Reset Vector 0000h


AND STACK FOR THE
PIC16F882

PC<12:0> Interrupt Vector 0004h


CALL, RETURN 0005h
13 Page 0
RETFIE, RETLW On-Chip
07FFh
Program
Memory 0800h
Page 1
Stack Level 1
0FFFh
Stack Level 2

Stack Level 8 FIGURE 2-3: PROGRAM MEMORY MAP


AND STACK FOR THE
Reset Vector 0000h PIC16F886/PIC16F887

PC<12:0>

CALL, RETURN 13
Interrupt Vector 0004h RETFIE, RETLW
On-Chip 0005h
Program Page 0
Memory 07FFh Stack Level 1
Stack Level 2

Stack Level 8

Reset Vector 0000h

Interrupt Vector 0004h


0005h
Page 0
07FFh
0800h
Page 1
On-Chip
0FFFh
Program
Memory 1000h
Page 2
17FFh
1800h
Page 3
1FFFh

© 2007 Microchip Technology Inc. Preliminary DS41291D-page 21


PIC16F882/883/884/886/887
FIGURE 2-6: PIC16F886/PIC16F887 SPECIAL FUNCTION REGISTERS
File File File File
Address Address Address Address
Indirect addr. (1) 00h Indirect addr. (1) 80h Indirect addr. (1) 100h Indirect addr. (1) 180h
TMR0 01h OPTION_REG 81h TMR0 101h OPTION_REG 181h
PCL 02h PCL 82h PCL 102h PCL 182h
STATUS 03h STATUS 83h STATUS 103h STATUS 183h
FSR 04h FSR 84h FSR 104h FSR 184h
PORTA 05h TRISA 85h WDTCON 105h SRCON 185h
PORTB 06h TRISB 86h PORTB 106h TRISB 186h
PORTC 07h TRISC 87h CM1CON0 107h BAUDCTL 187h
PORTD(2) 08h TRISD(2) 88h CM2CON0 108h ANSEL 188h
PORTE 09h TRISE 89h CM2CON1 109h ANSELH 189h
PCLATH 0Ah PCLATH 8Ah PCLATH 10Ah PCLATH 18Ah
INTCON 0Bh INTCON 8Bh INTCON 10Bh INTCON 18Bh
PIR1 0Ch PIE1 8Ch EEDAT 10Ch EECON1 18Ch
PIR2 0Dh PIE2 8Dh EEADR 10Dh EECON2(1) 18Dh
TMR1L 0Eh PCON 8Eh EEDATH 10Eh Reserved 18Eh
TMR1H 0Fh OSCCON 8Fh EEADRH 10Fh Reserved 18Fh
T1CON 10h OSCTUNE 90h 110h 190h
TMR2 11h SSPCON2 91h 111h 191h
T2CON 12h PR2 92h 112h 192h
SSPBUF 13h SSPADD 93h 113h 193h
SSPCON 14h SSPSTAT 94h 114h 194h
CCPR1L 15h WPUB 95h 115h 195h
CCPR1H 16h IOCB 96h General 116h General 196h
CCP1CON 17h VRCON 97h Purpose 117h Purpose 197h
Registers Registers
RCSTA 18h TXSTA 98h 118h 198h
TXREG 19h SPBRG 99h 16 Bytes 119h 16 Bytes 199h
RCREG 1Ah SPBRGH 9Ah 11Ah 19Ah
CCPR2L 1Bh PWM1CON 9Bh 11Bh 19Bh
CCPR2H 1Ch ECCPAS 9Ch 11Ch 19Ch
CCP2CON 1Dh PSTRCON 9Dh 11Dh 19Dh
ADRESH 1Eh ADRESL 9Eh 11Eh 19Eh
ADCON0 1Fh ADCON1 9Fh 11Fh 19Fh
20h A0h 120h 1A0h
General
General General
3Fh Purpose
General Purpose Purpose
Registers
Purpose 40h Registers Registers
Registers 80 Bytes
80 Bytes 80 Bytes
96 Bytes 6Fh EFh 16Fh 1EFh
70h accesses F0h accesses 170h accesses 1F0h
7Fh 70h-7Fh FFh 70h-7Fh 17Fh 70h-7Fh 1FFh
Bank 0 Bank 1 Bank 2 Bank 3
Unimplemented data memory locations, read as ‘0’.
Note 1: Not a physical register.
2: PIC16F887 only.

© 2007 Microchip Technology Inc. Preliminary DS41291D-page 25


PIC16F882/883/884/886/887
TABLE 2-1: PIC16F882/883/884/886/887 SPECIAL FUNCTION REGISTERS SUMMARY BANK 0
Value on
Addr Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Page
POR, BOR

Bank 0
00h INDF Addressing this location uses contents of FSR to address data memory (not a physical register) xxxx xxxx 37,213
01h TMR0 Timer0 Module Register xxxx xxxx 73,213
02h PCL Program Counter’s (PC) Least Significant Byte 0000 0000 37,213
03h STATUS IRP RP1 RP0 TO PD Z DC C 0001 1xxx 29,213
04h FSR Indirect Data Memory Address Pointer xxxx xxxx 37,213
05h PORTA(3) RA7 RA6 RA5 RA4 RA3 RA2 RA1 RA0 xxxx xxxx 39,213
06h PORTB(3) RB7 RB6 RB5 RB4 RB3 RB2 RB1 RB0 xxxx xxxx 48,213
07h PORTC(3) RC7 RC6 RC5 RC4 RC3 RC2 RC1 RC0 xxxx xxxx 53,213
08h PORTD(3,4) RD7 RD6 RD5 RD4 RD3 RD2 RD1 RD0 xxxx xxxx 57,213
09h PORTE(3) — — — — RE3 RE2(4) RE1(4) RE0(4) ---- xxxx 59,213
0Ah PCLATH — — — Write Buffer for upper 5 bits of Program Counter ---0 0000 37,213
0Bh INTCON GIE PEIE T0IE INTE RBIE T0IF INTF RBIF(1) 0000 000x 31,213
0Ch PIR1 — ADIF RCIF TXIF SSPIF CCP1IF TMR2IF TMR1IF -000 0000 34,213
0Dh PIR2 OSFIF C2IF C1IF EEIF BCLIF ULPWUIF — CCP2IF 0000 00-0 35,213
0Eh TMR1L Holding Register for the Least Significant Byte of the 16-bit TMR1 Register xxxx xxxx 76,213
0Fh TMR1H Holding Register for the Most Significant Byte of the 16-bit TMR1 Register xxxx xxxx 76,213
10h T1CON T1GINV TMR1GE T1CKPS1 T1CKPS0 T1OSCEN T1SYNC TMR1CS TMR1ON 0000 0000 79,213
11h TMR2 Timer2 Module Register 0000 0000 81,213
12h T2CON — TOUTPS3 TOUTPS2 TOUTPS1 TOUTPS0 TMR2ON T2CKPS1 T2CKPS0 -000 0000 82,213
13h SSPBUF Synchronous Serial Port Receive Buffer/Transmit Register xxxx xxxx 179,213
14h SSPCON(2) WCOL SSPOV SSPEN CKP SSPM3 SSPM2 SSPM1 SSPM0 0000 0000 177,213
15h CCPR1L Capture/Compare/PWM Register 1 Low Byte (LSB) xxxx xxxx 126,213
16h CCPR1H Capture/Compare/PWM Register 1 High Byte (MSB) xxxx xxxx 126,213
17h CCP1CON P1M1 P1M0 DC1B1 DC1B0 CCP1M3 CCP1M2 CCP1M1 CCP1M0 0000 0000 124,213
18h RCSTA SPEN RX9 SREN CREN ADDEN FERR OERR RX9D 0000 000x 159,213
19h TXREG EUSART Transmit Data Register 0000 0000 151,213
1Ah RCREG EUSART Receive Data Register 0000 0000 156,213
1Bh CCPR2L Capture/Compare/PWM Register 2 Low Byte (LSB) xxxx xxxx 126,213
1Ch CCPR2H Capture/Compare/PWM Register 2 High Byte (MSB) xxxx xxxx 126,214
1Dh CCP2CON — — DC2B1 DC2B0 CCP2M3 CCP2M2 CCP2M1 CCP2M0 --00 0000 125,214
1Eh ADRESH A/D Result Register High Byte xxxx xxxx 99,214
1Fh ADCON0 ADCS1 ADCS0 CHS3 CHS2 CHS1 CHS0 GO/DONE ADON 0000 0000 104,214
Legend: – = Unimplemented locations read as ‘0’, u = unchanged, x = unknown, q = value depends on condition, shaded = unimplemented
Note 1: MCLR and WDT Reset do not affect the previous value data latch. The RBIF bit will be cleared upon Reset but will set again if the
mismatch exists.
2: When SSPCON register bits SSPM<3:0> = 1001, any reads or writes to the SSPADD SFR address are accessed through the SSPMSK
register. See Registers • and 13-4 for more detail.
3: Port pins with analog functions controlled by the ANSEL and ANSELH registers will read ‘0’ immediately after a Reset even though the
data latches are either undefined (POR) or unchanged (other Resets).
4: PIC16F884/PIC16F887 only.

DS41291D-page 26 Preliminary © 2007 Microchip Technology Inc.


PIC16F882/883/884/886/887
TABLE 2-2: PIC16F882/883/884/886/887 SPECIAL FUNCTION REGISTERS SUMMARY BANK 1
Value on
Addr Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Page
POR, BOR

Bank 1
80h INDF Addressing this location uses contents of FSR to address data memory (not a physical register) xxxx xxxx 37,213
81h OPTION_REG RBPU INTEDG T0CS T0SE PSA PS2 PS1 PS0 1111 1111 30,214
82h PCL Program Counter’s (PC) Least Significant Byte 0000 0000 37,213
83h STATUS IRP RP1 RP0 TO PD Z DC C 0001 1xxx 29,213
84h FSR Indirect Data Memory Address Pointer xxxx xxxx 37,213
85h TRISA TRISA7 TRISA6 TRISA5 TRISA4 TRISA3 TRISA2 TRISA1 TRISA0 1111 1111 39,214
86h TRISB TRISB7 TRISB6 TRISB5 TRISB4 TRISB3 TRISB2 TRISB1 TRISB0 1111 1111 48,214
87h TRISC TRISC7 TRISC6 TRISC5 TRISC4 TRISC3 TRISC2 TRISC1 TRISC0 1111 1111 53,214
88h TRISD(3) TRISD7 TRISD6 TRISD5 TRISD4 TRISD3 TRISD2 TRISD1 TRISD0 1111 1111 57,214
89h TRISE — — — — TRISE3 TRISE2(3) TRISE1(3) TRISE0(3) ---- 1111 59,214
8Ah PCLATH — — — Write Buffer for the upper 5 bits of the Program Counter ---0 0000 37,213
8Bh INTCON GIE PEIE T0IE INTE RBIE T0IF INTF RBIF(1) 0000 000x 31,213
8Ch PIE1 — ADIE RCIE TXIE SSPIE CCP1IE TMR2IE TMR1IE -000 0000 32,214
8Dh PIE2 OSFIE C2IE C1IE EEIE BCLIE ULPWUIE — CCP2IE 0000 00-0 33,214
8Eh PCON — — ULPWUE SBOREN — — POR BOR --01 --qq 36,214
8Fh OSCCON — IRCF2 IRCF1 IRCF0 OSTS HTS LTS SCS -110 q000 62,214
90h OSCTUNE — — — TUN4 TUN3 TUN2 TUN1 TUN0 ---0 0000 66,214
91h SSPCON2 GCEN ACKSTAT ACKDT ACKEN RCEN PEN RSEN SEN 0000 0000 177,214
92h PR2 Timer2 Period Register 1111 1111 81,214
93h SSPADD(2) Synchronous Serial Port (I2C mode) Address Register 0000 0000 185,214
93h SSPMSK(2) MSK7 MSK6 MSK5 MSK4 MSK3 MSK2 MSK1 MSK0 1111 1111 204,214
94h SSPSTAT SMP CKE D/A P S R/W UA BF 0000 0000 185,214
95h WPUB WPUB7 WPUB6 WPUB5 WPUB4 WPUB3 WPUB2 WPUB1 WPUB0 1111 1111 49,214
96h IOCB IOCB7 IOCB6 IOCB5 IOCB4 IOCB3 IOCB2 IOCB1 IOCB0 0000 0000 49,214
97h VRCON VREN VROE VRR VRSS VR3 VR2 VR1 VR0 0000 0000 97,214
98h TXSTA CSRC TX9 TXEN SYNC SENDB BRGH TRMT TX9D 0000 0010 158,214
99h SPBRG BRG7 BRG6 BRG5 BRG4 BRG3 BRG2 BRG1 BRG0 0000 0000 161,214
9Ah SPBRGH BRG15 BRG14 BRG13 BRG12 BRG11 BRG10 BRG9 BRG8 0000 0000 161,214
9Bh PWM1CON PRSEN PDC6 PDC5 PDC4 PDC3 PDC2 PDC1 PDC0 0000 0000 144,214
9Ch ECCPAS ECCPASE ECCPAS2 ECCPAS1 ECCPAS0 PSSAC1 PSSAC0 PSSBD1 PSSBD0 0000 0000 141,214
9Dh PSTRCON — — — STRSYNC STRD STRC STRB STRA ---0 0001 145,214
9Eh ADRESL A/D Result Register Low Byte xxxx xxxx 99,214
9Fh ADCON1 ADFM — VCFG1 VCFG0 — — — — 0-00 ---- 105,214
Legend: – = Unimplemented locations read as ‘0’, u = unchanged, x = unknown, q = value depends on condition, shaded = unimplemented
Note 1: MCLR and WDT Reset do not affect the previous value data latch. The RBIF bit will be cleared upon Reset but will set again if the
mismatch exists.
2: Accessible only when SSPCON register bits SSPM<3:0> = 1001.
3: PIC16F884/PIC16F887 only.

© 2007 Microchip Technology Inc. Preliminary DS41291D-page 27


PIC16F882/883/884/886/887
TABLE 2-3: PIC16F882/883/884/886/887 SPECIAL FUNCTION REGISTERS SUMMARY BANK 2
Value on
Addr Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Page
POR, BOR

Bank 2
100h INDF Addressing this location uses contents of FSR to address data memory (not a physical register) xxxx xxxx 37,213
101h TMR0 Timer0 Module Register xxxx xxxx 73,213
102h PCL Program Counter’s (PC) Least Significant Byte 0000 0000 37,213
103h STATUS IRP RP1 RP0 TO PD Z DC C 0001 1xxx 29,213
104h FSR Indirect Data Memory Address Pointer xxxx xxxx 37,213
105h WDTCON — — — WDTPS3 WDTPS2 WDTPS1 WDTPS0 SWDTEN ---0 1000 221,214
106h PORTB RB7 RB6 RB5 RB4 RB3 RB2 RB1 RB0 xxxx xxxx 48,213
107h CM1CON0 C1ON C1OUT C1OE C1POL — C1R C1CH1 C1CH0 0000 -000 88,214
108h CM2CON0 C2ON C2OUT C2OE C2POL — C2R C2CH1 C2CH0 0000 -000 89,214
109h CM2CON1 MC1OUT MC2OUT C1RSEL C2RSEL — — T1GSS C2SYNC 0000 --10 91,215
10Ah PCLATH — — — Write Buffer for the upper 5 bits of the Program Counter ---0 0000 37,213
10Bh INTCON GIE PEIE T0IE INTE RBIE T0IF INTF RBIF(1) 0000 000x 31,213
10Ch EEDAT EEDAT7 EEDAT6 EEDAT5 EEDAT4 EEDAT3 EEDAT2 EEDAT1 EEDAT0 0000 0000 112,215

10Dh EEADR EEADR7 EEADR6 EEADR5 EEADR4 EEADR3 EEADR2 EEADR1 EEADR0 0000 0000 112,215

10Eh EEDATH — — EEDATH5 EEDATH4 EEDATH3 EEDATH2 EEDATH1 EEDATH0 --00 0000 112,215
10Fh EEADRH — — — EEADRH4(2) EEADRH3 EEADRH2 EEADRH1 EEADRH0 ---- 0000 112,215
Legend: – = Unimplemented locations read as ‘0’, u = unchanged, x = unknown, q = value depends on condition, shaded = unimplemented
Note 1: MCLR and WDT Reset does not affect the previous value data latch. The RBIF bit will be cleared upon Reset but will set again if the
mismatch exists.
2: PIC16F886/PIC16F887 only.

TABLE 2-4: PIC16F882/883/884/886/887 SPECIAL FUNCTION REGISTERS SUMMARY BANK 3


Value on
Addr Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Page
POR, BOR

Bank 3
180h INDF Addressing this location uses contents of FSR to address data memory (not a physical register) xxxx xxxx 37,213
181h OPTION_REG RBPU INTEDG T0CS T0SE PSA PS2 PS1 PS0 1111 1111 30,214
182h PCL Program Counter’s (PC) Least Significant Byte 0000 0000 37,213
183h STATUS IRP RP1 RP0 TO PD Z DC C 0001 1xxx 29,213
184h FSR Indirect Data Memory Address Pointer xxxx xxxx 37,213
185h SRCON SR1 SR0 C1SEN C2REN PULSS PULSR — FVREN 0000 00-0 93,215
186h TRISB TRISB7 TRISB6 TRISB5 TRISB4 TRISB3 TRISB2 TRISB1 TRISB0 1111 1111 48,214
187h BAUDCTL ABDOVF RCIDL — SCKP BRG16 — WUE ABDEN 01-0 0-00 160,215
188h ANSEL ANS7(2) ANS6(2) ANS5(2) ANS4 ANS3 ANS2 ANS1 ANS0 1111 1111 40,215
189h ANSELH — — ANS13 ANS12 ANS11 ANS10 ANS9 ANS8 --11 1111 99,215
18Ah PCLATH — — — Write Buffer for the upper 5 bits of the Program Counter ---0 0000 37,213
18Bh INTCON GIE PEIE T0IE INTE RBIE T0IF INTF RBIF(1) 0000 000x 31,213
18Ch EECON1 EEPGD — — — WRERR WREN WR RD x--- x000 113,215
18Dh EECON2 EEPROM Control Register 2 (not a physical register) ---- ---- 111,215
Legend: – = Unimplemented locations read as ‘0’, u = unchanged, x = unknown, q = value depends on condition, shaded = unimplemented
Note 1: MCLR and WDT Reset does not affect the previous value data latch. The RBIF bit will be cleared upon Reset but will set again if the
mismatch exists.
2: PIC16F884/PIC16F887 only.

DS41291D-page 28 Preliminary © 2007 Microchip Technology Inc.


PIC16F882/883/884/886/887
TABLE 15-2: PIC16F883/884/886/887 INSTRUCTION SET
Mnemonic, 14-Bit Opcode Status
Description Cycles Notes
Operands MSb LSb Affected

BYTE-ORIENTED FILE REGISTER OPERATIONS


ADDWF f, d Add W and f 1 00 0111 dfff ffff C, DC, Z 1, 2
ANDWF f, d AND W with f 1 00 0101 dfff ffff Z 1, 2
CLRF f Clear f 1 00 0001 lfff ffff Z 2
CLRW – Clear W 1 00 0001 0xxx xxxx Z
COMF f, d Complement f 1 00 1001 dfff ffff Z 1, 2
DECF f, d Decrement f 1 00 0011 dfff ffff Z 1, 2
DECFSZ f, d Decrement f, Skip if 0 1(2) 00 1011 dfff ffff 1, 2, 3
INCF f, d Increment f 1 00 1010 dfff ffff Z 1, 2
INCFSZ f, d Increment f, Skip if 0 1(2) 00 1111 dfff ffff 1, 2, 3
IORWF f, d Inclusive OR W with f 1 00 0100 dfff ffff Z 1, 2
MOVF f, d Move f 1 00 1000 dfff ffff Z 1, 2
MOVWF f Move W to f 1 00 0000 lfff ffff
NOP – No Operation 1 00 0000 0xx0 0000
RLF f, d Rotate Left f through Carry 1 00 1101 dfff ffff C 1, 2
RRF f, d Rotate Right f through Carry 1 00 1100 dfff ffff C 1, 2
SUBWF f, d Subtract W from f 1 00 0010 dfff ffff C, DC, Z 1, 2
SWAPF f, d Swap nibbles in f 1 00 1110 dfff ffff 1, 2
XORWF f, d Exclusive OR W with f 1 00 0110 dfff ffff Z 1, 2
BIT-ORIENTED FILE REGISTER OPERATIONS
BCF f, b Bit Clear f 1 01 00bb bfff ffff 1, 2
BSF f, b Bit Set f 1 01 01bb bfff ffff 1, 2
BTFSC f, b Bit Test f, Skip if Clear 1 (2) 01 10bb bfff ffff 3
BTFSS f, b Bit Test f, Skip if Set 1 (2) 01 11bb bfff ffff 3
LITERAL AND CONTROL OPERATIONS
ADDLW k Add literal and W 1 11 111x kkkk kkkk C, DC, Z
ANDLW k AND literal with W 1 11 1001 kkkk kkkk Z
CALL k Call Subroutine 2 10 0kkk kkkk kkkk
CLRWDT – Clear Watchdog Timer 1 00 0000 0110 0100 TO, PD
GOTO k Go to address 2 10 1kkk kkkk kkkk
IORLW k Inclusive OR literal with W 1 11 1000 kkkk kkkk Z
MOVLW k Move literal to W 1 11 00xx kkkk kkkk
RETFIE – Return from interrupt 2 00 0000 0000 1001
RETLW k Return with literal in W 2 11 01xx kkkk kkkk
RETURN – Return from Subroutine 2 00 0000 0000 1000
SLEEP – Go into Standby mode 1 00 0000 0110 0011 TO, PD
SUBLW k Subtract W from literal 1 11 110x kkkk kkkk C, DC, Z
XORLW k Exclusive OR literal with W 1 11 1010 kkkk kkkk Z
Note 1: When an I/O register is modified as a function of itself (e.g., MOVF GPIO, 1), the value used will be that value present
on the pins themselves. For example, if the data latch is ‘1’ for a pin configured as input and is driven low by an external
device, the data will be written back with a ‘0’.
2: If this instruction is executed on the TMR0 register (and where applicable, d = 1), the prescaler will be cleared if
assigned to the Timer0 module.
3: If the Program Counter (PC) is modified, or a conditional test is true, the instruction requires two cycles. The second
cycle is executed as a NOP.

DS41291D-page 226 Preliminary © 2007 Microchip Technology Inc.

You might also like