TFT Hifiduino Code v0.95

Update: TFT Hifiduino Code v0.95 available!

Download from here: B3_arduino_code_v0_95 (Note: As always, the code on this page may not be the current one, i.e. there may be a newer version available. The latest version is always up at the project’s official page.)

Here is a partial changelog:

– Changed rotary encoder code. Should work for MEGA as well as Due (no longer using interrupts).

– Added remote control codes for virtually all of the functionality that is offered by the encoder so now all of the parameters can be set via remote.

Bugs:

– Selection bar is still buggy. Haven’t gotten around to sorting it out.

Missing functionality:

– Disply backlight handling. It is next in line to be sorted.

– Sleep mode. Much research is needed, so won’t be implemented soon.

Also, I’m working on a simple MEGA / Due shield that should simplify things a lot. It is a work in progress, so I’m not ready to publish schematics or anything, but you can have a look at the current version’s 3D model:

Render_01

SMD: Soldering iron vs. hot air

This is the result of me soldering an SMD with a standard soldering iron:

Soldering Iron soldered

And this is what I accomplished with a hot air rework station, practically on my first try:

Hot Air soldered

That’s it.. I’m hooked on hot air soldering! 🙂

BTW, in case you’re wondering, the first IC is a Si8605 (I2C galvanic isolator) while the second one is a Si8440 (I2S galvanic isolator). Both will be used in my ongoing Buffalo III project.

TFT Hifiduino Code v0.91g

I was going to wait until I had gotten to the point that I had a version that I could call “v1” but a fellow DIYer kind of forced my hand. So this is v.0.91g. (Note: As always, the code on this page may not be the current one, i.e. there may be a newer version available. The latest version is always up at the project’s official page.)

IMG_5950_resize IMG_5947_resize

I have included in the ZIP file all of the necessary fonts, but you will also need the UTFT library. You should get it from here.

There is a number of things that you should keep in mind:

The code supports both the MEGA as well as the Due. You have to set the appropriate setting in the code. It is not hard to find.. search for #define ARDUMEGA

Keep in mind that the rotary encoder does not yet work on the Due. The relevant code is still a little buggy, but it should be fixed soon. Also the selection bars are buggy as well..

This version of the code requires the addition of a 24LC256 EEPROM chip. That is necessary in order to support the Due, since it does not have any on-chip EEPROM. You should wire it like this (making the necessary connections to the correct pins SDA/SCL for the MEGA/Due): http://www.hobbytronics.co.uk/arduino-external-eeprom

If you plan on using a MEGA (even though I would advise against it, see the video that follows) you could easily adapt the code to use the MEGA’s EEPROM (essentially use the original hifiduino code for the specific functionality) and omit the 24LC256.

You should use a compatible remote control. You will know it is compatible if you see the IR codes displaying on the top right of the screen when you press the various keys. You will need to change the IR codes in the code to the numbers corresponding to your specific remote control (see CASE statement).

I have implemented a remote power on/off feature but the TFT’s backlight remains on all the time. That can easily be remedied by wiring a transistor as control for the TFT’s backlight.. However, since I plan on implementing dimming for the TFT, I will do it more elegantly in a future version of the code.

This version of the code supports all 8 s/pdif inputs of the ES9018 as well as a 9th input (named USB) which is used for I2S/DSD input. You can of course easily change the number of the inputs as well as their names. I am using a sidecar for the switching between I2S & s/pdif.

Finally, here is a short video comparing the performance of the MEGA versus the Due:

3.2″ TFT pinout & connection to Arduino MEGA (or Due)

UPDATE (30/11/2013): Here is an easier way: https://www.dimdim.gr/2013/11/3-2%E2%80%B3-tft-connection-to-arduino-due-update/
Still, keep in mind that the info posted below still applies and is probably useful..

I’ve been asked what is the correct way to wire a 3.2″ TFT to an Arduino MEGA (or Due) in order to make it work with the UTFT library.

The answer of course depends on the exact model of the TFT that we have on hand. The below instructions apply to a generic 3.2″ TFT with wide aspect ratio and resolution of 240 x 400 that I got off of Ebay.

This is its pinout according to the manufacturer:

3.2-tft-pinout-pdf

This is nice, but I want to use a standard 40-pin ribbon cable which I have left over from an old computer, and its conductor numbering is a little different. At first I thought I’d try to make sense of it as I went but it didn’t take long for me to realize that it would actually save me time if I made a “conversion table”. So I came up with what you see here:

3.2-tft-pinout-xlsWhat we have here is the actual conductor number in the grey background (counting the conductors in the ribbon cable from left to right) and then above and below them the corresponding signal lines according to the above pinout. Above and below the signal lines I have noted the actual Arduino pins that correspond to the signals.

For example, pin 2 (the second pin on the flex cable looking at it from the left) corresponds to the DB0 signal which should be connected to the D37 pin on the Arduino MEGA (or Due). Note that the connections are made according to UTFT’s documentation and are applicable specifically to UTFT.

So we have to connect signals D0 through to D15 to the necessary digital pins. Then we also have to connect pins RS, WR, CS and REST to whichever pins we like (we must declare these pins in our sketch, see UTFT documentation). Pin 11 is RD and it must be pulled high, which means connecting it to +3.3V.  Pin 37 is the backlight illumination which means it must also be connected to +3.3V. This leaves pin 1 which must be connected to ground and pin 3 which must be connected to Vcc which in our case is 5V.

Note that I have not really gotten around to using the touchscreen capabilities or the SD reader, so I have not connected them to my Arduinos. It shouldn’t be difficult though.

Now, there is one more thing that I should point out and it is very important. The Arduino MEGA is using 5V logic while the TFT is expecting 3.3V logic. This means that if you connect the D0-D15 and RS, WR, CS, REST lines directly to the MEGA you will most likely damage the TFT. You need to connect a 10K resistor in series with each and every one of the lines. That will bring the voltage down to acceptable levels. Do not forget to do this!

In case of the Due the resistors are not necessary since it uses 3.3V logic so it is directly compatible.

Here is a little video I made of the 3.2″ TFT running a UTFT demo sketch:

Good luck!

New Finnebassen

Finnebassen – Monday (Original Mix):
http://www.youtube.com/watch?v=q6GOxD9qJHM

Finnebassen – Jezebel (Finnebassen og Hansebassen Edit):
[soundcloud url=”http://api.soundcloud.com/tracks/64958823″ params=”” width=” 100%” height=”166″ iframe=”true” /]

Arduino DUE

After a relatively long wait, the Arduino DUE is finally commercially available!

It is based on a 32bit Atmel SAM3X8E ARM Cortex-M3 CPU running at 84MHz, so it should outperform the MEGA by a long margin..

I wonder if it will make a significant difference to the way HiFiDuino’s code runs, especially with my TFT.

I have ordered one and if everything goes well I should receive it some time next week so we’ll know soon enough.

Aeroplane, Compuphonic, Mario Basanov, Perseus, Goldroom

Better late than never… This is loads of fun!!! Aeroplane August 2012 Mix:
[soundcloud url=”http://api.soundcloud.com/tracks/57437728″ params=”” width=” 100%” height=”166″ iframe=”true” /]

Plus the first track from above, it is just amazing: Compuphonic – Sunset (DJ T. Remix)

Moving on: Mario Basanov – We Are Child Of Love

Another excellent track: Perseus – Seychelles

..and Friendly Fires – Hurting (Tensnake Remix)

Going back to Perseus, he put out an awesome EP about a year back, the Russian Girlfriends EP. It is just excellent. Listen here:
[soundcloud url=”http://api.soundcloud.com/playlists/1421194″ params=”” width=” 100%” height=”450″ iframe=”true” /]
Download for free here: http://french-express.com/perseus/FE010.zip

Finally, we have Goldroom. These guys are great at remixing. Check out this classic track:

More of their stuff on SoundCloud: https://soundcloud.com/goldroom

The Magician, KeeMo

While everyone is going batshit crazy over Gangnam Style, I am re-discovering The Magician. This is the guy who made Lykke Li’s I Follow Rivers a huge hit last summer.

He has a lot of original stuff as well as remixes, but he is best known for his Magic Tape series:

[soundcloud url=”http://api.soundcloud.com/playlists/1054038″ params=”” width=” 100%” height=”450″ iframe=”true” /]

One of his tracks stands out to me: Memories
[soundcloud url=”http://api.soundcloud.com/tracks/49799042″ params=”” width=” 100%” height=”166″ iframe=”true” /]

Plus we have a Greek track that kind of stands out: KeeMo feat. Cosmo Klein – Beautiful Lie