Ok the only problem is now if I switch it one way and then switch it to the middle the motor still goes because I guess the command is still being sent to the motor driving circuit. There is however a _break pin you can control. See attached image. Other than how its wired from the diagram mister_e posted the ground that comes off my chip goes to the switch and then to PIN 12. This drives it low and disables the H-Bridge on circuit. The problem when the switch is turned left or right for forward and reverse movement nothing happens because _break is still being driven low. I can't think how I can make it high when the switch is left or right. Maybe instead of connecting the pin to the ground, connect it to another portb pin and when its switch left make that pin high but i don't think to 5 volt supplies will work on a switch :P again I am no electrical engineer but am trying my hardest. Any help is apreciated. Please check out the picture I basically want to do that with the break switch but only when the SPDT switch is in the middle. When its to the left and right have _break go back high.
Bookmarks