HW6
P2
2. A stepper motor is connected with the 8086-microprocessor system using the 8255 programmable peripheral interfacing IC. The four phases of the motor are connected to Port-A as shown in figure 2. Two control switches are connected to Port-C. The control on the motor should be done as follows:
PC1
PC0
Motor Operation
0 0 1 1
0 1 0 1
Off
1-phase Full-step mode 2-phase Full-step mode Half-step mode
(a) Find the addresses of the ports and control register
(b) Find the control word
(c) Write an assembly language program to perform the job as mentioned
Vcc
PA0 PA1 PA2 PA3
IORD
R MM MA
RD
Stepper Motor
TOWR
WR
D0-D7
8255 PPI
A0 A1 A2
PC0 PC1
CS
5V
A15 A14 A13 A11 A0
Fig. 2: Stepper Motor interfaced with 8255