PDA

View Full Version : 16F84A used with SN75410NE



MrRoboto
- 12th January 2009, 03:38
I am trying to make the micro move tow motors forward in a test until they get an input from a switch that gets pulled HIGH, and then I want it to reverse one motor, can anyone offer some simple code that I can compare to what I am doing, because I am stuck, I can get them to move and back up to one switch using the Button command but I want to have two switches essentially do the same thing and the button command wont work when i Do it twice, so I assume I need to change to a if else loop and if switch 1 or 2 =High, reverse motor one and stop motor 2, else forward motor 1 and 2, but the code I use for this logic doesnt work?? Can someone help please.

MrRoboto
- 28th January 2009, 23:11
Does anyone use the BUTTON command for an input?

aratti
- 29th January 2009, 11:39
For the simple application you have requested in post # 1, it is better using a pic with two pwm channels, in order to control also the speed of your dc motors. Pic16F84A has not pwm capability.

Al.