-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
WIP: IL3829 e-Paper/e-Ink display driver #11078
Conversation
We have a board here (PHYTEC's reel board, see #11096 ) that uses the SSD1673. Looking at the datasheet, they are so similar that it is almost the same chip. They even seem to have the same command. I could try it here, but first take a look at the SSD1673 just in case, I would not want the only reel we have here to catch fire (and even less @haukepetersen) |
Just a thought: did you consider to also port the driver to the |
Mmmm, looking at u8g8, there was an attempt at adding it. It seems u8g2 is not really suited for E-paper (at least according to its author.) However....
EDIT: oops, github misled me. It said the code was mostly C but looking closer it's C++. |
It's close, but not compatible: all commands for the Y counters/area are a single byte instead of two. This is because the SSD1673 is a 150x250 controller, and the IL3829 200x300. From the datasheet it also looks like the waveform lookup table (LUT) should be different, but the implementation for the Zephyr project has definitions that match the ones in this driver. Looking at some other implementations there seem to be some different LUTs floating around, so there is something to say for making this configurable. I'm not entirely sure how much that matters, but I will investigate once I have received the second display. Also: the SSD1607 does seem to be identical, and there are probably others.
No, but if I have some time I can take a look. As noted by @jcarrano, is seems e-paper is not the main target for the library. It does have some support (according to the reference), but lacks partial updates.
The display seems to have a SSD1606, which also uses a single byte for the Y values. Additionally, the size of the LUT for this display is 90 bytes instead of 30. At first glance it looks to be pretty much identical otherwise. At this point it looks like it may be a good idea to start reworking this to support generic monochrome e-paper displays. |
Hi, I tried to test your driver using
-> so I reduced X and Y to 200, but I got anothers errors like:
-> I did some google searches and it might be gcc issue |
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x03, 0xff, 0xff, 0xf0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, | ||
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x03, 0xff, 0xff, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, | ||
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x0f, 0xff, 0xff, 0xf8, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, | ||
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0xf8, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we include this in driver? I am not sure. Should be in the example- and test-code, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I like having RIOT logos in RIOT for people to include. This driver is probably not the best place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@silkeh But I would make it optional, to save the storage.
ifneq (,$(filter il3829,$(USEMODULE))) | ||
FEATURES_REQUIRED += periph_spi | ||
FEATURES_REQUIRED += periph_gpio | ||
USEMODULE += spi_display |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we call it spi_epd, spi_epaper_display or something similar? spi_display is generic. This could also be an OLED or LCD. What do you think @aabadie ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spi_display
was very generic (and pretty useless), I have now reworked it to epd_bw_spi
for the specific class of displays. See #12509.
I would consider to support multi color as well. At least white/black/red or yellow. The generic spi_display is a good approach, I think. As said in another comment, I would rename it. |
|
||
void il3829_display_init(il3829_t *dev) | ||
{ | ||
uint16_t y_data[2] = { 0 }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The factory firmware of good-display pulls the RST pin down and up here. I would use this here too. The wake up function would make sense here then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while (1) { | ||
/* Set both RAM buffers to the RIOT logo */ | ||
draw_riot(&dev); | ||
draw_riot(&dev); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific reason to do this two times?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, to set all two RAM buffer to the RIOT logo.
void spi_display_wait(spi_display_params_t *p, uint32_t usec) | ||
{ | ||
if (p->busy_pin != GPIO_UNDEF) { | ||
while (gpio_read(p->busy_pin)) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should change this. The IL0373 is active low on BUSY, while the IL3829 is active high.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closed in favour of #12509, which implements a more generic driver. |
There are a lot of differences between these classes of displays. I am willing to work on this, but I need a display (and time) first. Let's make b/w first! |
Contribution description
This PR adds a driver for the IL3829 e-Paper display driver.
This driver is commonly used in 1.54 inch black and white e-Paper displays like this one.
The PR is currently WIP because of some things need to be looked up/tested (labelled with TODO in the code).
Highlights:
A common SPI display driver. This contains parts I believe to be common to most SPI displays, like the one in ili9341: Initial import of ili9341 LCD driver #9948. Let me know if I should create a separate PR with this (and if it's a good idea at all).
IL3829 display driver. This still needs some testing, because the module I currently own does not have the busy or reset pin available (this one is on the way, though).
Header files containing RIOT logos. These were generated using png2c.
Some questions:
Tests for the display driver. A video with the full test can be found here.
The API of this driver is similar to the one from ili9341: Initial import of ili9341 LCD driver #9948. The major difference is that the
x2
,y2
arguments are the coordinate of the corner, not the pixel in the corner. See this discussion.Testing procedure
A test program is included (
tests/driver_il3829
).Modify the makefile for a microcontroller/display combination you have and go for it.
This test will probably be updated when I have a display with the busy and reset pins (in a few weeks).
Issues/PRs references
none