This paper proposes design of a microprocessor-based controller for motion control of an n-degree of freedom robotics manipulator. Since the manipulator motion control problem is the problem of finding appropriate torques that will drive the actuators in order for the manipulator to follow a pre-specified trajectory. A microprocessor-based controller is designed to generate these torques based on two controllers.The first controller is an embedded controller while the other is the optimal preview controller. Since the manipulator speed is limited by the mechanical constraints of the robot arm, system’s throughput should be optimized for generation of the required control law based on the data received from robot’s position sensors.The Mohseni’s Proposed Algorithm, MPA, has been incorporated into the embedded controller to reduce the computational efforts and to obtain a “close-to-optimal” control law.In the optimal preview controller the optimal problem is solved at an arbitrary operating point of a pre-specified optimal trajectory. In this controller, the end effector’s velocity of the manipulator is monitored in a servo loop with integral action to compensate for inaccuracies in the structure and to attain zero steady state tracking error.In addition, the position and velocity of each joint are compelled to track their nominal values through state feedback loop to compensate for the system complexity and nonlinearly. The two controllers are implemented to control the motion of a two-degrees of freedom planar manipulator.Extensive digital computer simulation results are made to demonstrate the tracking ability of the two controllers. Comparison between the performance of the embedded controller and optimal preview controller is also illustrated.