Getting a new display is exciting, but it can also feel daunting. Display boards often have variations in pin order, voltage requirements, pin naming, driver chips, and communication interfaces.
If you connect everything correctly, the display works beautifully. However, a single misstep can result in nothing working. Given the multiple caveats involved, successful connection requires proper documentation and some experience.
This section will guide you through the process of connecting a display to a microcontroller board.
Overview
Most displays use one of two common communication interfaces:
Less common options include parallel interfaces, which require a large number of GPIO pins, making them less practical for many applications.
Interface Types
The interface controls how the microcontroller communicates with the display. Typically, display boards use one of these two interfaces:
- I2C:
- Simple to use and ideal for beginners.
- Often used with small monochrome displays.
- If you’re new to displays, starting with an affordable monochrome OLED display that uses I2C is a good choice.
- SPI:
- Faster and capable of handling larger amounts of data.
- Used by most TFT displays, which are often color displays.
- Essential for projects involving large or color-intensive displays.
Support Pins
In addition to interface pins, many displays require additional support pins, especially TFT displays that commonly use the SPI interface:
- Data/Command (D/C):
- Found on most SPI displays.
- Used to distinguish between control instructions (commands) and display content (data).
- Backlight:
- TFT displays require an active backlight.
- This pin can be connected directly to a voltage source or a GPIO pin if brightness control is desired.
- Reset:
- Some displays include a reset pin for reinitializing the display controller.
- This pin must remain high during normal operation.
The type of display and interface determines how many GPIO pins you need to allocate.
Interface | Required GPIOs (Output) |
---|---|
I2C | 2 |
SPI | 6-7 |
Wiring Summary
Including power connections:
- A 4-wire SPI display requires 9 wires and 7 GPIO pins.
- A simple I2C display requires just 4 wires and 2 GPIO pins.
Choosing the right display and understanding its requirements is key to a successful connection.
Slow Website?
This website is very fast, and pages should appear instantly. If this site is slow for you, then your routing may be messed up, and this issue does not only affect done.land, but potentially a few other websites and downloads as well. Here are simple steps to speed up your Internet experience and fix issues with slow websites and downloads..
Comments
Please do leave comments below. I am using utteran.ce, an open-source and ad-free light-weight commenting system.
Here is how your comments are stored
Whenever you leave a comment, a new github issue is created on your behalf.
-
All comments become trackable issues in the Github Issues section, and I (and you) can follow up on them.
-
There is no third-party provider, no disrupting ads, and everything remains transparent inside github.
Github Users Yes, Spammers No
To keep spammers out and comments attributable, all you do is log in using your (free) github account and grant utteranc.es the permission to submit issues on your behalf.
If you don’t have a github account yet, go get yourself one - it’s free and simple.
If for any reason you do not feel comfortable with letting the commenting system submit issues for you, then visit Github Issues directly, i.e. by clicking the red button Submit Issue at the bottom of each page, and submit your issue manually. You control everything.
Discussions
For chit-chat and quick questions, feel free to visit and participate in Discussions. They work much like classic forums or bulletin boards. Just keep in mind: your valued input isn’t equally well trackable there.
(content created Jan 22, 2025)