A robotic arm is controlled by several stepper motors.
Stepper motor (or step motor) is a brushless DC electric motor that divides a full rotation (360 degree) into a number of equal steps (10 degree/step in this case). The motor's position can then be commanded to move and hold at one of these steps without any feedback sensor (an open-loop controller). This motor usually has 4 wires. To move a motor, the following bit patterns should be applied to these 4 wires.
Clockwise rotation: 1100à0110à0011à1001 and these 4 patterns repeated again such as à1100à0110....
Counter clockwise rotation: 1100à1001à0011à0110à and these 4 patterns repeated again such as 1100à1001….
Each input pattern (for example 1100) moves motor 10 degree. Assume the first four bits (least Significant bits) of register R2 are connected to one these motors.
Write a program in LC-3 assembly language, to do the following:
If you type “1” motor moves 120 degree clockwise (sending 12 patterns) and then 90 degree counter clockwise (sending 9 patterns). If you type “2” motor moves 50 degree counter clockwise (sending 5 patterns).
Depends on what number you enter; the console should display all the related patterns sending to the motor.
Submit your program (asm file).
이게 과제 질문이고
요 아래것이 제 코드인데..
그리고 과제 조차도 교수새끼가 뭘 요구하는지 정확히 이해가 안됨 ㅠ