GxEPD2 - Waveshare 9.7 inch HAT

Hello, I have been spending some time with GxEPD2 recently. First I would like to thank to @ZinggJM for his massive contribution to the eink community.
I wonder if I could add a new display Waveshare 9.7 inch HAT to the selection. Since three displays working with IT8951 are already covered I find it possible. There already was a topic that asked the same question GxEPD2 with Waveshare 9.7inches e-ink display. The three display classes are almost identical. The main difference I noticed are in attributes in .h file. How do I determine these values? Are they part of any documentation or they are based on testing the specific display itself?

In GxEPD2_it103_1872x1404.h for instance:

    static const uint16_t reset_to_ready_time = 1800; // ms, e.g. 1729001us
    static const uint16_t power_on_time = 10; // ms, e.g. 3001us
    static const uint16_t power_off_time = 250; // ms, e.g. 214001us
    static const uint16_t full_refresh_time = 850; // ms, e.g. 827000us
    static const uint16_t partial_refresh_time = 300; // ms, e.g. 284000us
    static const uint16_t refresh_cmd_time = 10; // ms, e.g. 6052us
    static const uint16_t refresh_par_time = 2; // ms, e.g. 1921us
    static const uint16_t default_wait_time = 1; // ms, default busy check, needed?
    static const uint16_t diag_min_time = 3; // ms, e.g. > refresh_par_time
    static const uint16_t set_vcom_time = 500; // ms, e.g. 454967us

Are there any other issues I should be concerned about when adding a new display?

Thank you for an answer.

Hi @pansimi ,

Yes, all relevant parameters for the panels it is configured for are programmed into the matching IT8951 HAT. Except for the base address of the internal controller memory used for buffering the display content; this may need to be adapted.

The parameters you listed are replacement values for BUSY delays, in case the BUSY line is not connected. Except for the diag_min_time, which controls what busy times should be reported, if diagnostics are enabled. The parameter values are adapted to the BUSY times reported.

Keep in mind that I don't merge pull requests, especially for displays that I don't have and can't test with.
-jz-

So if I understand correctly, these variables become irrelevant if the BUSY wire is connected. You mentioned base address of the internal controller memory. Where is it defined in the code?

This sequence? :

#define SYS_REG_BASE 0x0000
#define I80CPCR (SYS_REG_BASE + 0x04)
#define MCSR_BASE_ADDR 0x0200
#define LISAR (MCSR_BASE_ADDR + 0x0008)

I suppose that the address is mentioned in the datasheet. IT8951 Specification

Thank you.

This is the address of the parameter I had in mind. But in the driver code, that parameter is only read, never written. So it looks like my memory played a trick on me.
Most likely it relates to the Good Display DESP32T board instead, where RAM is also at limit.
-jz-

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.