A library to create square wave tones on all pins

Hi All,
I needed a library to create square wave tones on 12 pins at once. I couldn't find a library to do this so I ended up writing one and thought I would post it here in the off-chance somebody else has use for it. Basically it just uses a timer1 interrupt to toggle digital pin states. It's pretty simple but I spent some time optimizing it for speed (update time is 50us but could go lower). It can create frequencies up to 10kHz but is limited in the interval between allowed frequencies at higher values.

A longer description is here as well as a link to the code:

Feedback is welcome.

Cheers!
Greg

That's great. Also, check out my own take on this. :wink:

https://github.com/Beat707/Beat707-SY-LE

Wk

Cool, thanks for putting me on to this. It might help out with a project I'm thinking about.

Greg

This would make for an awesome Mario or Tetris music!