Starting from:

$24.99

Microprocessors Exercise Problems III Solution

Stepper Motor – A/D – Sensors
Design the hardware interface and write an 8086-assembly program for the following projects. The addresses of ports A, B and C of the 8255A PIA are 00 H , 04 H, 10 H and 14 H respectively. Assume that the forward voltage of a LED (VD) is 2½ V, and the required current (ID) is 6 mA.

1. Design the hardware interface and write an assembly program for an 8086 microprocessor-based digital voltmeter. The analog voltage is connected to the input of an 8-bit A/D converter (ADC 0804). The processor receives the converted digital voltage via PORT A, and displays the voltage value on two 7-segment units connected to PORT B and PORT C. If the voltage value exceeded 3 Volts, the program displays HH on the 7-segment units. Otherwise, it displays LL on the 7segment.
2. Using the 1 phase exciting method, design the hardware interface and write an 8086-assembly language program to control a 4 deg/step stepper motor. The motor is connected to the higher 4 bits of PORT B. Write the assembly language program that rotates the motor only two turns in any direction.
3. Using the 1-2 phase exciting method, design the hardware interface and write an 8086-assembly language program to control a 6 deg/step stepper motor. The motor is connected to the higher 4 bits of PORT C. Write the assembly language program that rotates the motor two turns in a direction and three turns in the opposite direction.
4. Using the 1-2 phase exciting method, design the hardware interface and write an 8086-assembly language program to control a 8 deg/step stepper motor. The motor is connected to the higher 4 bits of PORT C, and a switch is connected to
BIT 0 of PORT A. Write the assembly language program that controls the stepper motor according to the status of the switch. If the switch is pressed, the program rotates the motor in one direction, and if the switch is released, the program rotates the motor in the opposite direction.
5. Assuming that two stepper motors (12 deg/step) are connected to the microprocessor via two 8255A interface chips (one motor for each chip). Using the 2-phase exciting method, an 8086 assembly program is required to rotate the first motor two turns in a direction, then rotate the second motor three turns in the opposite direction.

2

More products