It took quite a bit longer than I had expected but I am happy to report that Phase 1 of the TFT HiFiDuino project is complete.
The objectives of Phase 1 were the following:
– Have full control over the parameters of the ES9018 chip. Essentially be able to write to all of the useful registers.
– Be able to have full IR remote control functionality.
– Be compatible with both the MEGA as well as the Due Arduino boards.
– Be able to switch between all 8 of the supported s/pdif inputs, as well as between I2S sources (USB in my case).
– Develop an Arduino shield that would simplify the wiring of the thing as much as possible as well as provide galvanic isolation between the Arduino and the DAC board.
If you happen to come across a bug, please let me know by posting a comment below.
Feel free to use it whichever way you see fit, modify it, redistribute it, whatever, as long as you do not profit from it.
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:
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:
What 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: