question archive Micro-Controller Design Systems - MCD2601 Assignment two 11 March 2021 Question one 1
Subject:Computer SciencePrice: Bought3
Micro-Controller Design Systems - MCD2601
Assignment two
11 March 2021
Question one
1. Analyse the following C-code and give the content of the variable result in hex notation:
unsigned int Value = 0x12;
unsigned char Number = 0x34;
unsigned int Result = 0;
Value = Value << 8;
Value = Value | Number;
Result = ((Result + Value) & 0xA4D0);
2. Calculate the execution time of the following code (Fosc = 12 MHz):
MOV A,#0x07
MOV B,#0x50
MUL AB
SWAP A
3. Analyse the following assembly code and give the content of register B in hex format:
MOV B,#0x37
MOV 0x30,#0x03
MOV A,B
Loop: RL A
DJNZ 0x30,Loop
MOV B,A
4. 127 bytes asynchronous data isserially transmitted at a rate of 19200 Baud. Howmuch transmission
time is needed by the 8051 microcontroller to complete the task? No parity is used.
5. Analyse the following C-code and give the content of the variable result:
unsigned char Val_1 = 56;
float Val_2 = 3.281;
unsigned int Result;
Result = Val_1 * Val_2;