Documente Academic
Documente Profesional
Documente Cultură
1 Descripción General 11
Instrucciones de carga
Sintaxis Descripción Ciclos Código de 14 bits Banderas
CLRF f (f) = b’00000000’ 1 00 0001 1fff ffff Z
CLRW (W)= b’00000000’ 1 00 0001 1xxx xxxx Z
MOVF f,d (f)= (f) si d=1, (W)= (f) si d=0 1 00 1000 dfff ffff Z
MOVWF f (f)= (W) 1 00 0000 1fff ffff Z
MOVLW k (W)= k 1 00 00xx kkkk kkkk Z
Instrucciones aritméticas
Sintaxis Descripción Ciclos Código de 14 bits Banderas
ADDLW k (W)= (W)+k 1 11 111x kkkk kkkk C,DC,Z
ADDWF f,d (f)= (f)+(W) si d=1, (W)= (f)+(W) si d=0 1 00 0111 dfff ffff C,DC,Z
DECF f,d (f)= (f) -1 si d=1, (W)= (f) -1 si d=0 1 00 0011 dfff ffff Z
INCF f,d (f)= (f)+1 si d=1, (W)= (f)+1 si d=0 1 00 1010 dfff ffff Z
SUBLW k (W)= k -(W) 1 11 110x kkkk kkkk C,DC,Z
SUBWF f,d (f)= (f)-(W) si d=1, (W)= (f)-(W) si d=0 1 00 0010 dfff ffff C,DC,Z
Instrucciones de bits
Sintaxis Descripción Ciclos Código de 14 bits Banderas
BCF f,b (f)[b]=0, Pone bit b de (f) a 0 (0<=b<=7) 1 01 01bb bfff ffff —
BSF f,b (f)[b]=0, Pone bit b de (f) a 1 (0<=b<=7) 1 01 01bb bfff ffff —
Instrucciones de salto
Sintaxis Descripción Ciclos Código de 14 bits Banderas
BTFSC f,b Si bit (f)[b] es 0 → salta siguiente instrucción 1(2) 01 10bb bfff ffff —
BTFSS f,b Si bit (f)[b] es 1 → salta siguiente instrucción 1(2) 01 11bb bfff ffff —
DECFSZ f,d Si d=1 → (f) = (f) -1 y salta sig. instr. si (f)=0, 1(2) 00 1011 dfff ffff —
si d=0 → (W)= (f) -1 y salta sig. instr. si (W)=0
INCFSZ f,d Si d=1 → (f) = (f)+1 y salta sig. instr. si (f)=0, 1(2) 00 1111 dfff ffff —
si d=0 → (W)= (f)+1 y salta sig. instr. si (W)=0
GOTO k (PC)= k, Salto incondicional 2 10 1kkk kkkk kkkk —
Instrucciones especiales
Sintaxis Descripción Ciclos Código de 14 bits Banderas
CLRWDT Borra o refresca el Perro Guardián 1 00 0000 0110 0100 T O, P D
NOP No Opera. Deja pasar un ciclo de instrucción 1 00 0000 0xx0 0000 —
SLEEP Pasa al modo reposo (bajo consumo) 1 00 0000 0110 0011 T O, P D