• Please review our updated Terms and Rules here

SID Synthesizer

Thrashbarg

Experienced Member
Joined
Apr 7, 2005
Messages
168
Location
Adelaide
Hi,

I've got plenty of old Commodore 64's and parts for them around here so I've built a SID synthesizer into a cheap toy piano.

It is made up of:
- 6510 MPU
- 6264 8k RAM
- 28C256 32k EEPROM
- 6526 CIA
- ADC0804 Analogue to Digital converter
- 6850 UART (to be added, MIDI support)
- lots of glue logic
- and of course a 6581 SID :)

So far it works nicely. though it's not finished. I can adjust the ADSR and filter controls with potentiometers, using an ADC to read and 4016's to multiplex them.

There's not much point in making a sound sample because I haven't programmed many features into it, and I'm awful at piano. When I get the MIDI interface hooked up I will.

Pictures:

http://kaput.homeunix.org/~thrashbarg/keyboard1.jpg
http://kaput.homeunix.org/~thrashbarg/keyboard2.jpg

Yes it's a very cheap toy piano.
 
Very cool! Do you think most cheap electronic toy pianos work in a similar way when it comes to decoding which key is pressed down? I suppose that is a big part of the synthesizer. Furthermore are you likely to have to write your own software to use with the device?
 
super duperly cool!

So nice to see someone making the effort to build a futile project just for the hell of it, and on vero board too!

10/10!
 
Very cool! Do you think most cheap electronic toy pianos work in a similar way when it comes to decoding which key is pressed down? I suppose that is a big part of the synthesizer. Furthermore are you likely to have to write your own software to use with the device?

When I got the piano it was a very primitive circuit, just resistors to change the frequency of the oscillator. Monophonic of course. I've got another one here which can play 4 notes at once, I don't know how it does it.

I had to write the software for my synth and decoding the keys was kind of tricky. There are 4 lots of 8 keys multiplexed onto the 6526's port A, which is set for input. I did it by storing the input byte into a zero page 'register' and shifting it bit by bit into the carry flag, while incrementing X for each shift. If the carry is clear it goes to the key down routine, if it's set it goes to the key up routine. X tells these routines which key it is.

nige the hippy said:
So nice to see someone making the effort to build a futile project just for the hell of it, and on vero board too!

I wouldn't exactly call it futile, my brother says he would like to use it in one of his bands when it's finished. It'll have a MIDI interface so it can be attached to a better keyboard :)
 
Sorry I wasn't being rude about the "futile" thing, it's just that it's so easy to buy a bit of superb equipment ready built, that it takes away the incentive to create something of your own.
I'm quite jealous of all the little projects people seem to be beavering away on, but I have too much big project on at the moment.:(
 
Aha, polophony! In a future version of the software, would you consider arpeggios too? Maybe a split function, so you could play both bass and chords simultaneously.

Yes, I know I'm asking a lot from a project in the beginnings, but it is really cool to DIY a SID synthesizer! Unfortunately I think my old toy pianos have been thrown away, but it might be possible to buy some old keyboard for $5 or less.
 
You know, I'm part of a local DIY group. We're rather limited in our skills so far, although some members have extensive soldering and also other electronics experience. For the fall, we have not quite yet decided what to do. It could be interesting to look into what you're doing and perhaps follow. Personally I'm more of a software guy than hardware. If you put together some simple web page with what you've done so far, I could point the others there. Or maybe it is a bit too early to share the project?
 
Carlsson, I'll probably make a web page for it when it's done. Not that there's anything particularly specific to it, it's all rather generic.

By that I mean it's a standard 6510 CPU attached to RAM, ROM, a 6526 CIA and a SID. The only really interesting part is the ADC which I've fixed up to read several potentiometers. That was done by using 4016 CMOS switches which are controlled by a 74LS138. The outputs of the 138 are negative logic so they have to go through inverters to work with the 4016's. It would probably be simpler with a CMOS decoder with positive logic outputs, but I didn't have one handy.

There are two 74LS138's attached to port B of the 6526, one controls which lot of keys are seen on port A and the other what the ADC sees. The ADC /INTR line is attached to a pin on the port of the 6510 itself.

It's a bit tricky getting the ADC to work properly. What I do is reset the ADC and run the keyboard and switch reading loop to figure out what should be done there. When that's done it reads the 6510 port to see if /INTR is low. If it isn't it does another cycle of the keys. Here's the tricky bit, the ADC is read, the appropriate routine is jumped to to send the ADC value to the correct register in the SID, and the whole cycle starts again, which starts off with the ADC being reset for another sample.

I did this wrong in my first attempt. I was resetting the ADC mid way through a sample and it caused all sorts of strange problems. The potentiometers seemed to be moved over by one place (rather than going A, D, S and R it was D, S, R and A) and the values would hit zero in various positions on the potentiometer.

Anyway, I hope this gives you a rough idea for the analogue part of the synth. Designs for the microcomputer bit are all over the Internet, but you'll probably want to start at www.6502.org .

Edit: also while I remember it, the 6526 also has a timer in it, so I use that to read from the Envelope 3 register of the SID and write it back to the filter high control at 1000Hz. This gives that wah effect The next thing to do is attach that effect to another switch so I can have a few different effects, such as arpeggios.
 
Yep, those remind me of my "toy Radio Shack" keyboard that I had at one time. I don't remember what it cost, think in the $40 range. It had sliders for all that ADSR stuff.
 
Back
Top