Hi All,
I'm trying to figure out how to determine which eInk display is hooked up to my microprocessor. -- Adafruit's 1.54" eInk display recently switched over to a different driver which is incompatible with the previous one.
I've got code to run each type now and both types are working fine in my project, but I don't know how, from code, to tell which display is hooked up. Currently, I need a different firmware load for each type...
Since I have a mix of displays I want to use, this is going to make firmware upgrades pretty tricky since the two displays look identical once on a PCB...
My first post on this is here: viewtopic.php?f=19&t=181922
Many thanks for your help!
Regards,
John
Determining Version of eInk Display
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Determining Version of eInk Display
John,
I see your issue.
Looking at the SSD1681 driver the eInk displays do not appear to have any query ability with our current CircuitPython driver. Had this been an i2c device we could potentially have different addresses, but being SPI we do not have that luxury.
https://github.com/adafruit/Adafruit_Ci ... on_SSD1681
Are you using CircuitPython or Arduino?
I see your issue.
Looking at the SSD1681 driver the eInk displays do not appear to have any query ability with our current CircuitPython driver. Had this been an i2c device we could potentially have different addresses, but being SPI we do not have that luxury.
https://github.com/adafruit/Adafruit_Ci ... on_SSD1681
Are you using CircuitPython or Arduino?
- jmprice50
- Posts: 19
- Joined: Sat Dec 19, 2020 1:25 pm
Re: Determining Version of eInk Display
Hi Mike,
Thanks for the response.
My collaborators at Southern Utah University are running into the same issue.
Recent orders of the 1.54" displays are coming in with a mix of types...
We've already cut PCBs for our design and don't want to have to spin the board to add a jumper at assembly just so we can tell which display we're using.
I'm using the Adafruit Arduino Library and Jean-Paul Zinng's GxEPD2 library in C++. (For partial updates)
I'll check out your GitHub repo and see what I can find.
Regards,
John
Thanks for the response.
My collaborators at Southern Utah University are running into the same issue.
Recent orders of the 1.54" displays are coming in with a mix of types...
We've already cut PCBs for our design and don't want to have to spin the board to add a jumper at assembly just so we can tell which display we're using.
I'm using the Adafruit Arduino Library and Jean-Paul Zinng's GxEPD2 library in C++. (For partial updates)
I'll check out your GitHub repo and see what I can find.
Regards,
John
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Determining Version of eInk Display
this is a very annoying thing about eink displays, we try as hard as possible to not change chipsets but eventually we simply cannot get the displays with the original chipset. and there's no way to 'read' the type either
the display packaging *not pcb* has a revision and a name change but there's no visual way to know which
the display packaging *not pcb* has a revision and a name change but there's no visual way to know which
- jmprice50
- Posts: 19
- Joined: Sat Dec 19, 2020 1:25 pm
Re: Determining Version of eInk Display
Ok, then... My device has persistent storage. (SD card on the display)
At boot, I could read a little configuration file written when we assemble the board to know which display was used at manufacture.
Once I know this, in principle, I should be able to branch my code at run time to configure the right display.
However, the libraries seem to require the display be selected at compile time. Am I mistaken here?
For example commenting and uncommenting the lines below allow me to use a variable named 'display' that I can use for either display types:
What's the recommended strategy for doing this sort of selection at run time?
At boot, I could read a little configuration file written when we assemble the board to know which display was used at manufacture.
Once I know this, in principle, I should be able to branch my code at run time to configure the right display.
However, the libraries seem to require the display be selected at compile time. Am I mistaken here?
For example commenting and uncommenting the lines below allow me to use a variable named 'display' that I can use for either display types:
Code: Select all
// Just grabbed the constructors we need from GxEPD2_display_selection.h header and copied here.
// ADAFRUIT 1.54" ePaper Display. SSD1608
GxEPD2_BW<GxEPD2_154, GxEPD2_154::HEIGHT> display(GxEPD2_154(/*CS=5*/ EPD_CS, /*DC=*/ EPD_DC, /*RST=*/ EPD_RESET, /*BUSY=*/ EPD_BUSY)); // GDEH0154D67
// ADAFRUIT 1.54" ePaper Display. SSD1681
// GxEPD2_BW<GxEPD2_154_D67, GxEPD2_154_D67::HEIGHT> display(GxEPD2_154_D67(/*CS=5*/ EPD_CS, /*DC=*/ EPD_DC, /*RST=*/ EPD_RESET, /*BUSY=*/ EPD_BUSY)); // GDEW0154M09 200x200
//******************************************************************************************
// This works for either display type.
//******************************************************************************************
void initDisplay()
{
display.init(0);
display.setRotation(3);
display.setTextSize(2);
display.setTextColor(GxEPD_BLACK);
display.fillScreen(GxEPD_WHITE);
return;
}
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Determining Version of eInk Display
we've never used GxEPD - so not sure how to do it for templated libraries. could create both and then have a different pointer that either references one or other other, that can be done at runtime, check with your C++ programming lead for how to do that.
- jmprice50
- Posts: 19
- Joined: Sat Dec 19, 2020 1:25 pm
Re: Determining Version of eInk Display
Thanks.
Would this be easier with Adafruit's Arduino libraries? -- I'd switched pretty early on over to GxEPD2 when I discovered the partial update support on the 1.54" display was not supported for the boards I'd been receiving...
Would this be easier with Adafruit's Arduino libraries? -- I'd switched pretty early on over to GxEPD2 when I discovered the partial update support on the 1.54" display was not supported for the boards I'd been receiving...
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Determining Version of eInk Display
either way you need to instantiate both and then use a pointer to select which one you want to use before calling begin()
- jmprice50
- Posts: 19
- Joined: Sat Dec 19, 2020 1:25 pm
Re: Determining Version of eInk Display
Thanks for your response. I'll explore the pointer approach.
BTW-- I know this is a bit off-topic, but I notice on the web site that this product is down to 3 in stock.
Who is the right person to get in touch with re: pricing / availability for c.a. 100 units?
Thanks!
BTW-- I know this is a bit off-topic, but I notice on the web site that this product is down to 3 in stock.
Who is the right person to get in touch with re: pricing / availability for c.a. 100 units?
Thanks!
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Please be positive and constructive with your questions and comments.