We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi can anybody help me to clearly understand the generation of PWM in lpc2148 to control the servo motor ?
Thanks
I can see that you haven't bothered to debug your code. If you had, you would have noticed how many of your instructions that actually gets processed in that while loop.
By the way - you sure that would be a good place for a while loop, even if you did have braces?
Yes i didn't debug the code. and i don't know to change the duty cycle of the pwm. i don't to set the exact value to PWMMR0,PWMMR1 and PWMMR2 match registers. help me how to do that.
Why? What have _you_ done, to help yourself?
Don't you think programming is a task _you_ should do? Else, it's much better to buy the service from someone else.
You just have to spend some own time on problems before you can expect people to help you when you are stuck. But you don't try. You go directly for "help" on a forum. "Programming-by-forum" isn't a good method to get somewhere. It is very slow. And making you very dependant.
Start debugging - that's what the debugger was invented for. And do read the documentation for the processor - it was specifically written to tell how to what the processor can do. And how you do it.