Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started