On a breadboard I set up the schema given here:http://www.societyofrobots.com/member_tutorials/node/164
but I used L293B instead to have 1A current for my motors (12vDC, 5W, upt to 1A).
I use a PIC 16F877A, and I connected the pwm lines to its 16 and 17 pins, as usual. Then I used this sample program:http://shibuvarkala.blogspot.com/2009/02/pulse-width-modulation-or-pwm-tutorial.html
to start trying. I was expecting for the motor to start, turning faster and then slower. It didn't! Motors started to work only with their highest speed, even though the test program was sending pwm varying from 0 to 255! Then I rechecked, but everything was correct. I then took out my PIC, and managed a different circuit on another breadboard with only a transistor, having it's base connected to 17th pin, i.e. pwm, and collector to the motor. when I switched it on, it worked well! motor goes faster, and then slower to stop, showing pwm working. What could be the reason of the main circuit not working? could it be of the sort of freq. setting?