Offline
Jr. Member
Karma: 1
Posts: 63
|
 |
« on: July 13, 2011, 10:58:28 am » |
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
|
|
|
|
|
Netherlands
Offline
Tesla Member
Karma: 101
Posts: 9551
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #1 on: July 13, 2011, 11:58:41 am » |
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
|
|
|
|
|
Offline
Jr. Member
Karma: 1
Posts: 63
|
 |
« Reply #2 on: July 13, 2011, 02:57:02 pm » |
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
|
|
|
|
|
Netherlands
Offline
Tesla Member
Karma: 101
Posts: 9551
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #3 on: July 13, 2011, 03:44:44 pm » |
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  Rob
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 1
Posts: 63
|
 |
« Reply #4 on: September 01, 2011, 03:17:04 am » |
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 ! 
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #5 on: September 14, 2011, 02:09:24 pm » |
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  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
Jr. Member
Karma: 1
Posts: 63
|
 |
« Reply #6 on: September 15, 2011, 06:47:35 am » |
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.
|
|
|
|
« Last Edit: September 15, 2011, 06:50:34 am by D4p0up »
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #7 on: September 15, 2011, 12:22:28 pm » |
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
Jr. Member
Karma: 1
Posts: 63
|
 |
« Reply #8 on: September 15, 2011, 12:40:06 pm » |
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
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #9 on: September 15, 2011, 01:46:57 pm » |
By the way, could you share the full code, that can play the midi from midi-in according to your schematic? =)
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 1
Posts: 63
|
 |
« Reply #10 on: September 15, 2011, 03:40:14 pm » |
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.)
|
|
|
|
« Last Edit: September 15, 2011, 03:42:13 pm by D4p0up »
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #11 on: September 15, 2011, 05:52:12 pm » |
I am damn very much grateful!!!!  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 !!! 
|
|
|
|
|
Logged
|
|
|
|
|
Denmark
Offline
Sr. Member
Karma: 5
Posts: 251
New on the Arduino platform...
|
 |
« Reply #12 on: September 18, 2011, 06:43:41 am » |
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
Jr. Member
Karma: 1
Posts: 63
|
 |
« Reply #13 on: September 19, 2011, 03:59:53 am » |
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=262Regards
|
|
|
|
« Last Edit: September 19, 2011, 04:03:49 am by D4p0up »
|
Logged
|
|
|
|
|
Denmark
Offline
Sr. Member
Karma: 5
Posts: 251
New on the Arduino platform...
|
 |
« Reply #14 on: September 19, 2011, 04:48:02 am » |
Ohh, nice!!
Can you upload a sound sample somewhere so i can hear the noise ? ;-)
// Per.
|
|
|
|
|
Logged
|
|
|
|
|
|