Skip to content

Commit

Permalink
Version 3.0.5
Browse files Browse the repository at this point in the history
- added support for GDEW029T5
- fixed wavetable for GDEW0213I5F
  • Loading branch information
ZinggJM committed Jan 24, 2019
1 parent 6786592 commit 4158f7d
Show file tree
Hide file tree
Showing 12 changed files with 2,403 additions and 96 deletions.
17 changes: 12 additions & 5 deletions ConnectingHardware.md
@@ -1,14 +1,17 @@
# GxEPD
A simple E-Paper display library with common base class and separate IO class for Arduino.

## For SPI e-paper displays from Dalian Good Display
## and SPI e-paper boards from Waveshare
- With full Graphics and Text support using Adafruit_GFX

- For SPI e-paper displays from Dalian Good Display
- and SPI e-paper boards from Waveshare

### important note :
### - these displays are for 3.3V supply and 3.3V data lines
### - never connect data lines directly to 5V Arduino data pins, use e.g. 4k7/10k resistor divider
- these displays are for 3.3V supply and 3.3V data lines
- never connect data lines directly to 5V Arduino data pins, use e.g. 4k7/10k resistor divider
- series resistor only is not enough for reliable operation (back-feed effect through protection diodes)
### - do not forget to connect GND
- 4k7/10k resistor divider may not work with flat cable extensions or Waveshare 4.2 board, use level converter then
- do not forget to connect GND

## mapping suggestions

Expand Down Expand Up @@ -37,6 +40,10 @@ A simple E-Paper display library with common base class and separate IO class fo
#### mapping suggestion for Arduino MEGA
- BUSY -> 7, RST -> 9, DC -> 8, CS-> 53, CLK -> 52, DIN -> 51

#### mapping suggestion for Arduino DUE
- BUSY -> 7, RST -> 9, DC -> 8, CS-> 77, CLK -> 76, DIN -> 75
- SPI pins are on 6 pin 2x3 SPI header

## connection scheme for (discontinued) DESTM32-S2 connection board for e-paper panels:

```
Expand Down
Binary file modified MyEPDs_UpdateInfos.pdf
Binary file not shown.
14 changes: 10 additions & 4 deletions README.md
Expand Up @@ -5,10 +5,11 @@ A simple E-Paper display library with common base class and separate IO class fo
## and SPI e-paper boards from Waveshare

### important note :
### - these displays are for 3.3V supply and 3.3V data lines
### - never connect data lines directly to 5V Arduino data pins, use e.g. 4k7/10k resistor divider
- these displays are for 3.3V supply and 3.3V data lines
- never connect data lines directly to 5V Arduino data pins, use e.g. 4k7/10k resistor divider
- series resistor only is not enough for reliable operation (back-feed effect through protection diodes)
### - do not forget to connect GND
- 4k7/10k resistor divider may not work with flat cable extensions or Waveshare 4.2 board, use level converter then
- do not forget to connect GND

### Paged Drawing, Picture Loop for AVR
- This library uses paged drawing to cope with RAM restriction and missing single pixel update support
Expand All @@ -33,8 +34,10 @@ A simple E-Paper display library with common base class and separate IO class fo
- GDEW0154Z04 1.54" b/w/r 200x200
- GDEW0154Z17 1.54" b/w/r 152x152
- GDE0213B1 2.13" b/w
- GDEW0213I5F 2.13" b/w flexible
- GDEW0213Z16 2.13" b/w/r
- GDEH029A1 2.9" b/w
- GDEW029T5 2.9" b/w
- GDEW029Z10 2.9" b/w/r
- GDEW027C44 2.7" b/w/r
- GDEW027W3 2.7" b/w
Expand All @@ -52,7 +55,10 @@ A simple E-Paper display library with common base class and separate IO class fo
### for pin mapping suggestions see ConnectingHardware.md


### Version 3.0.4
### Version 3.0.5
- added support for GDEW029T5
- fixed wavetable for GDEW0213I5F
#### Version 3.0.4
- GxGDEW027W3 with fast partial update support, based on new demo code wavetable
- mapping suggestion added for Arduino MEGA
- NOTE: use voltage divider resistors for 5V Arduinos, series resistor is not reliable enough
Expand Down
24 changes: 23 additions & 1 deletion examples/GxEPD_Example/GxEPD_Example.ino
Expand Up @@ -34,6 +34,10 @@
// mapping suggestion for Arduino MEGA
// BUSY -> 7, RST -> 9, DC -> 8, CS-> 53, CLK -> 52, DIN -> 51

// mapping suggestion for Arduino DUE
// BUSY -> 7, RST -> 9, DC -> 8, CS-> 77, CLK -> 76, DIN -> 75
// SPI pins are also on 6 pin 2x3 SPI header

// include library, include base class, make path known
#include <GxEPD.h>

Expand All @@ -45,6 +49,7 @@
//#include <GxGDE0213B1/GxGDE0213B1.h> // 2.13" b/w
//#include <GxGDEW0213Z16/GxGDEW0213Z16.h> // 2.13" b/w/r
//#include <GxGDEH029A1/GxGDEH029A1.h> // 2.9" b/w
//#include <GxGDEW029T5/GxGDEW029T5.h> // 2.9" b/w IL0373
//#include <GxGDEW029Z10/GxGDEW029Z10.h> // 2.9" b/w/r
//#include <GxGDEW027C44/GxGDEW027C44.h> // 2.7" b/w/r
//#include <GxGDEW027W3/GxGDEW027W3.h> // 2.7" b/w
Expand Down Expand Up @@ -157,7 +162,7 @@ void loop()
showBitmapExample();
delay(2000);
#if !defined(__AVR)
drawCornerTest();
//drawCornerTest();
showFont("FreeMonoBold9pt7b", &FreeMonoBold9pt7b);
showFont("FreeMonoBold12pt7b", &FreeMonoBold12pt7b);
//showFont("FreeMonoBold18pt7b", &FreeMonoBold18pt7b);
Expand Down Expand Up @@ -292,6 +297,23 @@ void showBitmapExample()
}
#endif

#if defined(_GxGDEW029T5_H_)
void showBitmapExample()
{
display.drawExampleBitmap(BitmapExample1, sizeof(BitmapExample1));
delay(2000);
display.drawExampleBitmap(BitmapExample2, sizeof(BitmapExample2));
delay(5000);
display.drawExampleBitmap(BitmapExample3, sizeof(BitmapExample3));
delay(5000);
display.fillScreen(GxEPD_WHITE);
display.drawExampleBitmap(BitmapExample1, 0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, GxEPD_BLACK);
display.update();
delay(5000);
// showBoat();
}
#endif

#if defined(_GxGDEW029Z10_H_)
#define HAS_RED_COLOR
void showBitmapExample()
Expand Down
5 changes: 5 additions & 0 deletions examples/PartialUpdateExample/PartialUpdateExample.ino
Expand Up @@ -30,6 +30,10 @@
// mapping suggestion for Arduino MEGA
// BUSY -> 7, RST -> 9, DC -> 8, CS-> 53, CLK -> 52, DIN -> 51

// mapping suggestion for Arduino DUE
// BUSY -> 7, RST -> 9, DC -> 8, CS-> 77, CLK -> 76, DIN -> 75
// SPI pins are also on 6 pin 2x3 SPI header

// include library, include base class, make path known
#include <GxEPD.h>

Expand All @@ -38,6 +42,7 @@
//#include <GxGDEW0213I5F/GxGDEW0213I5F.h> // 2.13" b/w 104x212 flexible
//#include <GxGDE0213B1/GxGDE0213B1.h> // 2.13" b/w
//#include <GxGDEH029A1/GxGDEH029A1.h> // 2.9" b/w
//#include <GxGDEW029T5/GxGDEW029T5.h> // 2.9" b/w IL0373
//#include <GxGDEW027W3/GxGDEW027W3.h> // 2.7" b/w
//#include <GxGDEW042T2/GxGDEW042T2.h> // 4.2" b/w
// these displays do not fully support partial update
Expand Down
2 changes: 1 addition & 1 deletion library.properties
@@ -1,5 +1,5 @@
name=GxEPD
version=3.0.4
version=3.0.5
author=Jean-Marc Zingg
maintainer=Jean-Marc Zingg
sentence=Display Library for SPI e-paper panels from Dalian Good Display and boards from Waveshare.
Expand Down
188 changes: 104 additions & 84 deletions src/GxGDEW0213I5F/GxGDEW0213I5F.cpp
@@ -1,7 +1,7 @@
// class GxGDEW0213I5F : Display class for GDEW0213I5F e-Paper from Dalian Good Display Co., Ltd.: http://www.e-paper-display.com/products_detail/productId=397.html
//
// based on Demo Example from Good Display, available here: http://www.e-paper-display.com/download_detail/downloadsId=597.html
// Controller: IL0373 : http://www.good-display.com/download_detail/downloadsId=535.html
// Controller: IL0373 : http://www.e-paper-display.com/download_detail/downloadsId=535.html
//
// Author : J-M Zingg
//
Expand All @@ -22,99 +22,119 @@
#endif

//full screen update LUT
const unsigned char GxGDEW0213I5F::lut_20_vcomDC[] = {
0x00 , 0x08 , 0x00 , 0x00 , 0x00 , 0x02,
0x60 , 0x28 , 0x28 , 0x00 , 0x00 , 0x01,
0x00 , 0x14 , 0x00 , 0x00 , 0x00 , 0x01,
0x00 , 0x12 , 0x12 , 0x00 , 0x00 , 0x01,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
, 0x00 , 0x00,
const unsigned char GxGDEW0213I5F::lut_20_vcomDC[] =
{
0x00, 0x08, 0x00, 0x00, 0x00, 0x02,
0x60, 0x28, 0x28, 0x00, 0x00, 0x01,
0x00, 0x14, 0x00, 0x00, 0x00, 0x01,
0x00, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
};
const unsigned char GxGDEW0213I5F::lut_21_ww[] = {
0x40 , 0x08 , 0x00 , 0x00 , 0x00 , 0x02,
0x90 , 0x28 , 0x28 , 0x00 , 0x00 , 0x01,
0x40 , 0x14 , 0x00 , 0x00 , 0x00 , 0x01,
0xA0 , 0x12 , 0x12 , 0x00 , 0x00 , 0x01,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,

const unsigned char GxGDEW0213I5F::lut_21_ww[] =
{
0x40, 0x08, 0x00, 0x00, 0x00, 0x02,
0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
0x40, 0x14, 0x00, 0x00, 0x00, 0x01,
0xA0, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const unsigned char GxGDEW0213I5F::lut_22_bw[] = {
0x40 , 0x17 , 0x00 , 0x00 , 0x00 , 0x02 ,
0x90 , 0x0F , 0x0F , 0x00 , 0x00 , 0x03 ,
0x40 , 0x0A , 0x01 , 0x00 , 0x00 , 0x01 ,
0xA0 , 0x0E , 0x0E , 0x00 , 0x00 , 0x02 ,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,

const unsigned char GxGDEW0213I5F::lut_22_bw[] =
{
0x40, 0x08, 0x00, 0x00, 0x00, 0x02,
0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
0x40, 0x14, 0x00, 0x00, 0x00, 0x01,
0xA0, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const unsigned char GxGDEW0213I5F::lut_23_wb[] = {
0x80 , 0x08 , 0x00 , 0x00 , 0x00 , 0x02,
0x90 , 0x28 , 0x28 , 0x00 , 0x00 , 0x01,
0x80 , 0x14 , 0x00 , 0x00 , 0x00 , 0x01,
0x50 , 0x12 , 0x12 , 0x00 , 0x00 , 0x01,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,

const unsigned char GxGDEW0213I5F::lut_23_wb[] =
{
0x80, 0x08, 0x00, 0x00, 0x00, 0x02,
0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
0x80, 0x14, 0x00, 0x00, 0x00, 0x01,
0x50, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const unsigned char GxGDEW0213I5F::lut_24_bb[] = {
0x80 , 0x08 , 0x00 , 0x00 , 0x00 , 0x02,
0x90 , 0x28 , 0x28 , 0x00 , 0x00 , 0x01,
0x80 , 0x14 , 0x00 , 0x00 , 0x00 , 0x01,
0x50 , 0x12 , 0x12 , 0x00 , 0x00 , 0x01,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,

const unsigned char GxGDEW0213I5F::lut_24_bb[] =
{
0x80, 0x08, 0x00, 0x00, 0x00, 0x02,
0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
0x80, 0x14, 0x00, 0x00, 0x00, 0x01,
0x50, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

//partial screen update LUT
const unsigned char GxGDEW0213I5F::lut_20_vcomDC_partial[] = {
0x00 , 0x19 , 0x01 , 0x00 , 0x00 , 0x01,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
, 0x00 , 0x00,
//#define Tx19 0x19 // original value is 25 (phase length)
#define Tx19 0x28 // new value for test is 40 (phase length)
const unsigned char GxGDEW0213I5F::lut_20_vcomDC_partial[] =
{
0x00, Tx19, 0x01, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
};
const unsigned char GxGDEW0213I5F::lut_21_ww_partial[] = {
0x00 , 0x19 , 0x01 , 0x00 , 0x00 , 0x01,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,

const unsigned char GxGDEW0213I5F::lut_21_ww_partial[] =
{
0x00, Tx19, 0x01, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const unsigned char GxGDEW0213I5F::lut_22_bw_partial[] = {
0x80 , 0x19 , 0x01 , 0x00 , 0x00 , 0x01,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,

const unsigned char GxGDEW0213I5F::lut_22_bw_partial[] =
{
0x80, Tx19, 0x01, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const unsigned char GxGDEW0213I5F::lut_23_wb_partial[] = {
0x40 , 0x19 , 0x01 , 0x00 , 0x00 , 0x01,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,

const unsigned char GxGDEW0213I5F::lut_23_wb_partial[] =
{
0x40, Tx19, 0x01, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const unsigned char GxGDEW0213I5F::lut_24_bb_partial[] = {
0x00 , 0x19 , 0x01 , 0x00 , 0x00 , 0x01,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,

const unsigned char GxGDEW0213I5F::lut_24_bb_partial[] =
{
0x00, Tx19, 0x01, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

// Partial Update Delay, may have an influence on degradation
Expand Down Expand Up @@ -465,7 +485,7 @@ void GxGDEW0213I5F::_waitWhileBusy(const char* comment)
{
if (digitalRead(_busy) == 1) break;
delay(1);
if (micros() - start > 20000000) // >14.9s !
if (micros() - start > 10000000)
{
if (_diag_enabled) Serial.println("Busy Timeout!");
break;
Expand Down
2 changes: 1 addition & 1 deletion src/GxGDEW0213I5F/GxGDEW0213I5F.h
@@ -1,7 +1,7 @@
// class GxGDEW0213I5F : Display class for GDEW0213I5F e-Paper from Dalian Good Display Co., Ltd.: http://www.e-paper-display.com/products_detail/productId=397.html
//
// based on Demo Example from Good Display, available here: http://www.e-paper-display.com/download_detail/downloadsId=597.html
// Controller: IL0373 : http://www.good-display.com/download_detail/downloadsId=535.html
// Controller: IL0373 : http://www.e-paper-display.com/download_detail/downloadsId=535.html
//
// Author : J-M Zingg
//
Expand Down

0 comments on commit 4158f7d

Please sign in to comment.