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

Lowered contrast when sleeping in epd2in13_v2 (and possibly other EPD's, based on SSD1680) #96

Open
eflukx opened this issue Jan 21, 2022 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@eflukx
Copy link

eflukx commented Jan 21, 2022

I'm adding support for the Good Display GDEY0213B74 (same as GDEQ0213B74) display that I will be using in a project. I used the epd2in13_v2 driver as a base as both seem to be based on a SSD1680 (or similar?) controller.

Among things, I found a problem with my display when sleeping: the image was retained, but at a lower contract (albeit slightly).
The original sleep code included:

        // All sample code enables and disables analog/clocks...
        self.set_display_update_control_2(
            spi,
            DisplayUpdateControl2::new()
                .enable_analog()
                .enable_clock()
                .disable_analog()
                .disable_clock(),
        )?;
        self.command(spi, Command::MasterActivation)?;

        self.set_sleep_mode(spi, self.sleep_mode)?;

After calling Command::MasterActivation immediately the device is sent to sleep by set_sleep_mode, resulting in the lowered contrast image. Adding a self.wait_until_idle() before set_sleep_mode fixes the contrast issue with my display. Possibly (probably?) this is also the case with the Waveshare modules (which look to be Good Display devices slapped onto a PCB with and sold with nondescript names i.e. no mention of the original GD part number)?

Note. The whole DisplayUpdateControl2 and MasterActivation sequence in sleep function seems redundant. I don't really know why this sequence is needed, it is not mentioned in the manual and the comment says it was transferred into this crate as it was part of some other sample code.. What's against just removing this code?

@caemor caemor added bug Something isn't working help wanted Extra attention is needed labels Mar 9, 2022
@caemor
Copy link
Owner

caemor commented Mar 9, 2022

Thanks for the info.

Did you try it out without the DisplayUpdateControl2 and MasterActivation sequence?
I would be happy to remove the sequence in a PR after its tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants