Document 4.2" V2 driver.

pull/70/head
Peter Hinch 2024-07-13 15:31:31 +01:00
rodzic 8ad08bdf41
commit e585e5f718
4 zmienionych plików z 36 dodań i 9 usunięć

Wyświetl plik

@ -77,6 +77,7 @@ access via the `Writer` and `CWriter` classes is documented
     5.3.3 [Events](./DRIVERS.md#533-events)      5.3.3 [Events](./DRIVERS.md#533-events)
     5.3.4 [Public bound variables](./DRIVERS.md#534-public-bound-variables)      5.3.4 [Public bound variables](./DRIVERS.md#534-public-bound-variables)
     5.3.5 [The Greyscale Driver](./DRIVERS.md#535-the-greyscale-driver)      5.3.5 [The Greyscale Driver](./DRIVERS.md#535-the-greyscale-driver)
     5.3.6 [Current consumption](./DRIVERS.md#536-current-consumption)
6. [EPD Asynchronous support](./DRIVERS.md#6-epd-asynchronous-support) 6. [EPD Asynchronous support](./DRIVERS.md#6-epd-asynchronous-support)
7. [Writing device drivers](./DRIVERS.md#7-writing-device-drivers) 7. [Writing device drivers](./DRIVERS.md#7-writing-device-drivers)
8. [Links](./DRIVERS.md#8-links) 8. [Links](./DRIVERS.md#8-links)
@ -1378,13 +1379,28 @@ before issuing another refresh.
## 5.3 Waveshare 400x300 Pi Pico display ## 5.3 Waveshare 400x300 Pi Pico display
There are two drivers for this display: This display has excellent support for partial updates which are fast, visually
unobtrusive updates. They have the drawback of "ghosting" where the remnants of
the previous image is visible. At any time a full update may be performed which
removes all trace of ghosting. This model of display has low levels of ghosting
and thus is supported by micro-gui. The model supports hosts other than the Pico
via a supplied cable.
Two versions of this display exist. They require different drivers. The type of
a board may be distinguished as below, with the V2 board being the rightmost
image:
![Image](images/V1_EPD.JPG) ![Image](images/V2_EPD.JPG)
There are two drivers for the V1 display:
1. `pico_epaper_42.py` 1-bit black/white driver supports partial updates. 1. `pico_epaper_42.py` 1-bit black/white driver supports partial updates.
2. `pico_epaper_42_gs.py` 2-bit greyscale driver. No partial updates. 2. `pico_epaper_42_gs.py` 2-bit greyscale driver. No partial updates.
Currently the V2 display has only a 1-bit driver, contributed by Michael
Surdouski. It supports partial updates.
1. `pico_epaper_42_v2.py`
The drivers have identical args and methods. All drivers have identical args and methods.
This 4.2" display supports a Pi Pico or Pico W plugged into the rear of the The 4.2" displays support a Pi Pico or Pico W plugged into the rear of the
unit. Alternatively it can be connected to any other host using the supplied unit. Alternatively it can be connected to any other host using the supplied
cable. With a Pico variant the `color_setup` file is very simple: cable. With a Pico variant the `color_setup` file is very simple:
```python ```python
@ -1415,9 +1431,9 @@ All methods are synchronous.
* `init` No args. Issues a hardware reset and initialises the hardware. This * `init` No args. Issues a hardware reset and initialises the hardware. This
is called by the constructor. It needs to explicitly be called to exit from a is called by the constructor. It needs to explicitly be called to exit from a
deep sleep. deep sleep.
* `sleep` No args. Puts the display into deep sleep. If called while a refresh * `sleep` No args. Puts the display into deep sleep. `sleep` should be called
is in progress it will block until the refresh is complete. `sleep` should be before a power down to avoid leaving the display in an abnormal state. See note
called before a power down to avoid leaving the display in an abnormal state. on current consumption.
* `ready` No args. After issuing a `refresh` the device will become busy for * `ready` No args. After issuing a `refresh` the device will become busy for
a period: `ready` status should be checked before issuing `refresh`. a period: `ready` status should be checked before issuing `refresh`.
* `wait_until_ready` No args. Pause until the device is ready. * `wait_until_ready` No args. Pause until the device is ready.
@ -1428,9 +1444,6 @@ On the 1-bit driver, after issuing `set_partial()`, subsequent updates will be
partial. Normal updates are restored by issuing `set_full()`. These methods partial. Normal updates are restored by issuing `set_full()`. These methods
should not be issued while an update is in progress. should not be issued while an update is in progress.
Partial updates are fast and visually unobtrusive but they are prone to
ghosting.
### 5.3.3 Events ### 5.3.3 Events
These provide synchronisation in asynchronous applications. They are only These provide synchronisation in asynchronous applications. They are only
@ -1482,6 +1495,17 @@ refresh(ssd)
``` ```
Color values of 0 (white) to 3 (black) can explicitly be specified. Color values of 0 (white) to 3 (black) can explicitly be specified.
### 5.3.6 Current consumption
This was measured on a V2 display.
* ~5mA while doing a full update.
* ~1.2mA while running the micro-gui epaper.py demo. This performs continuous
partial updates.
* 92μA while inactive.
* 92μA after running `.sleep`.
Conclusion: there is no reason to call `.sleep` other than in preparation for a
shutdown.
###### [Contents](./DRIVERS.md#contents) ###### [Contents](./DRIVERS.md#contents)
## 5.4 WeAct Studio SSD1680 eInk Displays ## 5.4 WeAct Studio SSD1680 eInk Displays

Wyświetl plik

@ -212,6 +212,9 @@ ssd.blit(fb, col, row) # blit to a given location
Until this issue is resolved a frozen Python image may be blitted to all or part Until this issue is resolved a frozen Python image may be blitted to all or part
of the screen with this code: of the screen with this code:
```py ```py
from framebuf import RGB565, GS4_HMSB, GS8
size = {RGB565: 2, GS4_HMSB: 0, GS8: 1}
def blit(ssd, img, row=0, col=0): def blit(ssd, img, row=0, col=0):
def scale(x, sz): def scale(x, sz):
return x * sz if sz else x // 2 return x * sz if sz else x // 2

BIN
images/V1_EPD.JPG 100644

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 135 KiB

BIN
images/V2_EPD.JPG 100644

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 129 KiB