Tinker Board Forum

Full Version: Using SPI display
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I am using a Tinker Board S with Armbian. What I now would like to do is to add a Waveshare 1,5'' OLED display using the SPI interface. Unfortunately I do not really understand, which pins to use for this. My idea:

Ports required by display:


DIN: use SPI2 MOSI, physical pin 19
CLK: use SPI2 SCLK, physical pin 23
CS: use SPI2 CSN0, physical pin 24
VCC: use physical pin 2
GND: use physical pin 40
DC: any free GPIO, I would like to use physical pin 16
RST: any free GPIO, would like to use physical pin 18

To drive this I would use gpio_lib_c from github.

Anything I missed here? Any hints & tips for me?

Kind regards

Hi, I'm trying to get working the same display, but with no success.
The numbers of pins are ok - It depends what script are You using...
I,m using similar pins.
I have tested two python scripts - from luma.oled repo and example from waveshare.
The first one does not display at all, and the second one displays color lines and the image is displayed only in a few lines

[Image: p.jpeg?fv_content=true&size_mode=5]

The display is ok, because on Raspberry Pi it works ok, with the same waveshare script 
On Tinker board I modified scripts to use ASUS.GPIO and get rid of RPi.GPIO which works only on Raspberry.
I changed also spidev0.0 to spidev 2.0

I investigated the problem:
display shows horizontal lines after the initialization.
at the end of initialization there is command A6 - All OFF (All pixels have gray scale of 0,GS0), and after that if shows colorful lines and only 4 or 5 lines are active to show picture.
I tried to modify initialization sequence but any changes does not influence horizontal lines.
BTW the lines are always the same (each time I run the script, the position and color is the same)
when I use command All ON (All pixels have gray scale of 15,GS15) whole screes becomes gray, but it has no response to graphic (I think it is ok)

Than I thought it may be the spidev problem so I checked it with spidev_test (form rm-hull) and the MISO - MOSI are the same - so it looks bus is worhing ok.

Running this screen with RaspberryPi took me 5 minutes.
What is the difference between Raspberry and Tinker that prevents display from working?
I have no further ideas.
Any help would be appreciated.