mcauser / micropython-waveshare-epaper

MicroPython drivers for Waveshare e-paper modules
MIT License
311 stars 79 forks source link

Some eink display have inverted BUSY pin logic #2

Closed hoihu closed 6 years ago

hoihu commented 6 years ago

see for example: https://www.waveshare.com/w/upload/e/e6/2.13inch_e-Paper_Datasheet.pdf

so this line: https://github.com/mcauser/micropython-waveshare-epaper/blob/master/epaper2in13.py#L84 should check for low condition, not high.

I've tested this on my display and it seems to be correct (not a typo in the datasheet)

hoihu commented 6 years ago

@mcauser do you want me to submit a PR for this? I really think it's needed since those displays will not work otherwise...

mcauser commented 6 years ago

Hi @hoihu, thanks for looking into this. I've checked each of the datasheets against the Waveshare wiki and code samples. Here are the results.

In the table below HIGH means when the BUSY pin is HIGH, the chip is doing stuff and should not be interrupted. After a short pause the pin goes LOW, then the device is idle.

For rows marked with LOW, the device is idle when the BUSY pin is HIGH.

Display MicroPython Wiki Datasheet Arduino RasPi Panel
1.54 :warning: HIGH LOW HIGH HIGH HIGH GDEH0154D27
1.54(B) LOW LOW LOW LOW LOW GDEW0154Z04
1.54(C) LOW LOW LOW LOW LOW GDEW0154C39
2.13 :warning: HIGH LOW LOW HIGH HIGH GDEH0213B1
2.13(B) LOW LOW LOW LOW LOW GDEW0213Z16
2.13(C) LOW LOW LOW LOW LOW GDEW0213C38
2.7 LOW LOW LOW LOW LOW GDEW027W3
2.7(B) LOW LOW LOW LOW LOW GDEW027C44
2.9 :warning: HIGH HIGH LOW HIGH HIGH GDEH029A1
2.9(B) LOW LOW LOW LOW LOW GDEW029Z10
2.9(C) LOW LOW LOW LOW LOW GDEW029C32
4.2 LOW LOW LOW LOW LOW GDEW042T2
4.2(B) LOW LOW LOW LOW LOW GDEW042Z15
4.2(C) LOW LOW LOW LOW LOW GDEW042C37
5.83 LOW LOW LOW LOW LOW GDEW0583T7
5.83(B) LOW LOW LOW LOW LOW GDEW0583Z21
5.83(C) LOW LOW LOW LOW LOW GDEW0583C64
7.5 LOW LOW LOW LOW LOW GDEW075T8
7.5(B) LOW LOW LOW LOW LOW GDEW075Z09
7.5(C) LOW LOW LOW LOW LOW GDEW075C21

There are 3 drivers which allegedly are using BUSY=HIGH. 1.54", 2.13" and 2.9".

There is not a lot of consistency between the Waveshare wiki, datasheet and Waveshare code examples.

I have a 1.54" and 2.9", so those are the only panels I can test against.

If your 2.13" works with BUSY=LOW, I'm happy to merge that in. Is your display B/W, B/W/Red or B/W/Yellow?

hoihu commented 6 years ago

Thats a great overview!

i have a 1.54“ b/w/r and a 4.2“ b/w/y - both are using busy= high to indicate quiet operation.

Your referenced wiki links point to datasheets that tell the same - so you might check your table vs the datasheets.

mcauser commented 6 years ago

Fixed in e892649f003f3f6481243c7e742bd9c2b5850e49