Question: What is the WREG in PIC18 microcontrollers. Explain it role in arithmetic and logic operations. (3 marks) ii. Explain the operations of the following instructions

What is the WREG in PIC18 microcontrollers. Explain it role in arithmetic and logic operations. (3 marks) ii. Explain the operations of the following instructions (operation and the destination) i. ANDWF I. MOVF H. DECF (3 marks) iii. Analyse the following assembly code segment. State the values of WREG and corresponding file registers after the execution of each instruction. (5 marks) MOVLWO MOVWF 12H MOVLW 22H ADDWF 12H, W ADDWF 12H, f SUBWF 10H, f iv. How the flag bits of STATUS register are used in branching instructions? (2 marks) AND) V. A switch is connected to PORTB pin 1. Write a prograrn to check the status of the switch and perform the following. (BSF, BTFSS, BRA are some of the instruction you can use) i. If switch = 0, send letter 'N' to PORTC (ASCII value of the character) i. If switch = 1, send letter 'Y' to PORTC (ASCII value of the character) (12 marks) o
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
