ILI9341 problem

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
robcranfill
 
Posts: 142
Joined: Wed Feb 13, 2013 4:14 pm

ILI9341 problem

Post by robcranfill »

I have a project with a Feather RP2040 that I had shelved for a while, and now I've come back to it.... and I can't get the ILI9341 display to work any more! Well, I have been trying this and that, and out of maybe a solid hour of messing around, it worked for like 2 minutes, in the middle of some seemingly insignificant changes. That is, it didn't work for a long time, then worked for a little bit, and now doesn't work again. Very odd.

Attached is a photo of my wiring. There's nothing plugged into the Stemma connector. That big blue jumper connects BL on the display to A3 on the Feather.
ili9341-problem.jpg
ili9341-problem.jpg (677.19 KiB) Viewed 233 times
Below is the code, more or less the demo code I found on Adafruit.

I have tried CircuitPython 8.2.0-beta.0 (for some cool new synthio stuff that I really want to use), 8.1.0, and 7.3.0.

Any suggestions appreciated.

Library versions used:

Code: Select all

adafruit_lis3dh==5.1.23
adafruit_ili9341==1.3.10
adafruit_ticks==1.0.11
adafruit_max9744==1.2.14
adafruit_displayio_sh1107==1.5.11
adafruit_pixelbuf==2.0.2
adafruit_vl53l0x==3.6.9
adafruit_vl53l4cd==1.1.5
neopixel==6.3.9
adafruit_bus_device==5.2.6
adafruit_display_text==2.28.3
adafruit_circuitplayground==5.3.2
adafruit_bitmap_font==2.0.1
adafruit_ht16k33==4.6.5
asyncio==0.5.22
adafruit_rgb_display==3.11.3
adafruit_seesaw==1.12.1
adafruit_register==1.9.16
adafruit_apds9960==3.1.8

The code:

Code: Select all

# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT

"""
This test will initialize the display using displayio and draw a solid green
background, a smaller purple rectangle, and some yellow text. All drawing is done
using native displayio modules.

Pinouts are now for the Adafruit Feather RP2040 "Featheremin" project.
"""
import board
import terminalio
import displayio
from adafruit_display_text import label
import adafruit_ili9341
import digitalio

print("ILI9341 demo.....")

# Release any resources currently in use for the displays
displayio.release_displays()

spi = board.SPI()
tft_cs = board.A2
tft_dc = board.A0

display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=board.A1)
display = adafruit_ili9341.ILI9341(display_bus, width=320, height=240)

# Make the display context
splash = displayio.Group()
display.show(splash)

# Draw a green background
color_bitmap = displayio.Bitmap(320, 240, 1)
color_palette = displayio.Palette(1)
color_palette[0] = 0x00FF00  # Bright Green

bg_sprite = displayio.TileGrid(color_bitmap, pixel_shader=color_palette, x=0, y=0)

splash.append(bg_sprite)

# Draw a smaller inner rectangle
inner_bitmap = displayio.Bitmap(280, 200, 1)
inner_palette = displayio.Palette(1)
inner_palette[0] = 0xAA0088  # Purple
inner_sprite = displayio.TileGrid(inner_bitmap, pixel_shader=inner_palette, x=20, y=20)
splash.append(inner_sprite)

# Draw a label
text_group = displayio.Group(scale=3, x=57, y=120)
text = "Hello World!"
text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00)
text_group.append(text_area)  # Subgroup for text scaling
splash.append(text_group)

# added backlight code
backlight = digitalio.DigitalInOut(board.A3)
backlight.switch_to_output()
backlight.value = True


print("Demo done?")

# if the code stops, the display gets erased. Why?
# so do this to wait forever:
while True:
    pass


User avatar
robcranfill
 
Posts: 142
Joined: Wed Feb 13, 2013 4:14 pm

Re: ILI9341 problem

Post by robcranfill »

I forgot to describe the misbehavior: no display, no error messages. :-(

The display might kinda blink and shimmer a little tiny bit but I think it’s just doing a “no signal” kind of thing.

User avatar
robcranfill
 
Posts: 142
Joined: Wed Feb 13, 2013 4:14 pm

Re: ILI9341 problem

Post by robcranfill »

Me again. :-) And this is the Adafruit 2.2” TFT display.

User avatar
robcranfill
 
Posts: 142
Joined: Wed Feb 13, 2013 4:14 pm

Re: ILI9341 problem

Post by robcranfill »

OK, I have not "solved" my problem, but I did take this display and attach it to another Feather I have ... and it works fine. So there is something wrong with my wiring in my main project. I will take a closer look.

One difference: in the new setup, I'm not connecting BL at all. Seems fine without it, so first I'll remove that from my old project and see what happens.....

User avatar
robcranfill
 
Posts: 142
Joined: Wed Feb 13, 2013 4:14 pm

Re: ILI9341 problem

Post by robcranfill »

Just a follow-up: I have been using this display for several weeks now, and it works just fine - perhaps because I am now using an EyeSPI breakout to attach it to the Feather, so whatever was wrong with my previous breadboard wiring is no longer a problem. Either that or it's a coincidence. :-)

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”