hlxldb

基于PIC16F877A的操纵杆控制的直流电机(三)

0
阅读(2452)

 

Step 4The Code

fter everything is connected, make sure the supply for PIC is 5V, for my case, supply for the H-Bridge is 15V and the ground of both must have the same GND.

Now my code is very simple. It recive the Voltage from the Joystick that works igual a potentiometer, and calculate PWM duty and the direction of the rotation of the motor.

Donwload the PDF or the TXT file.

code.pdf2 MB

code.txt3 KB

 

 

Step 5Conclusion

Conclusion

This is the video demostrantion of the project working, its hard to see but belive me, if every thing is correct the motor will rotate to both directions.

http://www.youtube.com/watch?v=GIPJ-SR7aXI