Here’s a demo of some software I developed for Tom Erbe’s music software development course at UCSD. The program allows you to generate modular synth control voltages using a standard AC-coupled audio interface. A diode and capacitor are the only required external hardware. The program is written in C++ using the Qt framework. Download the source, documentation and OS X binary here.
I thought I would post a bit of information about using a Zarlink MT8816 crosspoint switch (datasheet) with an Arduino or similar microcontroller. The MT8816 is a 40-pin IC which allows you to route any of its 8 X pins to any of its 16 Y pins – the connections are bidirectional, so you have do 8 ins, 16 outs or 16 ins, 8 outs. What you get from this is a cool matrix signal router – a great device to have for musical or other nefarious purposes.
Here’s the pinout:
Each of the pins beginning with “A” is an address pin – they’re how you address a specific X/Y connection. To interface this with an Arduino, you need to connect 11 digital output pins from the Arduino:
Other than that, you need to connect VDD, VSS, and VEE to +, GND, and – supplies.
So, as I mentioned, the addressing scheme is a little strange – and caused me 2 – 3 lost days of head-scratching and frustration. Here’s the info from the datasheet:
As you can see, the address pins indicate an address in a parallel, binary-ish scheme. So, if we’re going to select a particular matrix point – let’s use X3/Y1 – we use all of the address pins at once to indicate the numbers we need. Pins AX0 – AX3 give us 4 X address pins – 4four bits, which lets us count from 0 – 15 in binary. AY0 – AY2 give us 3 bits, 0 – 7 in binary. The 4-bit binary representation of our X address, 3, is 0011, and our Y address, 1, is 001. Consulting the table above, we can look up the value for X3 and see that it is actually 0110, and if we jump down a bit, we see that Y1 is 001. So, to represent our X3/Y1 we just turn our Arduino pins X1, X2, and Y0 high, and leave the others low.
This is all pretty clear, and the addressing follows binary counting rules until you get to X6. Look at the data sheet – X12 and X13 are actually represented by the binary numbers 6 (0110) and 7 (0111). I found an easy fix for my application, but long story short – never assume your chip follows any logic, and always read the datasheet thoroughly. I will admit to much profanity upon discovery of this design “feature” – you can see I had fun on this one…
Here’s my code, apologies for crummy WordPress formatting. Note that I’m only using an 8 x 8 subset of the chip, so my compensation may not work for your needs.
void togglePins(int chip, uint8_t x, uint8_t y, int state){
if(x >= 6){ // compensate for strange x-axis addressing scheme
x += 2;
}
digitalWrite(chip, HIGH);
// next lines convert from integer to binary address
// bitRead returns whether a given bit position in the binary representation of a value is high or low
if(bitRead(x, 0)) digitalWrite(X0, HIGH);
if(bitRead(x, 1)) digitalWrite(X1, HIGH);
if(bitRead(x, 2)) digitalWrite(X2, HIGH);
if(bitRead(x, 3)) digitalWrite(X3, HIGH);
if(bitRead(y, 0)) digitalWrite(Y0, HIGH);
if(bitRead(y, 1)) digitalWrite(Y1, HIGH);
if(bitRead(y, 2)) digitalWrite(Y2, HIGH);
// after address pins are set, set strobe high
digitalWrite(STROBE, HIGH);
// make sure DATA pin is the correct value
digitalWrite(DATA, state);
// reset all pins to low
digitalWrite(STROBE, LOW);
digitalWrite(X0, LOW);
digitalWrite(X1, LOW);
digitalWrite(X2, LOW);
digitalWrite(X3, LOW);
digitalWrite(Y0, LOW);
digitalWrite(Y1, LOW);
digitalWrite(Y2, LOW);
digitalWrite(chip, LOW);
}
It’s a pretty simple function, and you can see the rest of the program in my bitbucket repository.
I’ll be posting more soon about the device I’m building – it’s called pucktronix.snake.corral. I hope this helps decipher the datasheet, and saves some possible head-scratching.
Here’s the first release!
https://bitbucket.org/pucktronix/pucktronix.golgi.apparatus/
Right now, there’s an OS X Standalone App, a Max Collective, and all of the source code.
If anyone is running Max on windows and can compile a standalone for me, that’d be great.
Also, please retweet/facebook/blog this as much as you’d like – I’d love to have as many people as possible see this!
The source code and schematics for the tabulaRasa (along with other stuff) are now available:
https://bitbucket.org/pucktronix
I hope to use eventually use the bitbucket site as the landing page for my code and electronics work.
There are two parts of the final step in an open-source project: manufacturing and shipping. The only real trick in finishing your project is to do both of these things as quickly and carefully as possible.
If you can, get someone to help you assemble the project. You can do it assembly-line style, and probably knock it out in an afternoon or two, depending on the numbers. It’s best to start on it as quickly as you can. Sometimes the task of assembly can seem too daunting to start, but it becomes much more manageable once you’ve started.
For shipping, I don’t recommend anything fancier than USPS first-class mail. I’ve shipped out dozens of PCBs, Kits, Components, etc, and have only had one package delayed or lost (we still haven’t determined that it’s actually lost), and that package was sent from the US to Germany. You’ll have to fill out a customs form for each package sent internationally, but other than that, the process is as simple as dropping addressed packages / envelopes off at the post office.
Musician/hacker living in San Diego, CA. Studying computer music at UCSD. 