Beruflich Dokumente
Kultur Dokumente
I Semester 2019-2020
EEE G512
Embedded System Design
Mid Semester Examination (Closed Book)
Time: 1hr. 30 min. Date: 30-09-2019 MM: 60
3. Fill the blanks in the following program to generate a square wave of frequency 20 KHz at port P1, if the signal of
frequency 40 KHz is applied at INT1 pin of 8051. [5]
ORG 0000H
LJMP MAIN
ORG 0030H
MAIN: ---------------------------
---------------------------
HERE: SJMP HERE
END
ISR:
------------------------
------------------------
------------------------
------------------------
3. Write the correct chronological order for the generation of 2 kHz square wave frequency in an 8051?
[3]
1. MOV TMOD, #00000010B 4. SETB TR0
2. MOV TL0, #06H 5. CPL P1.0
3. MOV TH0, #06H 6. ORG 0000H
Ans:_____ 6, 1, 3, 2, 4, 5_______
4. What are the contents of R0 and the value at location pointed to by R0? [2]
MOV 45, #4FH
MOV R0, 45H
INC R0
MOV @R0, #30H
ANS:
5. Using only two instructions, add a 64-bit integer contained in R2 and R3 to another 64-bit integer contained in R0
and R1, and place the result in R4 and R5. [2]
6. Assume that the starting location is 0x00000020, indicate the memory locations along with the contents clearly till
the valid known data is present [5]
DATA DCW 0x44
ALIGN 4
DCW 0x33
ALIGN 2
DCD 0x12345678
DCB 0xFF
ANS:
8. Give two equivalent instructions of implementing Empty Descending stack in ARM by showing PUSH and POP
operations for data of size 256 bytes. Clearly mention the data and the memory used in a neat diagram.
[4]
ANS:
9. Convert the following pseudo code into ARM Assembly code by clearly writing the comments. [3]
int R1 = -20;
int R2 = -30;
while (R2<=0)
{
R1- = R2;
R1+=1;
}
**********************************************