1 les microcontrôleurs pic de microchip le 16f84


14

I.17.6 Le jeu d’instructions

INSTRUCTIONS OPERANT SUR REGISTRE (direct) indicateurs Cycles

ADDWF F,d W+F {W,F ? d} C,DC,Z 1

ANDWF F,d W and F {W,F ? d} Z 1

CLRF F Clear F Z 1

CLRW Clear W Z 1

CLRWDT Clear Watchdoc timer TO’, PD’ 1

COMF F,d Complémente F {W,F ? d} Z 1

DECF F,d décrémente F {W,F ? d} Z 1

DECFSZ F,d décrémente F {W,F ? d} skip if 0 1(2)

INCF F,d incrémente F {W,F ? d} Z 1

INCFSZ F,d incrémente F {W,F ? d} skip if 0 1(2)

IORWF F,d W or F {W,F ? d} Z 1

MOVF F,d F {W,F ? d} Z 1

MOVWF F W F 1

RLF F,d rotation à gauche de F a travers C {W,F ? d} C 1

RRF F,d rotation à droite de F a travers C {W,F ? d} 1

SUBWF F,d F – W {W,F ? d} C,DC,Z 1

SWAPF F,d permute les 2 quartets de F {W,F ? d} 1

XORWF F,d W xor F {W,F ? d} Z 1

INSTRUCTIONS OPERANT SUR BIT BCF F,b RAZ du bit b du registre F 1

BSF F,b RAU du bit b du registre F 1

BTFSC F,b teste le bit b de F, si 0 saute une instruction 1(2)

BTFSS F,b teste le bit b de F, si 1 saute une instruction 1(2)

INSTRUCTIONS OPERANT SUR DONNEE (Immediat) ADDLW K W + K W C,DC,Z 1

ANDLW K W and K W Z 1

IORLW K W or K W Z 1

MOVLW K K W 1

SUBLW K K – W W C,DC,Z 1

XORLW K W xor K W Z 1

INSTRUCTIONS GENERALES CALL L Branchement à un sous programme de label L 2

GOTO L branchement à la ligne de label L 2

NOP No operation 1

RETURN retourne d’un sous programme 2

RETFIE Retour d’interruption 2

RETLW K retourne d’un sous programme avec K dans W 2

SLEEP se met en mode standby TO’, PD’ 1

{W,F ? d} signifie que le résultat va soit dans W si d=0 ou w, soit dans F si d= 1 ou f I.17.7 Etat de quelque registre à l’initialisation

STATUS IRP RP1 RP0 TO PD Z DC C 000x xxxx TRISA – – -1 1111

OPTION_REG RBPU INTEDG TOCS TOSE PSA PS2 PS1 PS0 1111 1111 TRISB 1111 1111

INTCON GIE EEIE T0IF INTE RBIE T0IF INTF RBIF 0000 000x PORTA – – -x xxxx

EECON1 – – – EEIF WRERR WREN WR RD – – -0 x000 PORTB xxxx xxxx

Laisser un commentaire