Skip to content

Commit

Permalink
Timing adjustments to increase stability
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Poser authored and Robert Poser committed Mar 4, 2018
1 parent 6f0aa5f commit 821f977
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=PL_microEPD
version=1.1.01
version=1.1.02
author=Robert Poser <[email protected]>
maintainer=Robert Poser <[email protected]>
license=BSD-3-clause
Expand Down
10 changes: 6 additions & 4 deletions src/PL_microEPD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ void PL_microEPD::begin(bool whiteErase) {

if (rst!=-1) {
pinMode(rst, OUTPUT); //Trigger a global hardware reset...
digitalWrite(rst, HIGH);
digitalWrite(rst, HIGH);
delay(5);
digitalWrite(rst, LOW);
delay(5);
digitalWrite(rst, HIGH);
delay(5);
waitForBusyInactive(EPD_TMG_SRT);
writeRegister(EPD_SOFTWARERESET, -1, -1, -1, -1); //... or do software reset if no pin defined
} else
writeRegister(EPD_SOFTWARERESET, -1, -1, -1, -1); //... or do software reset if no pin defined

Expand Down Expand Up @@ -74,6 +76,7 @@ void PL_microEPD::begin(bool whiteErase) {
writeRegister(EPD_BORDERSETTING, 0x04, -1, -1, -1);
writeRegister(EPD_LOADMONOWF, 0x60, -1, -1, -1);
writeRegister(EPD_INTTEMPERATURE, 0x0A, -1, -1, -1);
writeRegister(EPD_BOOSTSETTING, 0x22, 0x17, -1, -1);

setRotation(1); //Set landscape mode as default
if (whiteErase) WhiteErase(); //Start with a white refresh if TRUE
Expand Down Expand Up @@ -333,8 +336,7 @@ void PL_microEPD::powerOn() {
writeRegister(EPD_TCOMTIMING, 0x67, 0x55, -1, -1);
writeRegister(EPD_POWERSEQUENCE, 0x00, 0x00, 0x00, -1);
writeRegister(EPD_POWERCONTROL, 0xD1, -1, -1, -1);
waitForBusyInactive(EPD_TMG_SR2);
delay(10); // This value can still be optimized!
while (readRegister(0x15) == 0) {} // Wait until Internal Pump is ready
}

// ************************************************************************************
Expand Down
3 changes: 2 additions & 1 deletion src/PL_microEPD.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ open source hardware by purchasing this product @Crowd_supply @Watterott @Plasti
#include <Adafruit_GFX.h> //Only if Arduino attached
#ifdef ARDUINO
#include <SPI.h>
#elif defined(PLATFORM_ID) //Only if a Particle attached
#elif defined(PLATFORM_ID) //Only if Particle attached
#include "Arduino.h"
#endif

Expand All @@ -40,6 +40,7 @@ open source hardware by purchasing this product @Crowd_supply @Watterott @Plasti
#define EPD_PANELSETTING 0x01
#define EPD_DRIVERVOLTAGE 0x02
#define EPD_POWERCONTROL 0x03
#define EPD_BOOSTSETTING 0x04
#define EPD_TCOMTIMING 0x06
#define EPD_INTTEMPERATURE 0x07
#define EPD_SETRESOLUTION 0x0C
Expand Down

0 comments on commit 821f977

Please sign in to comment.