Join the Ben Heck team every week for amazing hacks! Watch them build and mod community-inspired projects using electronics! | Community Feedback | |
Super Glue Gun | ||
See All Episodes |
Ben and Karen answer questions from Community Members about Raspberry Pi. Topics include the use of differential signals such as PCI Express Lanes for adding a GPU; the GPIO, IO, and the Linux Device Tree Overlay requirements to power an old portable DVD screen with your Raspberry Pi. |
Community Feedback comes from robertmcgoniglejr and d3angc !
Congratulations you win a Free Ben Heck T-Shirt!
robertmcgoniglejr wants to know to a Raspberry Pi for adding a GPU. According to Ben it's probably not. PCI Express Lanes are differential signals, a modern x86 computer, has quite a few of them and that's what's used to add video cards. There are a few exposed differential signal lines such as for the LCD and the HDMI but he doesn't think that's going to give you the same kind of access you'd have with PCI Express because you're basically talking about a completely different architecture.
d3angc has portable DVD players mounted to the head rests of his vehicles and wants to upcycle them using a Raspberry Pi 3. He's with Kodi installed. He’s designing this with kids in mind so he’s also planning to add the necessary module for wireless game controllers. He wants to know if Ben is interested in doing the build if he sends him one of the sets he has.
According to Ben, the problem you would have here is you’d have to know what the signals are on the DVD player screen. If it was TTL NOT LVDS you could put the Raspberry Pi into TTL RGB video mode. It will use the first 27 pins. It does 8 bit RGB, that’s 24 pins, and the other pins are hsync, vsync, and then dot clock. If you had an LCD that had those signals you could put the Raspberry Pi into TTL RGB mode and then as long as you had the timing correct you could directly drive an LCD with it. The 4:3 screen from the Hex Game is basically the same screen that’s on the PlayStation portable.
It’s a 24-bit RGB screen so that could be something you hooked up directly to a Raspberry Pi. You’d have to make your own device tree overlay for it to work. For the system boot up you’d have to tell it not to use HDMI or video and instead use these pins in this mode. With most Raspberry Pi’s it would eat up most of the IO but you’d have the USB ports to use with the controllers.
To find out if your old portable DVD player screen is compatible with the Raspberry Pi , you’d have to look at the ribbon cable coming from the screen, it would probably have 40 connections on it, 24 of which would be the data, three to five of which would be the sync signals, and the rest would probably just be power, ground, hot plug detect, and things like that. A lot of those screens require 21 volts DC for the backlight so you’d probably have to have some sort of boost converter for the voltage.
The 24-bit parallel RGB interface allows parallel RGB displays to be attached tio the Raspberry Pi GPIO either in RGB24 (8 bits for red, green and blue) or RGB666 (6 bits per color) or RGB565 (5 bits red, 6 green, and 5 blue). The interface is controlled by the GPU firmware and can be programmed through special config.txt parameters and enabling the correct Linux Device Tree overlay.
GPIO Pins
The DPI (Display Parallel Interface) is a simple clocked parallel interface (up to 8 bits of R, G, B; clock, enable, hsync, and vsync). Its one of the alternate functions selectable on bank 0 of the Raspberry Pi GPIO. The interface is available as alternate function 2 (ALT2).
There are various ways that color values can be presented on the DPI output pins in either 565, 666, or 24-bit modes:
Disable Other GPIO Peripherals
You'll need to disable all other peripheral overlays that use conflicting GPIO pins by commenting out or inverting any dtparams that enable I2C or SPI in the config.txt file:
dtparam=i2c_arm=off
dtparam=spi=off
Linux Device Tree Overlay
The Linux Device Tree overlay is used to switch the GPIO pins into the correct mode (alt function 2). The GPU is responsible for driving the DPI display. There is no linux driver so the overlay simply sets the GPIO alt functions correctly.
The 'full fat' DPI overlay (dpi24.dtb) sets all 28 GPIOs to ALT2 mode to provide the full 24 bits of color bus as well as the h and v-sync, enable and dot clock. This will use all the bank 0 GPIO pins.
Users can edit overlays to create a custom overlay to enable just the pins they want to use.
Example 800x480 LCD Panel Config
dtoverlay=dpi24
overscan_left=0
overscan_right=0
overscan_top=0
overscan_bottom=0
framebuffer_width=800
framebuffer_height=480
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
dpi_output_format=0x6f005
hdmi_timings=800 0 40 48 88 480 0 13 3 32 0 0 0 60 0 32000000 6
Have a Raspberry Pi question that you want Ben and Karen to answer on Community Feedback?