Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

ILI9341 2.4" TFT with Jetson Nano
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

ILI9341 2.4" TFT with Jetson Nano

by vafl_brut on Fri Sep 11, 2020 4:44 pm

Hello!

I have recently purchased this TFT display to use with my Jetson Nano: https://elmwoodelectronics.ca/products/ ... et-ili9341
I am not able to get the display to show anything.
I have enabled spi1 in nvidia's header tool as shown on attached image.

Im trying to run examples from Adafruit_CircuitPython_RGB_Display repo but all i get is white screen - no errors.

My wiring is as follows:
Grd -> pin 20 Grd
Vin -> pin 1 5v
Vo -> IM1, IM2, IM3
Clk -> pin 23 SPI_1_SCK
MISO -> pin 21 SPI_1_MISO
MOSI -> pin 19 SPI_1_MOSI
CS -> pin 24 SPI_1_CS0
DC -> pin 22 SPI_2_MISO
RST -> pin 18 SPI_2_CS0

I am attaching images showing my wiring as well as soldering and ribbon cable connection.

Is there a library for Jetson Nano that I could use to test this unit in 8-bit mode?

Please help.
Thank you!
Attachments
b82ceb8c-9975-4c64-b87d-4222a8a650c6.jpg
b82ceb8c-9975-4c64-b87d-4222a8a650c6.jpg (166.53 KiB) Viewed 112 times
8acf9b06-e3bb-4cc2-a890-b8b8fb029f08.jpg
8acf9b06-e3bb-4cc2-a890-b8b8fb029f08.jpg (188.26 KiB) Viewed 112 times
Capture.PNG
Capture.PNG (15.22 KiB) Viewed 112 times
Last edited by vafl_brut on Fri Sep 11, 2020 4:48 pm, edited 2 times in total.

vafl_brut
 
Posts: 12
Joined: Fri Sep 11, 2020 4:41 pm

Re: ILI9341 2.4" TFT with Jetson Nano

by vafl_brut on Fri Sep 11, 2020 4:46 pm

Some more images
Attachments
efde0f6f-75d7-4846-9dd4-458314e85d47.jpg
efde0f6f-75d7-4846-9dd4-458314e85d47.jpg (217.68 KiB) Viewed 111 times
7192d8df-944f-4c62-977f-7f0ef634609d.jpg
7192d8df-944f-4c62-977f-7f0ef634609d.jpg (165.59 KiB) Viewed 111 times

vafl_brut
 
Posts: 12
Joined: Fri Sep 11, 2020 4:41 pm

Re: ILI9341 2.4" TFT with Jetson Nano

by vafl_brut on Fri Sep 11, 2020 4:55 pm

Ive tried a few examples from the repo. Here is one of those

Code: Select all | TOGGLE FULL SIZE
"""
This will show some Linux Statistics on the attached display. Be sure to adjust
to the display you have connected. Be sure to check the learn guides for more
usage information.

This example is for use on (Linux) computers that are using CPython with
Adafruit Blinka to support CircuitPython libraries. CircuitPython does
not support PIL/pillow (python imaging library)!
"""

import time
import subprocess
import digitalio
import board
from PIL import Image, ImageDraw, ImageFont
import adafruit_rgb_display.ili9341 as ili9341
import adafruit_rgb_display.st7789 as st7789  # pylint: disable=unused-import
import adafruit_rgb_display.hx8357 as hx8357  # pylint: disable=unused-import
import adafruit_rgb_display.st7735 as st7735  # pylint: disable=unused-import
import adafruit_rgb_display.ssd1351 as ssd1351  # pylint: disable=unused-import
import adafruit_rgb_display.ssd1331 as ssd1331  # pylint: disable=unused-import

# Configuration for CS and DC pins (these are PiTFT defaults):
cs_pin = digitalio.DigitalInOut(board.CE0)
dc_pin = digitalio.DigitalInOut(board.D25)
reset_pin = digitalio.DigitalInOut(board.D24)

# Config for display baudrate (default max is 24mhz):
BAUDRATE = 24000000

# Setup SPI bus using hardware SPI:
spi = board.SPI()

# pylint: disable=line-too-long
# Create the display:
# disp = st7789.ST7789(spi, rotation=90,                            # 2.0" ST7789
# disp = st7789.ST7789(spi, height=240, y_offset=80, rotation=180,  # 1.3", 1.54" ST7789
# disp = st7789.ST7789(spi, rotation=90, width=135, height=240, x_offset=53, y_offset=40, # 1.14" ST7789
# disp = hx8357.HX8357(spi, rotation=180,                           # 3.5" HX8357
# disp = st7735.ST7735R(spi, rotation=90,                           # 1.8" ST7735R
# disp = st7735.ST7735R(spi, rotation=270, height=128, x_offset=2, y_offset=3,   # 1.44" ST7735R
# disp = st7735.ST7735R(spi, rotation=90, bgr=True,                 # 0.96" MiniTFT ST7735R
# disp = ssd1351.SSD1351(spi, rotation=180,                         # 1.5" SSD1351
# disp = ssd1351.SSD1351(spi, height=96, y_offset=32, rotation=180, # 1.27" SSD1351
# disp = ssd1331.SSD1331(spi, rotation=180,                         # 0.96" SSD1331
disp = ili9341.ILI9341(
    spi,
    rotation=90,  # 2.2", 2.4", 2.8", 3.2" ILI9341
    cs=cs_pin,
    dc=dc_pin,
    rst=reset_pin,
    baudrate=BAUDRATE,
)
# pylint: enable=line-too-long

# Create blank image for drawing.
# Make sure to create image with mode 'RGB' for full color.
if disp.rotation % 180 == 90:
    height = disp.width  # we swap height/width to rotate it to landscape!
    width = disp.height
else:
    width = disp.width  # we swap height/width to rotate it to landscape!
    height = disp.height

image = Image.new("RGB", (width, height))

# Get drawing object to draw on image.
draw = ImageDraw.Draw(image)

# Draw a black filled box to clear the image.
draw.rectangle((0, 0, width, height), outline=0, fill=(0, 0, 0))
disp.image(image)

# First define some constants to allow easy positioning of text.
padding = -2
x = 0

# Load a TTF font.  Make sure the .ttf font file is in the
# same directory as the python script!
# Some other nice fonts to try: http://www.dafont.com/bitmap.php
font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", 24)

while True:
    # Draw a black filled box to clear the image.
    draw.rectangle((0, 0, width, height), outline=0, fill=0)

    # Shell scripts for system monitoring from here:
    # https://unix.stackexchange.com/questions/119126/command-to-display-memory-usage-disk-usage-and-cpu-load
    cmd = "hostname -I | cut -d' ' -f1"
    IP = "IP: " + subprocess.check_output(cmd, shell=True).decode("utf-8")
    cmd = "top -bn1 | grep load | awk '{printf \"CPU Load: %.2f\", $(NF-2)}'"
    CPU = subprocess.check_output(cmd, shell=True).decode("utf-8")
    cmd = "free -m | awk 'NR==2{printf \"Mem: %s/%s MB  %.2f%%\", $3,$2,$3*100/$2 }'"
    MemUsage = subprocess.check_output(cmd, shell=True).decode("utf-8")
    cmd = 'df -h | awk \'$NF=="/"{printf "Disk: %d/%d GB  %s", $3,$2,$5}\''
    Disk = subprocess.check_output(cmd, shell=True).decode("utf-8")
    cmd = "cat /sys/class/thermal/thermal_zone0/temp |  awk '{printf \"CPU Temp: %.1f C\", $(NF-0) / 1000}'"  # pylint: disable=line-too-long
    Temp = subprocess.check_output(cmd, shell=True).decode("utf-8")

    # Write four lines of text.
    y = padding
    draw.text((x, y), IP, font=font, fill="#FFFFFF")
    y += font.getsize(IP)[1]
    draw.text((x, y), CPU, font=font, fill="#FFFF00")
    y += font.getsize(CPU)[1]
    draw.text((x, y), MemUsage, font=font, fill="#00FF00")
    y += font.getsize(MemUsage)[1]
    draw.text((x, y), Disk, font=font, fill="#0000FF")
    y += font.getsize(Disk)[1]
    draw.text((x, y), Temp, font=font, fill="#FF00FF")

    # Display image.
    disp.image(image)
    time.sleep(0.1)

vafl_brut
 
Posts: 12
Joined: Fri Sep 11, 2020 4:41 pm

Re: ILI9341 2.4" TFT with Jetson Nano

by adafruit_support_carter on Tue Sep 22, 2020 6:17 pm

Trying changing code:
Code: Select all | TOGGLE FULL SIZE
cs_pin = digitalio.DigitalInOut(board.CE0)
dc_pin = digitalio.DigitalInOut(board.D25)
reset_pin = digitalio.DigitalInOut(board.D24)


to match pins used:
CS -> pin 24 SPI_1_CS0
DC -> pin 22 SPI_2_MISO
RST -> pin 18 SPI_2_CS0

adafruit_support_carter
 
Posts: 17071
Joined: Tue Nov 29, 2016 2:45 pm

Re: ILI9341 2.4" TFT with Jetson Nano

by vafl_brut on Tue Sep 22, 2020 8:19 pm

i have quadruple checked pin placement by now and it appears to be right.
according to this https://learn.adafruit.com/assets/80774

CS -> pin 24 = D8 = CE0
DC -> pin 22 = D25
RST -> pin 18 = D24

vafl_brut
 
Posts: 12
Joined: Fri Sep 11, 2020 4:41 pm

Re: ILI9341 2.4" TFT with Jetson Nano

by vafl_brut on Tue Sep 22, 2020 8:33 pm

i have also confirmed that signals appear on assigned pins when i run the script, yet screen remains white

vafl_brut
 
Posts: 12
Joined: Fri Sep 11, 2020 4:41 pm

Re: ILI9341 2.4" TFT with Jetson Nano

by adafruit2 on Wed Sep 23, 2020 12:01 pm

hey vafl - how did you enable SPI?

adafruit2
Site Admin
 
Posts: 19395
Joined: Fri Mar 11, 2005 7:36 pm

Re: ILI9341 2.4" TFT with Jetson Nano

by adafruit2 on Wed Sep 23, 2020 12:02 pm

also, close the solder jumpers to enable SPI, see guide or pcb

adafruit2
Site Admin
 
Posts: 19395
Joined: Fri Mar 11, 2005 7:36 pm

Re: ILI9341 2.4" TFT with Jetson Nano

by vafl_brut on Thu Sep 24, 2020 1:35 pm

I was under impression that connecting boards 3Vo to IM1 IM2 and IM3 is enough to enable SPI? (as you can see on wiring image i posted)
Id like to keep jumpers open for now so I could try out 8 bit mode. Is there a library to use for 8 bit mode?

vafl_brut
 
Posts: 12
Joined: Fri Sep 11, 2020 4:41 pm

Re: ILI9341 2.4" TFT with Jetson Nano

by adafruit2 on Thu Sep 24, 2020 1:38 pm

yeah it is. to be honest we have not ever tested Nano with TFT because we couldnt get SPI enabled. it should work!

adafruit2
Site Admin
 
Posts: 19395
Joined: Fri Mar 11, 2005 7:36 pm

Re: ILI9341 2.4" TFT with Jetson Nano

by vafl_brut on Thu Sep 24, 2020 1:44 pm

I was following this article https://www.jetsonhacks.com/2020/05/04/ ... jetson-io/
it mentions this header configuration tool:
Code: Select all | TOGGLE FULL SIZE
 sudo /opt/nvidia/jetson-io/jetson-io.py

Please give it a try on your end and see if it works for you.

vafl_brut
 
Posts: 12
Joined: Fri Sep 11, 2020 4:41 pm

Re: ILI9341 2.4" TFT with Jetson Nano

by MakerMelissa on Thu Sep 24, 2020 6:55 pm

Hi,

We may need to update Blinka to work with Jetson Nano. I should have one in hand soon and can take a look and will test getting a TFT running on it.

MakerMelissa
 
Posts: 184
Joined: Wed Jun 05, 2013 2:10 am

Re: ILI9341 2.4" TFT with Jetson Nano

by vafl_brut on Thu Sep 24, 2020 7:03 pm

Thanks Melissa! Your help is much appreciated!

MakerMelissa wrote:Hi,

We may need to update Blinka to work with Jetson Nano. I should have one in hand soon and can take a look and will test getting a TFT running on it.

vafl_brut
 
Posts: 12
Joined: Fri Sep 11, 2020 4:41 pm

Re: ILI9341 2.4" TFT with Jetson Nano

by vafl_brut on Thu Sep 24, 2020 7:14 pm

Just to re-iterate, this guy makes a similar display work with nano
https://www.jetsonhacks.com/2020/05/04/ ... jetson-io/

Are lower level implementations differ for mine 2.4" and this one?
Thanks again

MakerMelissa wrote:Hi,

We may need to update Blinka to work with Jetson Nano. I should have one in hand soon and can take a look and will test getting a TFT running on it.

vafl_brut
 
Posts: 12
Joined: Fri Sep 11, 2020 4:41 pm

Re: ILI9341 2.4" TFT with Jetson Nano

by MakerMelissa on Thu Sep 24, 2020 7:20 pm

Hi, I'm not sure what the differences are at this point. When I originally added the Jetson Nano, it was required to have a computer with a specific version of Ubuntu Linux and reflashing the board was required. It appears they now have a tool that runs on the Jetson Nano, but the pinouts may be different. So my plan is to compare what needs to be changed in Blinka in order to get it to run. I'm hoping the change will be simple such as redefining the pins. This will also give me an opportunity to update our learn guide if it does work.

Melissa

MakerMelissa
 
Posts: 184
Joined: Wed Jun 05, 2013 2:10 am

Please be positive and constructive with your questions and comments.