Assume the clock frequency is 9 MHz, calculate the total delay when the instruction CALL DELAY_ME is executed.
[17, 20, 25, 33, 35]
DELAY_ME: LDI R21,25 ; 1 clock cycle
LOOP_D2: RCALL DELAY0 ;
RCALL DELAY0 ;
RCALL DELAY0 ;
NOP ; 1 clock cycle
DEC R21 ; 1 clock cycle
BRNE LOOP_D2 ; 1/2 clock cycle(s)
LDI R17,5 ; 1 clock cycle
EXTRA_D2: DEC R17 ; 1 clock cycle
BRNE EXTRA_D2 ; 1/2 clock cycle(s)
NOP ; 1 clock cycle
NOP ; 1 clock cycle
RET
DELAY0: LDI R20,73 ; 1 clock cycle
OUTER_D1: LDI R16,72 ; 1 clock cycle
INNER_D1: DEC R16 ; 1 clock cycle
BRNE INNER_D1 ; 1 or 2 clock cycles
DEC R20 ; 1 clock cycle
BRNE OUTER_D1 ; 1 or 2 clock cycles
NOP ; 1 clock cycle
NOP ; 1 clock cycle
NOP ; 1 clock cycle
RET ; 4 clock cycles
The total delay in milliseconds is
Assume the clock frequency is 9 MHz, calculate the total delay when the instruction CALL DELAY_ME...
Figure 1: each block gives the number of different types of instructionsConsider a program with the execution flow shown in Figure 1. There are in total 3 types of instructions used in this program: Type 1 (in-processor calculation): execution rate as 1 per clock cycle; Type 2 (memory access): each instruction takes 2 clock cycles for execution; Type 3 (loop control): each instruction takes 2 clock cycles for jump into the loop block or 3 clock cycles for jump to the block after...
Problem 9: (10 Points) Find out the total time delay of the following code's execution: (The instruction cycle is 4 of the oscillator cycle, and assume the CPU is running on 40MHz crystal and TMP1 and TMP2 are user defined DM address) MOVLW MOVWF MOVLW MOVWF NOP NOP DECFSZ GOTO NOP NOP DECF BTFSS GOTO OXEE TMP2 OXAA TMP1 LOOP2 LOOP1 TMP1,F LOOP TMP2,F STATUS,Z LOOP2 Problem 9: (10 Points) Find out the total time delay of the following code's...
Consider the following assembly language code. The clock frequency is 4 MHz- and all initialization steps have been done correctly (like setting up digital I/O, the oscillator configuration, etc.) Constants Bit Pattern EQU H'20' LoopCtr EQU H'21' Max Count EQU .23; Main program loop MainLoop CLRF BitPattern CALL Output BSF BitPattern, 1 CALL Output RRF BitPattern CALL Output BSF BitPattern, 1 CALL Output GOTO MainLoop Output MOVF BitPattern, W MOVWF PORTB MOVLW MaxCount MOVWF LoopCtr Loop NOP DECFSZ LoopCtr GOTO...
Assume the memory display of the HCS12 shows 16 bytes starting at S0800 as follows SOBO0 80 53 05 28 36 89 00 FF FE 80 91 3E 77 AB 8F 7F Cavt the results of the following instructions SP S0805 pula A ?, SP SP S08OAL pula pshb A 7, SP -? SP S0805 pula A ? pulb B Idaa $O803 Idab $0804 aba A 7,8- SP $0805 psha pshb SP 7 Idx S0800 idab $0807 leax B.X X...
1. When it comes to financial matters, the views of Aristotle can be stated as: a. usury is nature’s way of helping each other. b. the fact that money is barren makes it the ideal medium of exchange. c. charging interest is immoral because money is not productive. d. when you lend money, it grows more money. e. interest is too high if it can’t be paid back. 2. Since 2008, when the monetary base was about $800 billion,...