Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for SSD1351 128x128 Color OLED #174

Closed
rm-hull opened this issue Oct 27, 2017 · 13 comments
Closed

Add support for SSD1351 128x128 Color OLED #174

rm-hull opened this issue Oct 27, 2017 · 13 comments

Comments

@rm-hull
Copy link
Owner

rm-hull commented Oct 27, 2017

[this is a placeholder to record progress on implementation of the ssd1351 device]

This development was permitted by the kind donation of funds by @svenyonson to purchase https://www.aliexpress.com/item/1-5-inch-Colorful-OLED-Module-SSD1331-128x128-Resolution-for-51-STM32-Arduino/32721463778.html

Implementation Notes

Code [WIP] on branch: feature/SSD1351.
Documentation preview: http://luma-oled.readthedocs.io/en/feature-ssd1351/
Datasheet: http://www.hpinfotech.ro/SSD1351.pdf

Item received, close up pics as follows:
image

image

OLED Pin OLED Name RPi Pin RPi Function Remarks
1 GND P01-20 GND Ground
2 VCC P01-17 3V3 +3.3V Power
3 SCL P01-23 GPIO 11 (SCLK) Serial Clock
4 SDA P01-19 GPIO 10 (MOSI) Serial Data
5 RES P01-22 GPIO 25 Reset
6 DC P01-18 GPIO 24 Data/Command
7 CS P01-24 GPIO 8 (CE0) Chip Select
@rm-hull
Copy link
Owner Author

rm-hull commented Oct 28, 2017

Using @notro's fbtft driver (swapping over RES & DC from prev comment) confirms that the display works OK:

$ sudo modprobe fbtft_device name=freetronicsoled128
$ dmesg | grep fbtft_device
[   63.900658] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[   63.903323] fbtft_device: GPIOS used by 'freetronicsoled128':
[   63.903337] fbtft_device: 'reset' = GPIO24
[   63.903345] fbtft_device: 'dc' = GPIO25
$ conf2fbmap 1 1

image

@rm-hull
Copy link
Owner Author

rm-hull commented Oct 28, 2017

Ok, so we now have a working implementation:

image

image

Performance on a Raspberry Pi B2:

$ python examples/perfloop.py -f conf/ssd1351.conf --framebuffer=full_frame
Testing display rendering performance
Press Ctrl-C to abort test

Display: ssd1351
Interface: spi
Dimensions: 128 x 128
----------------------------------------
#### iter =    651: render time = 60.09 ms, frame rate = 16.61 FPS

@rm-hull
Copy link
Owner Author

rm-hull commented Oct 30, 2017

Fixed in #177

@martijnrondeel
Copy link

A few months ago I was searching for a proper library and came across this one but it didn't have support back then. Now it does, thank you so much for supporting SSD1351 👍.

@ayhlai
Copy link

ayhlai commented Apr 12, 2018

I have exactly the same display as above

Tried both connections as below:

OLED Pin OLED Name RPi Pin RPi Function Remarks
1 GND P01-20 GND Ground
2 VCC P01-17 3V3 +3.3V Power
3 SCL P01-23 GPIO 11 (SCLK) Serial Clock
4 SDA P01-19 GPIO 10 (MOSI) Serial Data
5 RES P01-22 GPIO 25 Reset
6 DC P01-18 GPIO 24 Data/Command
7 CS P01-24 GPIO 8 (CE0) Chip Select
OLED Pin OLED Name RPi Pin RPi Function Remarks
1 GND P01-20 GND Ground
2 VCC P01-17 3V3 +3.3V Power
3 SCL P01-23 GPIO 11 (SCLK) Serial Clock
4 SDA P01-19 GPIO 10 (MOSI) Serial Data
5 RES P01-18 GPIO 24 Data/Command
6 DC P01-22 GPIO 25 Reset
7 CS P01-24 GPIO 8 (CE0) Chip Select

Checked many times that spi port seems ok

ls -l /dev/spi*
crw-rw---- 1 root spi 153, 0 Apr 12 15:40 /dev/spidev0.0
crw-rw---- 1 root spi 153, 1 Apr 12 15:40 /dev/spidev0.1

The program runs without error, but I see nothing on the display , any ideas?

:~/luma.examples$ python examples/perfloop.py -f conf/ssd1351.conf --framebuffer=full_frame
Testing display rendering performance
Press Ctrl-C to abort test

Version: luma.oled 2.3.2 (luma.core 1.7.2)
Display: ssd1351
Interface: spi
Dimensions: 128 x 128
------------------------------------------------------------
#### iter =   2945: render time = 43.67 ms, frame rate = 22.87 FPS

Thanks in advance!

@rm-hull
Copy link
Owner Author

rm-hull commented Apr 12, 2018

  • Double check your wiring
  • Paste close-up pics of the front and back of the oled display board as a comment here

@ayhlai
Copy link

ayhlai commented Apr 14, 2018

Thanks for your reply. I have double checked my wiring again and it looks correct.
I have also tried

  • a brand new Raspbian installation
  • on both Pi 3 and Pi 3 B+.
  • 2 displays I have , both using SSD1351

Wiring

OLED Pin OLED Name RPi Pin RPi Function Remarks
1 GND P01-20 GND Ground
2 VCC P01-17 3V3 +3.3V Power
3 SCL P01-23 GPIO 11 (SCLK) Serial Clock
4 SDA P01-19 GPIO 10 (MOSI) Serial Data
5 RES P01-18 GPIO 24 Reset
6 DC P01-22 GPIO 25 Data/Command
7 CS P01-24 GPIO 8 (CE0) Chip Select

All yield same results - no errors, nothing on screen. It happens on both of my SSD1351.
Also, ssd1306 i2c display works without issue.

Here are some photos (both display were tested):

image

image

image

Any suggestions of how to debug? thanks very much.

@thijstriemstra
Copy link
Collaborator

thijstriemstra commented Apr 14, 2018

@ayhlai can you open a new ticket for this? thanks for the detailed bug reports. cc @rm-hull maybe we should lock these feature tickets once they landed so people cannot add to these reports and are forced to open a new one.

@rm-hull
Copy link
Owner Author

rm-hull commented Apr 15, 2018

@thijstriemstra good idea

@ayhlai please create a new issue and we'll try to help you. When you do create it, please also include the command line you used to start the python script and any output it may have shown. If it was one of your own programs, please include that too. Thanks.

@rm-hull
Copy link
Owner Author

rm-hull commented Apr 15, 2018

^ apologies, I saw from your previous comments it is the perfloop program you running

@thijstriemstra
Copy link
Collaborator

thijstriemstra commented Apr 18, 2018

@thijstriemstra good idea

Can you give me these github permissions, seems I'm not able to lock issues right now.

@ayhlai please create a new issue and we'll try to help you.

See #205

@rm-hull
Copy link
Owner Author

rm-hull commented Apr 18, 2018

@thijstriemstra do you know where/what setting I need to change? I can't spot anything obvious.

@thijstriemstra
Copy link
Collaborator

@rm-hull at the bottom

screenshot from 2018-04-18 17-46-29

Repository owner locked as resolved and limited conversation to collaborators Apr 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants