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.
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
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.