Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Using the microprocessor simulator, open the program 99Step.asm . Step throug

ID: 639889 • Letter: 1

Question

1. Using the microprocessor simulator, open the program 99Step.asm. Step through its execution to understand its current operation. Explain the operation of the program in detail.

2. Using bit operations, write a program to spin the stepper motor using a) full stepping and b) half stepping.

3. Simulate/Run the full stepping and half stepping individually. To run the code remember to add delays for each activation of the magnets. (may not be needed for stepping through the code)

4. Validate your design for the expected results and troubleshoot the code if any errors. Explain the steps you took to validate your design. Explain any errors you had and how you determined the errors and fixed them. Take a screenshot of the modified assembly code for full stepping and half stepping mode. Add some screenshots for step by step execution of the code (show the motor in several different positions as the program is stepped through).

Explanation / Answer

1)


The simulator consists of a central processing unit (CPU), 256 bytes of random access memory (RAM) and 16 input output (IO) ports. Only five are used. There is a hardware timer that triggers interrupt 02 at regular time intervals that you can pre-set using the configuration tab.

{bmc bm1.BMP}

The simulator is programmable in that you can run many different programs. In real life, the RAM would be replaced by read only memory (ROM) and the system would only ever run one program hard wired into the ROM. There are hundreds of examples of systems like this controlling traffic lights, CD players, simple games consoles, many children's games, TV remote controls, microwave oven timers, clock radios, car engine management systems, central heating controllers, environmental control systems and the list goes on.


The Central Processing Unit

The central processing unit is the "brain" of the computer. All calculations, decisions and data moves are made here. The CPU has storage locations called registers. It has an arithmetic and logic unit (ALU) where the processing is done. Data is taken from the registers, processed and results go back into the registers. Move (MOV) commands are used to transfer data between RAM locations and the registers. There are many instructions, each with a specific purpose. This collection is called the instruction set.
#K
#K
#K
#KGeneral Purpose Registers

The CPU has four general-purpose registers called AL, BL, CL and DL. These are eight bits or one byte wide. Registers can hold unsigned numbers in the range 0 to +255 and signed numbers in the range