Frequency Range w/ 8051 pwm outputs

Oct 30, 2003 2 Replies

I'm new to the 8051 family and am using the pwm0 output to get sound from my development board. As I understand it I can load the prescaler with a value between 0 and 255 to get different frequencies out of it. With an 11.059 MHz crystal, my range (as I calculate it) is around 90Hz - 30kHz in 255 steps. Can anyone explain how I can get a finer range out of it, say 1000-2000 Hz, or 5000-10000 Hz?



Thanks!



With that hardware you don't. You gets what you pays for.

8051 internal timers are not for fine-resolution frequency generation. For more suitable things, see e.g. Analog Devices AD9830 and AD9850 series chips.

Tauno Voipio tauno voipio @ iki fi

"Jacob Burnetski" schreef in bericht news: snipped-for-privacy@4ax.com...

No, you're stuck with that. You could try a very fast counter/interrupt occuring each 100uS or faster and put a 16 bit faseaccumulator in that interrupt. Or use a programmable clockoscillator and play with that, but that is a silly idea.

Thanks, Frank Bemelman (remove 'x' & .invalid when sending email)

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required