Tutorial 2
Tutorial 2
1.1 1.2
List out the group of PIC16F84 instruction set. What is the content of register W after the PIC16F84 executes the following instructions? Assume that W contains FF before each instruction executes. (a) MOVWF 0F (c) MOVLW d200 (b) MOVF (d) MOVF 45, W b10001100, W
1.3
What is the content of working register and file register location in 0Dh after PIC16F84 executes the following instructions? Assume that W and F are containing 2D and 34 respectively before each instruction executes. (a) ADDWF (c) ADDWF (e) SUBWF (g) IORWF (i) CLRW (k) SWAPF (m) RLF 0D 0D, F 0D 0D 0D 0D 0D (Assume C = 0) (b) (d) (f) (h) (j) (l) (n) ADDLW SUBLW ANDWF XORLW DECF RRF BTFSC 50 40 0D, W AA 0D 0D (Assume C = 1) 0D, 04
1.6.
What is the content of working register, W after the PIC16F84 executes the following subroutine? Assume W = 05, File Register 1Ch = 11, 1Dh = CA, and 1Eh = 55 before the PIC16F84 executes that subroutine. MOVLW ADDWF MOVLW IORWF MOVWF MOVWF INCF MOVWF RETURN 80 1C 40 1C 1C, W 1D 1D 1D, W