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

Changes to Wireless Paper V1.0 and V1.1 #5

Merged
merged 3 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/GxEPD2.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class GxEPD2
GDEH0213B72, Waveshare_2_13_bw_B72 = GDEH0213B72,
GDEH0213B73, Waveshare_2_13_bw_B73 = GDEH0213B73,
GDEM0213B74, Waveshare_2_13_bw_B74 = GDEM0213B74,
DEPG0213BN, // Heltec Wireless Paper v1.0, backported from GxEPD v1.5.5
GDEM0213FC1,
DEPG0213BN, // Heltec Wireless Paper v1.0, backported from GxEPD v1.5.5
LCMEN2R13EFC1, // Heltec Wireless Paper v1.1, custom
GDEW0213I5F, Waveshare_2_13_flex = GDEW0213I5F,
GDEW0213M21,
GDEW0213T5D,
Expand Down
22 changes: 17 additions & 5 deletions src/epd/GxEPD2_213_BN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,9 @@ void GxEPD2_213_BN::_InitDisplay()
_writeData(0x00);
_writeCommand(0x11); //data entry mode
_writeData(0x03);
_writeCommand(0x3C); //BorderWavefrom
_writeData(0x05);
_writeCommand(0x21); // Display update control
_writeData(0x00);
_writeData(0x80);
_writeCommand(0x18); //Read built-in temperature sensor
_writeData(0x80);
_setPartialRamArea(0, 0, WIDTH, HEIGHT);
_using_partial_mode = false;
_init_display_done = true;
Expand Down Expand Up @@ -385,16 +381,32 @@ const unsigned char GxEPD2_213_BN::lut_partial[] PROGMEM =
0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x0, 0x0, 0x0,
};

void GxEPD2_213_BN::_Init_Full()
{
_InitDisplay();
_writeCommand(0x3C); // Border Waveform
_writeData(0x05);
_writeCommand(0x18); //Read built-in temperature sensor
_writeData(0x80);
_using_partial_mode = false;
}


void GxEPD2_213_BN::_Init_Part()
{
_InitDisplay();
_writeCommand(0x3C); // Border Waveform
_writeData(0xC0); // Floating (less noise-accumulation?)
Copy link
Author

@todd-herbert todd-herbert Mar 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note border waveform change to 0xC0 - "Hi-Z".
Previous value was 0x05 - "Follow LUT".
This change seems to prevent "static" accumulating on the display border, during fast-refresh.
It would be good to get confirmation that this change is safe and appropriate.

_writeCommand(0x18); //Read built-in temperature sensor
_writeData(0x80);
_writeCommand(0x32);
_writeDataPGM(lut_partial, sizeof(lut_partial));
_using_partial_mode = true;
}

void GxEPD2_213_BN::_Update_Full()
{
_using_partial_mode = false;
if (_using_partial_mode) _Init_Full();
_PowerOn();
_writeCommand(0x22);
_writeData(0xf4);
Expand Down
2 changes: 1 addition & 1 deletion src/epd/GxEPD2_213_BN.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class GxEPD2_213_BN : public GxEPD2_EPD
static const bool hasFastPartialUpdate = true;
static const uint16_t power_on_time = 100; // ms, e.g. 95868us
static const uint16_t power_off_time = 250; // ms, e.g. 140350us
static const uint16_t full_refresh_time = 8100; // ms, e.g. 4011934us
static const uint16_t full_refresh_time = 4100; // ms, e.g. 4011934us
static const uint16_t partial_refresh_time = 750; // ms, e.g. 736721us
// constructor
GxEPD2_213_BN(int16_t cs, int16_t dc, int16_t rst, int16_t busy, SPIClass &spi);
Expand Down
Loading