Re: problesm with PWM
2007-07-04 by kernels_nz
Hi Tom, Sorry, I am a C programmer, so wouldnt be much help with your assembly language, just a few things you definately want to check: 1. Have you defined the PWM pin as output ? I did a search through your code and didnt find a reference to the DDR register ? 2. Where did you set up timer 0 ? It looks like your using the output compare of timer0 to do the PWM. Maybe if you tell me the hex values you assign to the registers I can look through them and see what looks out of place / wrong. 3. The PWM works fine, everyone here has probably used it many times, it is almost certainly just a register set up incorrectly. Cheers Hein B Auckland, New Zealand. --- In AVR-Chat@yahoogroups.com, Thomas Keller <tjkeller1@...> wrote: > > > OK. I may not have communicated my problem very well with the post > that included my source code listing. The problem is almost certainly > somewhere in my setup of the PWM module. Everything else seems t be > working just fine (the interrupt based timing loop is interrupting, the > table lookup on each interrupt is occuring as it should and returning > the correct values, etc.) > So what I think I need is for someone knowledgeable with the PWM modules > to scan my code and see if they can tell me what I am doing wrong, as it
Show quoted textHide quoted text
> is almost 100% certain it is MY error, not a hardware issue. > > > thanks in advance, > > tom >