Adafruit tfp401 Hdmi Slash Dvi Decoder To 40 Pin TTL Display
Adafruit tfp401 Hdmi Slash Dvi Decoder To 40 Pin TTL Display
Guide Contents 2
Overview 3
Touch Screen 7
Backlight 9
Editing the EDID 12
Downloads 16
Datasheets & Files 16
Schematics 16
Fabrication Print 16
Raspberry Pi Config 18
Its a mini HDMI decoder board! So small and simple, you can use this board as an all-in-one display driver for TTL
displays, or perhaps decoding HDMI/DVI video for some other project. This breakout features the TFP401 for decoding
video, and for the touch version, an AR1100 USB resistive touch screen driver.
The TFP401 is a beefy DVI/HDMI decoder from TI. It can take unencrypted video and pipe out the raw 24-bit color pixel
data - HDCP not supported! It will decode any resolution from 25-165MHz pixel clock, basically up to 1080p. We've
used this breakout with 800x480 displays, so we have not specifically tested it with higher resolutions. We added a
bunch of supporting circuitry like a backlight driver and configured it for running basic TTL display panels such as the
ones we have in the shop
We have two versions, one is video only and one is video+touch. If you want a screen that you can poke at, get the
+touch version and pair it with a screen that has a resistive touch overlay. The USB port then acts as both power and
data, with the touch screen appearing like a USB mouse.
This driver is designed specifically as a small and easy to use display driver for our 40-pin TTL displays. In particular,
we suggest it for use with single board computers (or desktop/laptops!) with DVI/HDMI output like the Raspberry Pi or
BeagleBone Black. You can power the driver over USB and then feed it video via the HDMI port. It's a very small board
so great for tucking into an enclosure. It can drive our 4.3", 5.0" or 7.0" displays but we really only recommend the 5"
or 7" 800x480 as some computers do not like the low resolution of the 4.3" and the TFP401 does not contain a video
scaler, it will not resize/shrink video!
This is just a decoder breakout, a display is not included! We recommend either the 800x480 5" with
touch (http://adafru.it/1596), 5" without touch (http://adafru.it/1680), 7" with touch (http://adafru.it/2354) or 7" without
touch (http://adafru.it/2353)
Please check out the detailed tutorial on adjusting the backlight brightness. We also have information on how to tweak
the EDID if you want to use other display resolutions. If you need a little more distance between the driver and display,
check out the 40-pin FPC extension board. (https://adafru.it/dXI)
If you purchased the version of the decoder with touch support, you will receive a decoder board with extra circuitry
for a resistive touch screen decoder. The circuit is an AR1100 USB resistive touch driver, so it basically just uses the
same USB port you use to power, but for the data
You can also re-calibrate the touch screen. We do calibrate it for our 800x480 5" screens but we recommend re-
calibrate it, especially if you are not using the exact same display we sell.
The software is Windows only, but you only have to configure/calibrate the touch controller once, then it can be used
on any computer!
All of this happens with the AR1100 software. We have a tutorial specifically on using that software over here, so please
go there (https://adafru.it/kQf) to learn all about it!
This is a generic TTL display driver, and each display has a slightly different backlight configuration. For that reason,
you may need to make some adjustments to your board.
To make sure you don't accidentally damage your backlight, we make the default backlight current 25mA. Since the
backlight driver is a constant-current boost, it will adjust the voltage up to 25V until it gets 25mA of draw.
If you are using a 4.3" diagonal screen, chances are its a 25mA backlight, so you should keep both jumpers clear
If you are using a 7.0" diagonal screen, chances are its a 125mA backlight - the ones we sell in the Adafruit shop are
If you want to adjust the backlight brightness, you can feed a PWM signal (1KHz or greater) into the Backlight pin, 3-5V
logic level. Or you can just connect it to ground to turn off the backlight driver. This will greatly reduce the power usage
One thing that often confuses people poking at DVI/HDMI signals is the EDID. The EDID is the 'device identifier data'
that lets the computer know what kind of monitor is attached. To make it simple, the EDID is stored on an i2c EEPROM.
If you reprogram the EEPROM, you've changed around the EDID.
The TFP401 video decoder chip never reads or writes the EEPROM/EDID, it has NO IDEA what is stored in
the EDID!
Which sounds kinda odd - how does the TFP401 know what resolution to display then? The answer is that the
computer defines the resolution of the monitor, and bases the decision on the EDID contents.
Usually the EDID tells the computer about half a dozen or so resolution options. However, with the TFP401, ther's only
one resolution you should use: the native resolution of TTL display. That's because the TFP401 does not contain a
video scaler - if you set the computer resolution to 800x480 while it is connected to a 1024x600 TTL display, you'll
only get video in the top left corner. If you set the computer resolution to 1024x600 while it is connected to a 800x480
display, you'll get video that is cut off, and does not include the top right or bottom left sections.
So, basically, make sure the EDID contains the resolution you'll be connecting! We assume you'll be going with the
ultra-common 800x480. You can reprogram the EDID using an Arduino or (possibly) a computer using the HDMI/DVI
port if you have software to write the EDID that way.
5V pin to Arduino 5V
GND pin to Arduino GND
SCL to Arduino SCL (A5 on an Arduino Uno)
/* 480x272 @ 25mhz
void setup() {
Wire.begin(); // initialise the connection
Serial.begin(9600);
Serial.println(F("EEPROM WRITER"));
Serial.print(F("EEPROM data size: "));
Serial.println(sizeof(eepromdat));
Serial.println(F("Hit any key & return to start"));
while (!Serial.available());
byte b;
Serial.println("Starting");
for (uint16_t addr = 0; addr < EEPROMSIZE; addr++) {
if (addr < sizeof(eepromdat)) {
b = pgm_read_byte(eepromdat+addr);
} else {
b = 0xFF;
}
i2c_eeprom_write_byte(0x50, addr, b);
delay(5);
if ((addr % 32) == 0)
Serial.println();
Serial.print("0x");
if (b < 0x10) Serial.print('0');
Serial.print(b, HEX); //print content to serial port
Serial.print(", ");
}
Serial.println("\n\r========\n\rFinished!");
for (uint16_t addr = 0; addr < EEPROMSIZE; addr++) {
if (addr < sizeof(eepromdat)) {
b = pgm_read_byte(eepromdat+addr);
} else {
b = 0xFF;
}
uint8_t d = i2c_eeprom_read_byte(0x50, addr);
if ((addr % 32) == 0)
Serial.println();
Serial.print("0x");
if (d < 0x10) Serial.print('0');
Serial.print(d, HEX); //print content to serial port
Serial.print(", ");
if (b != d) {
Serial.print(F("verification failed at 0x")); Serial.println(addr);
while (1);
}
}
Serial.println(F("\n\r\n\rVerified!"));
}
void loop() {
}
You can see we have an example for 480x272 there, for 4.3" screens. The reason we don't recommend it, tho, is that it
overclocks the screens a bit and more-over, 480x272 is smaller than the 'minimal' 640x480 that most HDMI drivers
really want. So during boot up or whatever, you won't get a display.
If you want to generate your own EDIDs and customize them, which is a great way to seriously lose like 4 hours of your
life, you can download EDID editor software such as Deltacast or whatever you find when you google for "EDID editor"
You only need the first 128 bytes (there are longer detailed EDID's that have an extra 128 byte 'chunk' but this decoder
doesn't support all that stuff anyways)
While we dont think you could damage the TFP401 or display with a really messed up EDID, we still think you should
only edit/customize the EDID if you're comfortable with some intense hex editing and EEPROM programming, its not for
the faint of heart
Schematics
The version without touch does not have the AR1100 circuitry in the top right corner
Fabrication Print
This is the same for both versions of the decoder, dims in inches
Remember, the TFP401 driver does not have a video scaler! If you don't feed it exactly 800x480 pixels the image will
not stretch/shrink to fit!
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2
It is possible to power the display from the onboard Pi USB port with the modification below, but a powered
hub is ideal!
max_usb_current=1
to /boot/config.txt
If you're getting wierd reboots, its likely the power supply and/or power USB cable is not good enough. A powered hub
will also solve this problem