D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] OT: Arduino PCM

 

I see from the documentation that you can send a value to a pin and have it pcm the value - does anyone know what the clock speed of the pcm is. If its less than 200khz I think I just made an inverter driver....
Tom te tom te tom

Do you mean PWM - as in pulse width modulation?  If so, you can send an 8 bit number 0 - 255 and you'll get 0 - 5 volts out (averaged), at 488hz.

You can change the frequency by messing about with the clocks though, but I'd reccommend reading the data sheet for the chip you end up using.

http://softsolder.wordpress.com/2009/02/21/changing-the-arduino-pwm-frequency/

I guess the other way would perhaps be to use some kind of counter circuit to divide the frequency down - iirc you could use a cmos counter chip to achieve the same result and keep code simple without having to mess with the chip registers.
-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html