Software > Software




I was wondering if anyone could help me.Im using the 8051 microcontroller and programming it in C using keil compiler i was wonderin if anyone could tell me how to give PWM to my motors and something about timers and flags in C a sample code with details in it would be great.

This is how you control motors:

If your motor is small enough, you can also get a motor driver IC. It does not require you to PWM it.

To PWM, all you do is this:

bring a digital port high
wait 1 milisecond (or whatever time)
bring a digital port low
wait 1 milisecond (or whatever time)

Chances are you have sample code to turn on/off an LED? Its exactly the same code, just the loop goes really really fast.

Hey dude,

hows you ?

What exactly is the application of your robo.

I'm into making of a demining robo and i feel we could help each other.

what say ?

if you think so do contact me on :  [email protected]



These are good books from my lecturer:

However, this is a better one:

Also check

I generally tend to use the AT89S53 breed of 8051

PWM is also very simple, as outlined above.


[0] Message Index

Go to full version