shaiqbashir, It may be a bit complex so here is the jistofit, I pulled every thing out but the important stuff. The variables SPD and DIR are 14 bit inputs from say a joy stick corresponding to Y and X. With two H bridge circuits you can make a tank type device and operate it with 1 joystick. Pressing it forward to move forward and pulling it in reverse to travel in reverse. Naturally moving it left or right will the device turn left or right. The null position for the variables is 511 for no output from the H bridge.
This code was originally written for a 16F876 but updated for 18F252.
I'm sorry I can't give you more but that's business........ HTH....
Dave Purola,
N8NTA
Bookmarks