Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 11 months ago.
EPD Extension Board with older EM027AS012 display compatibility
Hi, I have one of the EPD Extension Boards (http://repaper.org/doc/extension_board.html#pin-assignment) and the older, now obsolete e-ink panel mounted to it (EM027AS012). I notice from other threads that luckily for me this older panel is what the EaEpaper library wants to work with.
The main thing the EPD board has different to theEmbedded Artists AB board seems to be that it uses a different temperature sensor. The EaEpaper class calls setFactor(readTemperature()/100) so I have tried various hard coded values for readTemperature ranging from 10*100 to 25*100. This gives EPD.setFactor a somewhat reasonable value for temperature in deg C. If I can get things working then obviously doing something more in readTemperature() would be a better choice... anyway...
After some tinkering I can get it to display a single image (single write_disp() call) but when an addition or clear is attempted after that then the screen slowly fades darker in a non uniform way. I am using an ST Nucleo F401RE (100kb ram) so the MCU shouldn't have any problem resource wise.
I have pulled the flash_cs pin high to avoid it getting in the way of the epd-cs pin in any way. Any thoughts on what I might try next would be great.
pin connections
epaper board | 401 board | desc | EaEpaper-ctor() | EPD_Class
--------------+-----------+------------+-----------------------+---------------
1 | 3v3 | power | . |
7 | 13 | spi-clk | SPI_SCK clk |
8 | 8 | busy | BUSY busy | EPD_Pin_BUSY
9 | 3 | pwm | PWM pwm | EPD_Pin_PWM
10 | 7 | reset | RESET_DISP reset | EPD_Pin_RESET
11 | 4 | panel-on | PWR_CTRL p_on | EPD_Pin_PANEL_ON
12 | 6 | discharge | DISCHARGE discharge | EPD_Pin_DISCHARGE
13 | 5 | border-ctl | BORDER border | EPD_Pin_BORDER
14 | 12 | spi-miso | SPI_MISO miso |
15 | 11 | spi-mosi | SPI_MOSI mosi |
16 | | | |
17 | | | |
18 | high | flash-cs | . |
19 | 10 | epd-cs | SSEL cs | EPD_Pin_EPD_CS
20 | gnd | gnd | . |
EPD board on a 401 test program
EaEpaper epaper(D4, // PWR_CTRL
D5, // BORDER
D6, // DISCHARGE
D7, // RESET_DISP
D8, // BUSY
D10, // SSEL
PWM_OUT, // PWM
SPI_MOSI,SPI_MISO,SPI_SCK, // MOSI,MISO,SCLK
I2C_SDA,I2C_SCL); // SDA,SCL
int main()
{
epaper.cls(); // clear screen
epaper.set_font((unsigned char*) Arial28x28); // select the font
epaper.locate(5,20); // set cursor
epaper.printf("Hello Mbed"); // print text
epaper.rect(3,15,150,50,1); // draw frame
epaper.locate(15,80); // set cursor
epaper.printf("hi!"); // print text
epaper.write_disp(); // update screen
for(int i=0; ; i++ ) {
wait(5);
// anything I do here that ends in an attempt to update the display
// doesn't work
#if 0
epaper.cls();
epaper.write_disp();
wait(5);
#endif
epaper.circle(160,150,20,1);
// epaper.cls(); // clear screen
epaper.set_font((unsigned char*) Arial28x28); // select the font
epaper.locate(15,80); // set cursor
epaper.printf("hi! %d",i); // print text
epaper.write_disp(); // update screen
}
return 0;
}