• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoArduino-ish ProgramSPITutorial of using E-paper Shield on pcDuino
Previous Next

Tutorial of using E-paper Shield on pcDuino

Posted by: admin , May 15, 2014

[vc_row][vc_column][vc_column_text]Electronic paper, e-paper and electronic ink are display technologies which are designed to mimic the appearance of ordinary ink on paper. Unlike conventional backlit flat panel displays which emit light, electronic paper displays reflect light like ordinary paper, theoretically making it more comfortable to read, and giving the surface a wider viewing angle compared to conventional displays.  In this tutorial, we will introduce an E-paper shield. This E-paper shield can be programmed using pcDuino or Arduino.

 

epaper_1 epaper_2

[/vc_column_text][vc_tour][vc_tab title=”Wire Diagram” tab_id=”1400214997-1-26″][vc_column_text]

It’s very simple to use the e-paper, we just need to install it directly on the pcDuino.

[/vc_column_text][/vc_tab][vc_tab title=”Procedure” tab_id=”1400214997-2-74″][vc_column_text]In the following, we will look at the steps  using e-paper shield:

1. First, we need to download a tool named image2lcd. It can be downloaded from (image2lcd_v3.2). This tool is used to generate a header file that contains the data of the image. The size of the image should be exactly 800×600.

The options should be:

Output file type: C array (*c)

Scan mode: Horizon Scan

BitsPixel: 4 gray

Size: 800 x 600

Load the image and then save to array.

2.  Introduction to the commands:

 

The e-paper shield uses SPI interface to talk to pcDuino. To meet the requirement of speed, please use hardware SPI. The status pin is D9. If the e-paper shield is idle, it will toggle the status of pin D9. If it times out, we can pull high of CS signal to abort the current command.

Note: It may take a long time during image updating.

The following is a sample code:

void ClearScring(void)

{
  bool DeviceStatus;
  DeviceStatus = digitalRead(STATUS_PIN); //Record the status before issuing command
  digitalWrite(CS_PIN,LOW);//Pull low CS signal
  SpiExchangeByte(3); //Send command
  while(digitalRead(STATUS_PIN) == DeviceStatus)//Wait till the e-paper is idle
  {
     ;
  }
  digitalWrite(CS_PIN,HIGH);//Pull high CS signal
}
Right now,  e-paper shield supports 5 commands:
Command 0x01: set the width of the image.
Command 0x02: set the height of the image.
Command 0x03: clear the screen
Command 0x04: send data of the image and display
Command 0x05: let the shield display the default image

[/vc_column_text][/vc_tab][vc_tab title=”Download” tab_id=”1400220505233-2-5″][vc_column_text]1. Sample project files

2. Schematics[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]

Tags: SPI

Share!
Tweet

admin

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors