Question: Embedded system is a combination of computer hardware and programmable software which is specifically designed for a particular task. It involves hardware such as

Embedded system is a combination of computer hardware and programmable software which is specifically designed for a particular task. It involves hardware such as microcontroller and software such as the code written in assembly language or high level language programming. Microcontroller cannot be functioned without a code in it. One of the important parts in making an embedded system is loading the software/program we develop into the microcontroller. Usually it is called "burning program" into the controller. Before "burning a program" into a controller, we must do certain prerequisite operations with the program. This includes writing the program in assembly language or C language in a text editor, compiling the program in a compiler and finally generating the hex file from the compiled program. Then, this hex file will be loaded into the controller to perform a particular task. The following figure shows the code of assembly language for 8051 microcontroller that have been compiled to generate the hex file. However, due to the few errors, the hex file cannot be generated. As an engineer, you have been asked to troubleshoot the problem and required to achieve FOUR (4) objectives as follows: 1. to rewrite the correct assembly code for the compiler to be able to generate hex file, 2. to measure the approximate time delay for assembly program if the crystal frequency is 11.0592 MHz, 3. to generate the C programming code which have similarity function with assembly code by using appropriate timer register, 4. to construct a suitable circuit diagram that align with the C programming code. MAIN: MSDELAY1: HERE 1 HERE 2 HERE 3 Assembly code ORG OH MOV PO, #550 MOV P1, MOV P2, MOV R5, # 550 #550 #250 ACALL MS DELAY MOV PO, #ADH #ADH MOV P1, MOV P2, #ADH MOV R5, #250 ACALL MSDELAY SJMP MAIN -Time delay----- MOV R4, #35 MOV R4, #79 DJNZ R3, HERE 3 DJNZ R4, HERE 2 DJNZ R5, HERE 3 RET END MAIN
Step by Step Solution
3.46 Rating (166 Votes )
There are 3 Steps involved in it
1 Rewriting the Correct Assembly Code for the Compiler to Generate Hex File The assembly code above contains several errors that must be corrected in ... View full answer
Get step-by-step solutions from verified subject matter experts
