Some notes on connecting a display to the Raspi. The Raspi has three (or four) conventional display interfaces:
- The most obvious one is HDMI. Connect any cheap box with HDMI input and you'll get an image. Behind the scenes, HDMI is quite complex, but there is so much ready-to-use hardware that you don't have to think about it. The HDMI output is controlled natively by Linux, it looks like a cheap graphics card on a PC to Linux. Some Raspis even have two HDMI outputs.
- There is a composite video output that you could connect to many, many old TVs and many monitors. It is an analog signal, which limits the usable resolution to about SDTV. Like the HDMI output(s), Linux and the graphics hardware take care of this output. The output is on the headphone jack, on a dedicated cinch connector, or on some pads, depending on the Raspi model.
- There is a DSI (Display Serial Interface) on a flatflex connector. It is designed to control "embedded" displays, typically with a resistive or capacitive touch interface (connected via I²C). Like HDMI, Linux and the graphics hardware take care of this output. It basically behaves like a laptop or tablet display.
- The graphics hardware can also use the GPIO pins with a hand full of resistors or a better DAC to generate a VGA RGB signal. This costs you all available GPIOs, so you rarely go this way. But as before, Linux and the graphics hardware take care of the VGA output.
The ST7789V2 is controlled via SPI, using a custom protocol (that I seem to remember from similar displays at work). The Raspi graphics hardware won't help you with that. You could write a frame buffer driver for the Linux kernel, or a "graphics card" driver for X11 or Wayland to support this display. Or you directly write pixel from your application via SPI to the ST7789V2, like you would do on an Arduino or any other microcontroller.
<Update>
Looking at the website once more, it seems soneone actually has implemented a kernel mode framebuffer driver for that display, using several tricks (DMA, partial refresh) to get reasonable frame rates over an inadequate interface.
</Update>
Having an independent display may be useful (no bluescreen on that display), but on a Raspi, I would use DSI or HDMI. There are tons of well-tested code to handle everything to draw on a DSI or HDMI display, including 2D and 3D acceleration, font rendering, and so on. No need to reinvent the wheel.
Alexander
--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.