Monday, June 25, 2007

Sqr waveform gen cntrl

Video URL: http://www.youtube.com/watch?v=Idwc6j7JQPo

As a chill-out thingy on a lazy Sunday afternoon after ACMC07, i made a control patch and circuit for a square waveform generator. Actually, it did help me get over the conference and the subsequent 14.5 hour drive home. I'm pretty happy with the sonic results. If you are interested in getting one of the cheap MCP42100 digital pots from Futurlec working quickly, my code below is "quite well" commented.

In the video, the left hand sliders control the looping pitches and the right hand sliders control an amplitude graph over time (every point along the horizontal axis represents 20ms).

[expand / collapse code]

2 comments:

Thomas Lockney said...

I was so happy to stumble on this post -- I was trying for a while to find a good example of doing SPI with the arduino. In fact, I'm even planning on using it for controlling an MCP42100. However, it looks like something weird happened to the code in spi_transfer. The condition in the while loop isn't valid and even looking at your source I couldn't figure out what it was supposed to say. Any clues?

Sebastian Tomczak said...

yeah, sorry about that! Happens when you copy and paste code from arduino into blogger...

You can get the actual code here:

http://milkcrate.com.au/_other/downloads/projects/555control/555control.txt