Question: Problem 2: (50%) (CLO2] a) For the schematic diagram shown in Figure 1, what binary pattern will be displayed on the LEDs (connected to pins
![Problem 2: (50%) (CLO2] a) For the schematic diagram shown in](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f39308c7e7b_92066f39308395a0.jpg)
Problem 2: (50%) (CLO2] a) For the schematic diagram shown in Figure 1, what binary pattern will be displayed on the LEDs (connected to pins 100-107) if the given Assembly language code is executed by the microcontroller? b) What will be the content of registers R20, R21, R24, and R25 at the end of program execution? c) For a 10MHz clock generator (crystal oscillator), find the amount of time in seconds taken by the microcontroller to execute the given assembly code. Number of machine cycles (MC) for each instruction is given in comments in the program. 101 ----------- PORADO PRONOPYCUNO PONTO 018 POVOCIA POINT 8100 FRONTE CHPOINTS POSITORONTO PRONOGRAPCINTO DROGAROTAX ON POSTNOCES POINTS POSSO POINTS 01 10 HORARIOCA POTER TOTAL POINTS BOTA PETOSTALPINTIL MA ODOS OS PCHDC POINTS FCRIADCROINTIPAR RCD POSADAS PONTES PORN OT 10 O 105 MO A QAD 100 Floure circuit diagram for Rroblem? 1. Assembly code for problem 2(a,b,c): .def DDRD - 0x2A .def PORTD - 0x2B start: ; MC ; 2 ; 1 1 OUTER: INNER: LDI R24, OxFF STS DDRD, R24 LDI R24, 5 LDI R25, LDI R20, 4 LDI R21, 3 DEC R20 DEC R21 BRNE INNER ADD R25, R24 STS PORTD, R25 DEC R20 BRNE OUTER - rest of the code 12/1 ; 2 ; 2/1 HERE: d) Comment each line of the code given below explaining the purpose of each command. What will be the behavior of the circuit in Figure 1 if the microcontroller executes the given Ccode. C code for problem 2(d): ( #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
