Question: [ 1 5 M ] Consider the scenario where four stepper motors drive the wheels of a Mars Rover. Assume that each wheel has a

[15M] Consider the scenario where four stepper motors drive the wheels of a Mars Rover. Assume that each
wheel has a radius of 3 meters and all the stepper motors have a 1.8 degrees stepping angle when used in
full-step model of operation. Since all wheels are to move synchronously, all four stepper motors receive the
same excitation sequence from Port A of 8255. All unused ports are declared to be output ports and 8255 is
to be used in Mode 0. Consider the following code executed by 8086 to carry out the above task. Answer
the following questions in the given box ONLY. Note that the circumference of a circle having radius r is
C=2r. Assume that a sub-routine named "DELAY" is available to generate the required delay.
.MODEL SMALL
.DATA
FORWARD DB ?
BACKWARD DB ?
.CODE
.STARTUP
CR EQU 0C6H ; Port address of Control Register
PA EQU OCOH ; Port address of Port A
MOV AL, CW
OUT CR, AL
MOV CX,N,;N is immediate data
MOV FORWARD, N1;N1 is immediate data
MOV BACKWARD, N2;N2 is immediate data
MOV AL,88H
AGAIN:
MOV BL, FORWARD
UP1:
ROR AL,1
OUT PA, AL
CALL DELAY
DEC BL
JNZ UP1
MOV BL, BACKWARD
UP2:
ROL AL,1
OUT PA, AL
CALL DELAY
DEC BL
JNZ UP2
LOOP AGAIN
.EXIT
END
a.[3M] What should be the value of "CW"'(in
Hexadecimal number system) given in the code
for intended operation of the system, as
described?
CW=
b.[4M] Suppose N1=5 and N2=4 in the given
code. What is the value of N(in decimal number
system) such that the Mars Rover traverses a
distance of 30 meters in the forward direction
before halting?
N=
c.3M For the Mars Rover to traverse in the
backward direction, how should N1 and N2 be
related to each other? Provide the inequality.
d.5M For the Mars Rover to traverse a distance of
30 meters in the backward direction before
coming to a halt, what equation (in terms of N1
and N2) should be satisfied? Given N=500.
[ 1 5 M ] Consider the scenario where four

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!