changing PWM frequency?

Hi..

Can anyone please tell me the frequencies of different PWM pins in Arduino UNO?

How can I change them?

I need a frequency of 100kHz, is this possible?

Awaiting your reply.

Thanks Emmanuel

Here we go again. Start by telling us why you want 100KHz!

Mark

If you use 100 kHz PWM on a 16 MHz processor you will only have 160 levels of PWM. Is that OK?

Read the ATmega328P datasheet for how to configure a timer for PWM output. Each of the timers has two PWM output pins. In this case it doesn't matter if you use a 16-bit time (Timer1) or 8-bit timer (Timer2).

Hi Mark!

Thanks for your reply.

the 100khz freq, is required as switching freq, for a bidirectional dc-dc boost buck converter, this as per design, which i can change, ....maybe to 30kHz? are there any advantages..as far as programming on arduino is concerned...because my inductor size will increase ...but thats ok..

Emmanuel

hi johnwasser!

... "If you use 100 kHz PWM on a 16 MHz processor you will only have 160 levels of PWM. Is that OK?".....could you please give a little more detail on the above line?..im new to arduino......what is meant by 160 levels???

Thanks Emmanuel

do you have a code for changing the freq. to 30kHz?