May 10, 2010
I am using the LMR Mr. Basic robot chassie and motors.
I have now tried to write a program using aseambler code. It is for a PIC16F876A IC. My program involve the use of the A/D converter, and the PWM (Both PWM outputs) I want my robot to be able to slow down when its IR sensor (sharp) detects someting at about 20cm away from it. And i want it to stop when someting is about 10cm away form it, and then drive in reverse.
(Later i want it to be able to turn, but will have to wait)
Here is my problem, it all worked when i triede it induvidual, but when i put it all together, it wont work. Well if i try and turn my robot ON and OFF maybe 10-20 times, i might be lucky to get either the 2left wheels or the 2right wheels to move. It might be my PWM that is not set correct, but if it is, then i am not sure what i have done wrong. Hope that you can help me.
Please be free if you got any comment about how i can improve my code.