Soekris dam1021 Arduino Control Code

A few days ago Soren announced that the release of the new firmware for the dam1021 was close.

In light of that announcement I have decided to release the Arduino code that I had written a few months back, even though it is not quite finished.

2015-07-31 18.15.44_res

I am doing this to help fellow Arduino & dam1021 enthusiasts in their quest of remote-controlled color TFT bliss.

So, for now, no real documentation – this is no polished piece of software, but it works (for the most part).

Since it is based on the TFT HiFiDuino code, you can get started by reading its documentation. It should not be hard to get started with this. The code itself also contains useful comments.

I should remind you that the dam1021 at the moment only “talks” real RS-232, meaning that a circuit that converts the TTL level serial port of the Arduino to a real RS-232 port is necessary.
However, we were promised that with the firmware upgrade the second, isolated TTL serial port would be enabled, so here’s hoping..

Also, I have come across a strange problem with the serial communication with the dac. In the beginning all is well but after a while the dam no longer responds to the commands that are sent by the Arduino. However, it (the dam) is still sending data back to the Arduino – when the sampling rate changes, the new SR is displayed properly on the TFT.

I have verified that the Arduino is indeed sending the commands to the dam:



I hope the problem gets sorted out in the new firmware release.

Anyway, here is the code: ArDAM1021 Code (11508 downloads)  The project also has its own page:

Let me know what you think. I promise to put more work into it in the next few weeks..



10 thoughts on “Soekris dam1021 Arduino Control Code

  1. Thanks for posting the code, Dimdim – something to while away the hours while not at the beach this weekend. And it’s a long weekend…

  2. Thanks Dimdim! great code.
    I have a couple of questions:
    1) So a Max3232 should be ok? I found a cheap board on ebay. I have a max233, but it is 5Volt and I would need a level converter?

    2) Regarding memory.. My uno has 500something of kb of memory and your code is 300something. Do I need the extra memory?

    best regards,

    • 1) Yes, a MAX3232 would be the most sensible choice. I have ended up using an ICL3221 for my tests.

      2) The DUE has ~512K of memory, my code uses up ~300K. The rest of the memory just stays unused, you don’t need to do anything about it.

      • I was a bit unclear in my second question. Do I need the 24LC256 or will the free memory in the DUE be used? Sorry but I am quite new to Arduino 🙂

        • No worries.. For the moment my code doesn’t really require the 24lc256 since it doesn’t need to save any settings but it might need it in the future. There is also the possibility of using “emulated flash” memory on the DUE, utilizing its flash, but I would be worried that it would wear out the flash too fast.

  3. Managed to get an ‘XtraLite’ version of your DAM and OLED Universal Sample Rate code cobbled together on an Uno clone running at 3.3V and using the isolated serial port on the DAM. It displays the volume normally and switches to displaying the sample rate for three seconds each time the SR changes. As I currently use an RPi’s I2S directly into the DAM I adapted the code to indicate the change in sample rate based on the serial output of the DAM. Used your remote library with an Apple remote – nice way to adopt different remotes. It’s about 22K now so room to add input switching and some other bells and whistles. It’s not pretty coding ( I am not a programmer, just a diy’er) but it works. Many thanks, Dimdim, for posting your quite elegant code for both projects.

    • This is very good news! I too intend to make a lite version of the code.. I have started working on it but you seem to be (much) further along. Would you mind sharing your code? With full credit of course..

      • Sure, no problem. It’s still pretty alpha and unpolished at this stage and doesn’t yet have filter or input switching but it’s mainly your code so, of course I’m willing to share. PM me?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.