Large fonts - Writer library with Waveshare 1.5 inch B&W OLED display (128x128) #9815
Replies: 8 comments 12 replies
-
So far as I can tell Waveshare don't support MicroPython for this display. There is this driver from Mike Causer, however it would need a little adaptation to work with As a very general hint for anyone else reading this, the easy way to do this kind of thing is first to define your requirements. Then to select the high level graphics code you want to use (Writer, nano-gui, LVGL or whatever). Then to choose a display which meets requirements and is supported by the software. This avoids getting into realms of writing or adapting display drivers. |
Beta Was this translation helpful? Give feedback.
-
There is every chance your SSD1351 device will work It is worth noting that because a display uses the same driver as a supported unit, and has the same resolution, it is still not guaranteed to work out of the box. That is because there can be different ways for the board manufacturer to wire the controller to the display, necessitating changes to the configuration. However I don't think I've come across this with the SSD1351. There is a simple test described here. If it passes this, you can be highly confident that it will work with all my libraries. |
Beta Was this translation helpful? Give feedback.
-
Okay, thanks Peter, I’ll have a look when I get home this evening.
…--REPLY above this line to respond--
Philip Adamson
Managing Director
OutSource IT Limited<http://www.outsource.co.nz>
NOTICE: This e-mail message is the property of the sender. The contents of this message and any attachments are confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail message by anyone else is unauthorized. If you are not an intended recipient (or responsible for delivery of the message to such person), any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. In such a case, please forward this e-mail message to the sender and delete the message and its attachments from your computer.
From: Peter Hinch ***@***.***>
Sent: Monday, 7 November 2022 12:54 am
To: micropython/micropython ***@***.***>
Cc: Philip Adamson ***@***.***>; Mention ***@***.***>
Subject: Re: [micropython/micropython] Large fonts - Writer library with Waveshare 1.5 inch B&W OLED display (128x128) (Discussion #9815)
Thank you. There is a small issue.
This is our first greyscale chip and my docs were unclear on the subject of 4-bit drivers. Existing 4-bit drivers map a set of 16 colors onto 4-bit indices into a LUT which is expanded, typically to RGB565, at runtime. This conserves RAM on large displays. This chip supports 4-bit colors natively so there is no need for a LUT.
However there is a need for a static RGB method which maps 24 bit (r, g, b) values onto 4-bit greyscale. The adapted driver<https://github.com/peterhinch/micropython-nano-gui/blob/master/drivers/ssd1327/ssd1327.py> has this. The sample code here<https://github.com/peterhinch/micropython-font-to-py/blob/master/writer/WRITER.md#23-example-color-code> could be adapted to run. As written RED and GREEN will both show full intensity but reducing the luminance should now work, e.g.
RED = SSD.rgb(63,0,0) # 25% luminance
Perhaps you could verify that this works.
The docs are now updated to support this driver. I've also clarified this section<https://github.com/peterhinch/micropython-nano-gui/blob/master/DRIVERS.md#72-color-and-color-compatible-drivers> to describe greyscale drivers.
All comments on code or docs are welcome.
—
Reply to this email directly, view it on GitHub<#9815 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A352NS3LKTFYJFF5DF324TLWG6L4VANCNFSM6AAAAAARUU67JQ>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
Sorry about the delay – yes, that works.
Both drivers are quite slow to update… I guess that’s just the amount of data going across the I2C.
From: Peter Hinch ***@***.***>
Sent: Monday, 7 November 2022 12:54 am
To: micropython/micropython ***@***.***>
Cc: Philip Adamson ***@***.***>; Mention ***@***.***>
Subject: Re: [micropython/micropython] Large fonts - Writer library with Waveshare 1.5 inch B&W OLED display (128x128) (Discussion #9815)
Thank you. There is a small issue.
This is our first greyscale chip and my docs were unclear on the subject of 4-bit drivers. Existing 4-bit drivers map a set of 16 colors onto 4-bit indices into a LUT which is expanded, typically to RGB565, at runtime. This conserves RAM on large displays. This chip supports 4-bit colors natively so there is no need for a LUT.
However there is a need for a static RGB method which maps 24 bit (r, g, b) values onto 4-bit greyscale. The adapted driver<https://github.com/peterhinch/micropython-nano-gui/blob/master/drivers/ssd1327/ssd1327.py> has this. The sample code here<https://github.com/peterhinch/micropython-font-to-py/blob/master/writer/WRITER.md#23-example-color-code> could be adapted to run. As written RED and GREEN will both show full intensity but reducing the luminance should now work, e.g.
RED = SSD.rgb(63,0,0) # 25% luminance
Perhaps you could verify that this works.
The docs are now updated to support this driver. I've also clarified this section<https://github.com/peterhinch/micropython-nano-gui/blob/master/DRIVERS.md#72-color-and-color-compatible-drivers> to describe greyscale drivers.
All comments on code or docs are welcome.
—
Reply to this email directly, view it on GitHub<#9815 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A352NS3LKTFYJFF5DF324TLWG6L4VANCNFSM6AAAAAARUU67JQ>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
…--REPLY above this line to respond--
Philip Adamson
Managing Director
OutSource IT Limited<http://www.outsource.co.nz>
NOTICE: This e-mail message is the property of the sender. The contents of this message and any attachments are confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail message by anyone else is unauthorized. If you are not an intended recipient (or responsible for delivery of the message to such person), any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. In such a case, please forward this e-mail message to the sender and delete the message and its attachments from your computer.
|
Beta Was this translation helpful? Give feedback.
-
I2C is very slow. Most displays use SPI and it's commonplace to run this at 30-60MHz depending on chip specs (at both ends). |
Beta Was this translation helpful? Give feedback.
-
Okay, thanks – I will try it using SPI, the display will do both, I’d just designed the PCB around I2C because I was originally intending to use a different display. It’s only version 1 of the board, I am sure there’ll be other changes as I flesh it out.
Thanks again for your amazing help! I have learned a lot in the past couple of weeks.
From: Peter Hinch ***@***.***>
Sent: Friday, 11 November 2022 9:40 pm
To: micropython/micropython ***@***.***>
Cc: Philip Adamson ***@***.***>; Mention ***@***.***>
Subject: Re: [micropython/micropython] Large fonts - Writer library with Waveshare 1.5 inch B&W OLED display (128x128) (Discussion #9815)
I2C is very slow. Most displays use SPI and it's commonplace to run this at 30-60MHz depending on chip specs (at both ends).
—
Reply to this email directly, view it on GitHub<#9815 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A352NS7YROYGRBTCM6JWNMLWHYA6XANCNFSM6AAAAAARUU67JQ>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
…--REPLY above this line to respond--
Philip Adamson
Managing Director
OutSource IT Limited<http://www.outsource.co.nz>
NOTICE: This e-mail message is the property of the sender. The contents of this message and any attachments are confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail message by anyone else is unauthorized. If you are not an intended recipient (or responsible for delivery of the message to such person), any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. In such a case, please forward this e-mail message to the sender and delete the message and its attachments from your computer.
|
Beta Was this translation helpful? Give feedback.
-
For some reason I thought Mike’s driver had SPI capability as well, but it didn’t, so I have added it and the display is staggeringly fast!
I’ll test it a bit and then upload the code for you.
From: Peter Hinch ***@***.***>
Sent: Friday, 11 November 2022 9:40 pm
To: micropython/micropython ***@***.***>
Cc: Philip Adamson ***@***.***>; Mention ***@***.***>
Subject: Re: [micropython/micropython] Large fonts - Writer library with Waveshare 1.5 inch B&W OLED display (128x128) (Discussion #9815)
I2C is very slow. Most displays use SPI and it's commonplace to run this at 30-60MHz depending on chip specs (at both ends).
—
Reply to this email directly, view it on GitHub<#9815 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A352NS7YROYGRBTCM6JWNMLWHYA6XANCNFSM6AAAAAARUU67JQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
…--REPLY above this line to respond--
Philip Adamson
Managing Director
OutSource IT Limited<http://www.outsource.co.nz>
NOTICE: This e-mail message is the property of the sender. The contents of this message and any attachments are confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail message by anyone else is unauthorized. If you are not an intended recipient (or responsible for delivery of the message to such person), any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. In such a case, please forward this e-mail message to the sender and delete the message and its attachments from your computer.
|
Beta Was this translation helpful? Give feedback.
-
I made sizable font for FrameBuffer: https://github.com/rami6711/fb_plus |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Has anyone found a driver for the Waveshare 128x128 B&W OLED that will work with Writer and allow larger fonts?
Or, if not using Writer, does anyone have another way of getting large fonts working with the SSD1327-based OLED displays?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions