Question: Introduction: Let's say you want to write code for a robotic arm controller. The controller has one motor for each of the five fingers (

Introduction: Let's say you want to write code for a robotic arm controller. The controller has one motor for each of the five fingers (pinky = finger 0...thumb = finger 4, in order). The hardware will use a scheme known as memory-mapped I/O, such that the hardware intercepts accesses to memory locations and interprets them as hardware device signals rather than RAM accesses (and therefore don't correspond to reads or writes in memory, which are irrelevant here). The API for the arm would, minimally, satisfy the following conditions...
1. Write the integer 0 to the memory location 0xFFEE5678, which would close all fingers completely. Every time this occurs, the program should wait for the 7th of memory location 0xFFEE5678 to become 1(aka 'setting' that bit) before proceeding, as a way of indicating that the robot arm has initialized all motors and is now ready to receive instructions.
2. Set bit number k (0<= k <=4) of memory location 0xFFEE567C to open finger k by 0.01 radians.
3. Set bit number k +5(0<= k <=4) of memory location 0xFFEE567C to close finger k by 0.01 radians.
Successive openings of the same finger would be separated by 2 milliseconds to avoid motor slippage.
____________________________________________________________________________________________________
TASK PROMPT: Draw a CFG and write a program in MIPS assembly language which...
1. Opens the index finger completely (3.14 radians).
2. Opens the thumb exactly halfway WHILE closing the index finger also exactly halfway. Should be done in an interspersed manner, aka the thumb will open by 0.01 radians, then the index finger will close by 0.01 radians, then the thumb will open by some amount, then the index finger will close by the same amount, etc.
- Write 'delay n' as an imaginary instruction to indicate a delay of n microseconds.
- For the MIPS program, use only instructions add, sub, addi, sw, lw, and li.

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 Databases Questions!