I have built a 5 DOF robot using 5 motors- 2 DC motors and 3 stepper motors. The motors are controlled by a PIC16F877A. The PIC16F877A is linked to my computer via a MAX 232 to serial port to USB port.

Because the microcontroller outputs 5V logic which is insufficient to power the motors, 4 L298s are used to switch the 5V to 12V coming from the power supply.

Inspite of all these connections, the electronic circuit is still not outputting right.