Say I have a DC motor which runs clockwise when current flows in one direction, and counter-clockwise when the current flow is reversed.
I have 2 lines going in my circuit, +5V and ground. I have a PIC, and two motors.
I want to be able to control the direction each of the motors spin without any mechanical relays.
Say pin RA0 is motor 1 forwards, RA1 is motor 1 backwards, RA2 is motor 2 forwards, and RA3 is motor 2 backwards.
What is a good way to accomplish this? Should I build an H-bridge out of transistors?