PWM code for controlling DC Motor

Thread Starter

bathini

Joined Jan 25, 2009
8
Good Friends

I am a newbie and I am trying to emulate a 4 bit PWM to a DC Motor control. I have built the circuit, and using the square wave generator I am able to vary the pulse and the motor spins slow and fast. I am planning first to emulate the PWM on a free software, maybe mplab and then make the necessary build by connecting between the 4 bit to microcontroller to H-Bridge motor. Does anyone have a code I can learn to do this?Most preferably assembler.

Later I want to change this to 5 bit so that I can have an extra bit for direction control of the motor.

The circuit I have built is attached below



Jacks
 

Attachments

Top