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
Mini PiTFT display is not functional
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Mini PiTFT display is not functional
It's acting like the SPI bus was not enabled. What does this check show?
https://learn.adafruit.com/circuitpytho ... 2993390-13
https://learn.adafruit.com/circuitpytho ... 2993390-13
- stirucherai
- Posts: 26
- Joined: Sun Sep 26, 2021 11:44 am
Re: Mini PiTFT display is not functional
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
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
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Mini PiTFT display is not functional
That's only needed if you want/need to enable secondary SPI. The secondary port is on different pins:based on the above link added the following
dtoverlay=spi1-3cs
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?
- stirucherai
- Posts: 26
- Joined: Sun Sep 26, 2021 11:44 am
Re: Mini PiTFT display is not functional
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
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
- stirucherai
- Posts: 26
- Joined: Sun Sep 26, 2021 11:44 am
Re: Mini PiTFT display is not functional
Meant with both HAT on (Mifi PifT HAT on top CAN Hat which is on top of Raspberry pi, hanging on the boot
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Mini PiTFT display is not functional
What happens if you comment out (disable) the CAN overlay:
Maybe there's a conflict between the TFT and the CAN HAT? That's this?
https://www.waveshare.com/rs485-can-hat.htm
Code: Select all
# dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25,spimaxfrequency=1000000
https://www.waveshare.com/rs485-can-hat.htm
- stirucherai
- Posts: 26
- Joined: Sun Sep 26, 2021 11:44 am
Re: Mini PiTFT display is not functional
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
# 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
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Mini PiTFT display is not functional
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.
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.
- stirucherai
- Posts: 26
- Joined: Sun Sep 26, 2021 11:44 am
Re: Mini PiTFT display is not functional
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
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
- stirucherai
- Posts: 26
- Joined: Sun Sep 26, 2021 11:44 am
Re: Mini PiTFT display is not functional
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
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 (75.38 KiB) Viewed 131 times
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Mini PiTFT display is not functional
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.
Switching to OLEDs is an easy solution, since those are typically I2C based.
- adafruit2
- Posts: 22200
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Mini PiTFT display is not functional
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
- stirucherai
- Posts: 26
- Joined: Sun Sep 26, 2021 11:44 am
Re: Mini PiTFT display is not functional
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 (39.61 KiB) Viewed 111 times
Please be positive and constructive with your questions and comments.