January 25

Jewelry Box: Wiring Everything Together

The components have been tested on their own, but can they work together? Testing will need to be performed while all components are wired, and updating the sketch one part at a time. It may compile, but it doesn’t mean it will run successfully on the Uno R3.

The RTC module and OLED display were running on 4 simple wires: power, ground, SCL (serial clock), and SDA (serial data). I’ll discuss the I2C pin sharing further down, but the point for now is that they worked when wired to the Uno R3. The TFT display, however, is a shield using SPI (Serial Peripheral Interface) bus connection, and will need to ensure the proper connections are made. Reviewing the Seeed Studio documentation, the following pins are used for the TFT display shield:

Pin Name Function
D4 TF_CS
D5 TFT_CS
D6 TFT_DC
D7 Backlight¹
D11 SPI_MOSI
D12 SPI_MISO
D13 SPI_SCK
A0 Touch Panel²
A1 Touch Panel²
A2 Touch Panel²
A3 Touch Panel²

¹Backlight is ON by default, thus not needing a pin connection.
²As I’m not using a touch screen feature in the sketch, I will not make analog connections.

Having this information, I know that I’ll be using two wires for power and ground, three wires for the digital pins (D4-D6), and another three wires for the SPI pins. Seeed Studio isn’t incorrect in their pin reference, as that’s the general form of the Arduino microcontrollers. However, for the Uno R3, these functions are allocated on the ICSP (In-Circuit Serial Programming) pins: the 2×3 pin connector on the middle-right of the board. Always using red wire for power, and black wire for ground, I’ll use yellow wire for the digital pins, and green wire for SPI. Here is what my wiring looks like, from the TFT display to the Uno R3:

TFT display wired to the Uno R3

 

Does it Work?

From the image above, it can be determined that it is receiving power. The backlight is on, by default, but I have to ensure that all the correct pins are being used. Based solely on Seeed Studio’s pinout, I meet the minimum requirements for the image-displaying sketch that I am using. Uploading the tftbmp example sketch, with the edits for my own image names, I see this:

TFT display working with required pins connected.

IT WORKS! The images cycle through at the right time, and continue to loop at the end of the picture cycle. This is a good start, as it does not present a pin conflict with the I2C devices I will connect next.

 

 

Wiring I2C Devices

I2C devices are great to use, as you can connect them all using the same 4 pins: power, ground, SCL, and SDA. The microcontroller will communicate with the device on its unique identifier. As was seen with the I2C Scanner sketch when identifying the OLED display, I need to specify the device’s address, 0x3c in this case, to pass along the content I want displayed. It’s (almost) as easy as that.

 

Family Photo

The TFT display is wired and working successfully. Next, I need to wire the RTC module and OLED display together. For these, I’ll use blue wire for SCL, and grey wire for SDA connections. Using a breadboard will help in sharing the connection with the Uno R3’s SCL and SDA pins. With this many wires, it’s good to start cable management, to ensure you don’t end up with a rat’s nest that you can’t troubleshoot later.

TFT display, OLED display, and RTC wired to the Uno R3

 

 

Family Drama

Everything is connected. I’m lucky to not have pin conflicts in my libraries or sketches. Unfortunately, upon powering the Uno R3, the TFT display no longer shows the images. It is a blank white display, with only the backlight on. None of the pins came loose, nor am I altering any of the code in the sketch, which was still uploaded from my recent testing. Fortunately, there is information being passed to the Serial Monitor, which should let me know where it is failing.

TFT ID not read, and the microSD card contents cannot be found

 

 

Back to the Drawing Board

It’s a minor setback. With all the issues to get started with the Seeed Studio 2.8″ TFT v2 display, I’m going to cut my losses (and gains!), and move on to using an Adafruit 2.8″ TFT v2 display, with their device-specific library, and SPI pinout. It would seem that any further progress will be a hack job, which will seemingly defeat the purpose of the library and example code. I’ll have to re-do much of my image conversion work, but it may only require the resizing and scaling, with no need to flip, and rotate.

Tags: , , , , , , ,
Copyright 2025. All rights reserved.

Posted 2017-01-25 by Draik in category "Arduino", "Jewelry Box