Pages: [1] 2   Go Down
Author Topic: SID Chip and 8 Bit Arduino DAC  (Read 7000 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 1
Posts: 70
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi people there,

I'm new to the Arduino community and started to play with an Arduino board 3 weeks ago. I have been through several schematics, eventually implemented a good Midi interface, played a lot with PWM and R2R ladder DACs, and made a simple but efficient shield for the Commodore SID chip.

Just wanted to share two things here :

A "DIY" SPI 8 bit DAC worth 0,85€ using R2R ladders and a 74HC595. It has been proved to work very well and allowed 8 bit R2R DAC on my Uno without using 8 pins of the board, and reaching output rate of 330kHz, far higher than any audio rate you'd expect.

The SIDaster shield is an Arduino shield for the SID (MOS6581 and nexts) audio chips from Commodore. It has been test proven to work well with diodes and a real SID chip.

However, I'm sharing the stuff, and would be glad to gather any feedback you have.

Loving the Arduino,

Vincent
« Last Edit: March 07, 2013, 07:39:52 pm by D4p0up » Logged

Arduino sound Reseach - http://bit.ly/fullmaj [fr][en] | Homemade Free VST - http://zomg.zxq.net [en]

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 221
Posts: 13848
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Hi Vincent,

Would make a very nice signal generator.

about extending to 16 bit:  by using 2  595's you could create a stereo 8 bit too

Can you post some code you used to test?

Thanks,
Rob


Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Jr. Member
**
Karma: 1
Posts: 70
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You're right ! added some code samples and digged a little into the details of how my DDS works.
I hope this helps,
Vincent
Logged

Arduino sound Reseach - http://bit.ly/fullmaj [fr][en] | Homemade Free VST - http://zomg.zxq.net [en]

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 221
Posts: 13848
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Hi Vincent,

Thanks for the code, is an improvement,

not to nag, a complete running sketch is what most people (and I) like the best smiley-wink

Rob



Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Jr. Member
**
Karma: 1
Posts: 70
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This looks like a small bump indeed, but thanks to the help of another enthusiast Arduino SID user, the SID shield has produced its first sounds a few hours ago. The code will be updated with the bugs found, but it's alive, ALIVE ! smiley
Logged

Arduino sound Reseach - http://bit.ly/fullmaj [fr][en] | Homemade Free VST - http://zomg.zxq.net [en]

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So did anyone had any luck in interfacing with MOS 6581 \ 8580 SID? I want to do that, but have no idea where to start smiley-cry For instance, if I have Arduino mega2560 and MOS 6581 - I'd like to be able to play sound directly from the arduino itself (take the sound bytes from an SD, and put them into 6581's registers - no emulation, no external MIDI source). And, possibly, seeking a way to decode SID files into registers that I can send to the SID and play. Any ideas? Googled a lot, still haven't found a decent solution, where everything's explained.
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 70
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

To answer your question : the Arduino SID Shield & Library I propose >>here<< is the solution to control a SID side. Thanks to the help of another SID enthusiast Matthew (who kindly gifted me with one of his SIDs when i broke mine), it has been proven to be working good.
We both made our SIDs sound great using the same schematic. For the library itslef, matthew and i are improving it at the moment, I shall release an updated version end of next week.

But the schematic in itslef is perfectly working: you can use an Arduino to both :
- generate the SID clock and manage it
- access its memory registers using HW SPI through two 74hc595

I also have a shield prototype under construction, as you can see in the image attached.

Concerning the SD card: you need to dig elsewhere, like the shields from Rugged Circuits which are a good choice. You will however encounter SPI concurrent access though, so you'll have to make chip select tweaks.





* shield1.JPG (116.49 KB, 800x600 - viewed 75 times.)
« Last Edit: September 15, 2011, 06:50:34 am by D4p0up » Logged

Arduino sound Reseach - http://bit.ly/fullmaj [fr][en] | Homemade Free VST - http://zomg.zxq.net [en]

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I guess I just need to omit the MIDI IN part of the scheme, and I'm good to go =) I've decided to use an external 1MHz quartz generator to minimize pain with clocking; and, concerning SD, I believe, I am gonna read the SID data in 512B blocks to an internal buffer in RAM, and I'll have to switch between two fours of SPI pins on the fly: SPI to SD -> Read data to a buffer -> switch to SID -> resume playing from RAM. Hopefully I will have enough time for all this to not to interrupt playing =) I just need to wait for my SID package to arrive =)
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 70
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Timing is THE thing I'm working on actually.

As per now, a SID 8 bit Write takes rouglhy 600us, including the 300us delay needed byt the SID to "digest" the data before being available for a new Write.
Logged

Arduino sound Reseach - http://bit.ly/fullmaj [fr][en] | Homemade Free VST - http://zomg.zxq.net [en]

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

By the way, could you share the full code, that can play the midi from midi-in according to your schematic? =)
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 70
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sure, here it is, the debug code for a mono 3 harmonics Synth.

Note that the Midi handlers are built to maintain memory of the previous note played, to enhance the playability of the synth when playing legato on a keyboard (i.e. pressing the nex note while the previous one is still pressed, to avoid note off collison).

The SID library is being updated atm, but it shall work with this one.

Have fun !

(and again : credit for the SID Library last release goes to Matthew D.)

* SID.zip (4.34 KB - downloaded 25 times.)
« Last Edit: September 15, 2011, 03:42:13 pm by D4p0up » Logged

Arduino sound Reseach - http://bit.ly/fullmaj [fr][en] | Homemade Free VST - http://zomg.zxq.net [en]

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am damn very much grateful!!!!  smiley-lol Since I'm a newbie, that'll help me greatly to adapt the code for my project for the ongoing 8bit event =) I would certainly mention that it would not be possible without this library (well maybe it could be, but I wouldn't have finished my work in time =) )
Can't wait for my SID to arrive to start tinkering around with SD read. I'm planning to make it switchable: option 1 - play from SD, option 2 - play from a midi synth, option 3 - input 8bit pcm and decode it. I'll post here when I achieve at least something =) also it would  be nice to see lib updates here, as they occur =) Thanks again !!!  smiley-mr-green
Logged

Denmark
Offline Offline
God Member
*****
Karma: 15
Posts: 743
Please don't send questions as PM!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks to the help of another SID enthusiast Matthew (who kindly gifted me with one of his SIDs when i broke mine), it has been proven to be working good

Would you please update your website, stating that it indeed does work with a working SID chip ? I stumbled upon your site earlier, and left because the site tells me that you never really had it working besides with an "dummmy" SID...

// Per.
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 70
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi.

Sorry you stumbled upon it, unfortunately it has been successfully "Real-Sid-tested" last thursday night ... and i could only update the website yesterday night.

So now the article has been updated, and more than anything : MAH SID IZ MAKIN NOYZ !

http://fullmaj.rd-h.fr/wordpress/?page_id=262

Regards
« Last Edit: September 19, 2011, 04:03:49 am by D4p0up » Logged

Arduino sound Reseach - http://bit.ly/fullmaj [fr][en] | Homemade Free VST - http://zomg.zxq.net [en]

Denmark
Offline Offline
God Member
*****
Karma: 15
Posts: 743
Please don't send questions as PM!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ohh, nice!!

Can you upload a sound sample somewhere so i can hear the noise ? ;-)

// Per.
Logged

Pages: [1] 2   Go Up
Jump to: