Square wave using adurino

Thread Starter

Sathishk

Joined Feb 3, 2014
4
Hi guys!
I am new here. I am working on square wave generator using audrino.
Frequency range: 0 Hz to 5k Hz
4 different frequencies have to be produced on 4 pins.

Please guide and help.

Thanks in advance.
 

Thread Starter

Sathishk

Joined Feb 3, 2014
4
Hi,
first tutorial says that max 170hz can be produced by that method.
And using, tone function, 4 different frequencies can't be produced simultaneously on different pins.
Regards
 

Papabravo

Joined Feb 24, 2006
21,225
In simple terms it is a free running timer and a comparison register. Whenever the timer is equal to the value in the comparison register the OCM (Output Compare Module) posts an interrupt request. When the interrupt is serviced an output pin can be toggled. If you have four OCM channels then you can have four squarwave outputs.
 
Top