Microprocesadores
Enviado por rideca • 6 de Febrero de 2014 • 315 Palabras (2 Páginas) • 174 Visitas
SET DE INSTRUCCIONES RISC PARA MICROCONTROLADORES PIC MIDRANGE
Existen un total de 35 instrucciones. Todas las instrucciones son palabras de 14 bits, divididas en dos partes: el código
de operación y el operando. Los operandos, pueden ser bytes o bits de memoria o registros. De esta forma se puede hablar de
instrucciones “orientadas a bytes” u “orientadas a bits”.
Todas las instrucciones, con excepción de las que modifican el contenido del contador del programa (como son los
saltos y llamados a subrutina) se ejecutan en un ciclo de instrucción, es decir, 4 ciclos de reloj. Para un sistema funcionando a 4 Mhz,
cada instrucción se ejecuta en 1 microsegundo. Si la instrucción modifica el contenido del contador del programa, entonces el tiempo
de ejecución es de 2 ciclos de instrucción ó 2 microsegundos para el ejemplo a 4 Mhz. El grupo de 35 instrucciones es el siguiente:
MOVE GROUP
movf f,d move f
movwf f move w to f
movlw k move literal to w
clrf f clear f
clrw clear w
swapf f,d swap nibbles in f
ARITHMETIC GROUP
addwf f,d add w and f
addlw k add literal to w
subwf f,d substract w from f
sublw k substract w from literal
incf f,d increment f
incfsz f,d increment f, skip if 0
decf f,d decrement f
decfsz f,d decrement f, skip if 0
LOGIC GROUP
andwf f,d and w and f
andlw k and literal to w
iorwf f,d inclusive or w and f
iorlw k inclusive or literal to w
xorwf f,d exclusive or w and f
xorlw k exclusive or literal to w
comf f,d complement f
rlf f,d rotate left f, through carry
rrf f,d rotate right f, through carry
BIT GROUP
bcf f,b bit clear in f
bsf f,b bit set in f
btfsc f,b bit test in f, skip if clear
btfss f,b bit test in f, skip if set
CONTROL GROUP
clrwdt clear watchdog timer
sleep go into sleep mode
nop no operation
BRANCH GROUP
goto k goto address
call k call soubrutine
return return from subrutine
retlw k return with literal in w
retfie return from interrupt
incfsz f,d increment f, skip if 0
...