Mini PiTFT display is not functional

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
stirucherai
 
Posts: 26
Joined: Sun Sep 26, 2021 11:44 am

Mini PiTFT display is not functional

Post by stirucherai »

Following is the setup

Two units of
Raspberry pi Zero WH -- Adadruit
RS485/CAN HAT -- WaveShare
PiOLE 128*30 -- Adafruit
Min PiTFT 1.3 inch -- Adafruit

Had both unit working well with first three component -- Because of the PIOLED 128*30 is very small, got the 1.3inch module. Now
1. Installed mini PiTFT 1.3inch on top Waveshare RS485/CAN HAT
2. Installed all components by https://learn.adafruit.com/adafruit-min ... thon-setup
3. Ran rgb_display_minipitfttest.py

Geting

Traceback (most recent call last):
File "rgb_display_minipitfttest.py", line 14, in <module>
board.SPI(),
File "/usr/local/lib/python3.7/dist-packages/board.py", line 286, in SPI
return busio.SPI(SCLK, MOSI, MISO)
File "/usr/local/lib/python3.7/dist-packages/busio.py", line 271, in __init__
self._spi = _SPI(portId)
File "/usr/local/lib/python3.7/dist-packages/adafruit_blinka/microcontroller/generic_linux/spi.py", line 22, in __init__
self._spi = spi.SPI(device=(portid, 0))
File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/spi.py", line 167, in __init__
raise IOError("{} does not exist".format(device))
OSError: /dev/spidev0.0 does not exist


ls -rtl /dev/spi*
crw-rw---- 1 root spi 153, 0 Oct 9 23:15 /dev/spidev0.1

User avatar
adafruit_support_carter
 
Posts: 29457
Joined: Tue Nov 29, 2016 2:45 pm

Re: Mini PiTFT display is not functional

Post by adafruit_support_carter »

It's acting like the SPI bus was not enabled. What does this check show?
https://learn.adafruit.com/circuitpytho ... 2993390-13

User avatar
stirucherai
 
Posts: 26
Joined: Sun Sep 26, 2021 11:44 am

Re: Mini PiTFT display is not functional

Post by stirucherai »

For CAN need to add the following
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25,spimaxfrequency=1000000

based on the above link added the following
dtoverlay=spi1-3cs

Post reboot -- following is the output -- but dont see spidev0.0

crw-rw---- 1 root spi 153, 0 Oct 11 17:06 /dev/spidev0.1
crw-rw---- 1 root spi 153, 3 Oct 11 17:06 /dev/spidev1.0
crw-rw---- 1 root spi 153, 2 Oct 11 17:06 /dev/spidev1.1
crw-rw---- 1 root spi 153, 1 Oct 11 17:06 /dev/spidev1.2

User avatar
adafruit_support_carter
 
Posts: 29457
Joined: Tue Nov 29, 2016 2:45 pm

Re: Mini PiTFT display is not functional

Post by adafruit_support_carter »

based on the above link added the following
dtoverlay=spi1-3cs
That's only needed if you want/need to enable secondary SPI. The secondary port is on different pins:
https://pinout.xyz/pinout/spi#
You shouldn't need to worry about the secondary SPI port.

The install script (raspi-blinka.py) should have taken care of enabling the SPI port:
https://learn.adafruit.com/circuitpytho ... spberry-pi
Did you run that?

User avatar
stirucherai
 
Posts: 26
Joined: Sun Sep 26, 2021 11:44 am

Re: Mini PiTFT display is not functional

Post by stirucherai »

Once adding blinka.py - shows all(spi, i2c etc) valid.

pi@raspberrypi:~ $ sudo python3 blinka.py
Hello blinka!
Digital IO ok!
I2C ok!
SPI ok!
done!
pi@raspberrypi:~ $

Issue is both HAT on boot hangs at "Starting job for hostname service"

Thanks and Regards
Sarang

User avatar
stirucherai
 
Posts: 26
Joined: Sun Sep 26, 2021 11:44 am

Re: Mini PiTFT display is not functional

Post by stirucherai »

Meant with both HAT on (Mifi PifT HAT on top CAN Hat which is on top of Raspberry pi, hanging on the boot

User avatar
adafruit_support_carter
 
Posts: 29457
Joined: Tue Nov 29, 2016 2:45 pm

Re: Mini PiTFT display is not functional

Post by adafruit_support_carter »

What happens if you comment out (disable) the CAN overlay:

Code: Select all

# dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25,spimaxfrequency=1000000
Maybe there's a conflict between the TFT and the CAN HAT? That's this?
https://www.waveshare.com/rs485-can-hat.htm

User avatar
stirucherai
 
Posts: 26
Joined: Sun Sep 26, 2021 11:44 am

Re: Mini PiTFT display is not functional

Post by stirucherai »

Commenting
# dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25,spimaxfrequency=1000000

Obvious CAN does not work which critical. Even PiTFT does not work -- it is blank screen (no error). So until I remove the CAN Hat and have only Display Hat, display works

User avatar
adafruit_support_carter
 
Posts: 29457
Joined: Tue Nov 29, 2016 2:45 pm

Re: Mini PiTFT display is not functional

Post by adafruit_support_carter »

If this is the CAN HAT:
https://www.waveshare.com/rs485-can-hat.htm
then there is a hardware conflict between the CAN HAT and the miniTFT. Both are trying to use the same chip select pin.
tft.jpg
tft.jpg (26.9 KiB) Viewed 150 times
can.jpg
can.jpg (39.71 KiB) Viewed 150 times

User avatar
stirucherai
 
Posts: 26
Joined: Sun Sep 26, 2021 11:44 am

Re: Mini PiTFT display is not functional

Post by stirucherai »

Hmm

Then this would not work for me -- Is the any equivalent display of this size you have which will not conflict -- i would like to trade these two units i have got from you guys

Thanks and Regards
Sarang

User avatar
stirucherai
 
Posts: 26
Joined: Sun Sep 26, 2021 11:44 am

Re: Mini PiTFT display is not functional

Post by stirucherai »

After much of review --

1. Decided to use this unit for non CAN based project -- output is pretty good

2. For CAN based (did by mini piOLED but that was too small) going ahead with 2.23 inc PIOLED 128X32 monochrome

Just attaching the image. As mentioned this is for battery BMS monitoring and Connecting to Inverter which requires CAN based integration

Thanks for all the support

Thanks and Regards
Sarang
Attachments
23inch MiniTFT.jpeg
23inch MiniTFT.jpeg (75.38 KiB) Viewed 128 times

User avatar
adafruit_support_carter
 
Posts: 29457
Joined: Tue Nov 29, 2016 2:45 pm

Re: Mini PiTFT display is not functional

Post by adafruit_support_carter »

In theory, the CAN + TFT hardware combo could work *if* you could somehow get them to use different CS (chip select) pins. It's OK to share the other SPI pins (SCLK/MOSI/MISO). But that might (based on what I can see) require some hardware and software hacking.

Switching to OLEDs is an easy solution, since those are typically I2C based.

User avatar
adafruit2
 
Posts: 22187
Joined: Fri Mar 11, 2005 7:36 pm

Re: Mini PiTFT display is not functional

Post by adafruit2 »

its definitely not easy, it requires changing the SPI CS pins, which maybe the CAN hat does, but it at least requires cutting and re-soldeirng traces. you're best off going with an i2c display

User avatar
stirucherai
 
Posts: 26
Joined: Sun Sep 26, 2021 11:44 am

Re: Mini PiTFT display is not functional

Post by stirucherai »

Thanks got 2,23inc 128x32 PIOLED and it works. It is big and bright (just that it is monochrome -- using miniTFT was able to display different color based on the SOC Value). Attached picture
Attachments
2.23incPIOLED.jpeg
2.23incPIOLED.jpeg (39.61 KiB) Viewed 108 times

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

Return to “Adafruit CircuitPython”