Table of contents
This project officially supports the Arduino-based platform. The Ti LaunchPad support that is available in the original repaper/gratis repository has been commented out and is completely untested.
The examples have been verified on Arduino Leonardo (R3) and Arduino Uno (R2) boards using the 1.0.5 version of the IDE.
See: Schematics for the 2.7 inch E-paper Display Module, Arduino Leonardo (PDF) and Arduino Uno (PDF)
The display module have two 14-pin connectors (J2 is 50mil and J3 is 100mil) and one 26-pin connector (J5). Any one of them can be used to connect the display board to the Arduino board.
One way to connect the display module is to use jumper wires. The table below shows where each wire should be connected:
Arduino Leonardo | Arduino Uno | Arduino Mega 2560 | Display, 14-pin connector | ||||
---|---|---|---|---|---|---|---|
Pin # | Signal | Pin # | Signal | Pin # | Signal | Pin # | Signal |
GND | GND | GND | GND | GND | GND | 1 | GND |
3V3 | 3V3 | 3V3 | 3V3 | 3V3 | 3V3 | 2 | 3V3 |
ICSP-3 | SCK | ICSP-3 | SCK | 52 | SCK | 3 | SCK |
ICSP-4 | MOSI | ICSP-4 | MOSI | 51 | MOSI | 4 | MOSI |
ICSP-1 | MISO | ICSP-1 | MISO | 50 | MISO | 5 | MISO |
8 | GPIO | 8 | GPIO | 8 | GPIO | 6 | SSEL |
7 | GPIO | 7 | GPIO | 7 | GPIO | 7 | Busy |
10 | GPIO | 10 | GPIO | 10 | GPIO | 8 | Border Ctrl |
SCL/3 | SCL | SCL/A5 | SCL | 21 | SCL | 9 | SCL |
SDA/2 | SDA | SCL/A4 | SDA | 20 | SDA | 10 | SDA |
9 | GPIO | 9 | GPIO | 9 | GPIO | 11 | CS Flash |
6 | GPIO | 6 | GPIO | 6 | GPIO | 12 | Reset |
5 | GPIO | 5 | GPIO | 5 | GPIO | 13 | Pwr |
4 | GPIO | 4 | GPIO | 4 | GPIO | 14 | Discharge |
The only difference in pinning between the Leonardo and Uno boards is where to connect the I2C/Wire pins (SDA/SCL).
This project officially supports the Arduino-based platform.
The Arduino web site has download links for Windows, Mac OS/X and other operating systems.
Note: Java is necessary to run the GUI, but it is possible to install a command line only version.
Link to the libraries source. (copy all of these to you local libraries folder)
- Images - Sample XBM files. The demo program includes two of these directly. The Command program can use these files for its upload command.
- FLASH - Driver for the SPI FLASH chip on the EPD eval board.
- EPD2 - E-Ink Panel driver (COG V2) experimental.
- LM75 - Temperature sensor driver.
IMPORTANT NOTES for COG V2
- The programs below only support the COG V2 using the
EPD2
library. - The COG V2 does not use PWM - the pin is used as chip select for the onboard SPI-NOR flash instead.
Link to the demo2 source.
This example first clears the screen, then toggles between two images. It needs the serial port (9600 8N1) connected and displays the version, temperature and compensation values on each cycle.
This is built upon the EPD2 API in the libraries folder and shows how to use the API to display images from the MCU FLASH. Only a few images are possible to be stored since the on-chip FLASH is limited.
Link to the command2 source.
A command-line example that accepts single character command from the serial port (9600 8N1). Functions include XBM upload to the SPI FLASH chip on the display board, display image from this FLASH and several other functions.
Use the h
command on the serial port (9600 8N1) to obtain a list of
commands. Some of the commands are shown like e<ss>
this
represents a two digit FLASH sector number in the range 00..ff (a
total of 256 sectors). The 1.44" and 2.0" display images take one sector
but the 2.7" displays take two adjacent sectors - this means that
it is necessary to issue both e00
and e01
before uploading a 2.7" image
with u00
.
When using the serial monitor on Arduino/Energia IDE any command that
take a hex number as parameter needs a <space>
character after it, as
the Send button will not automatically add a CR/LF. For single
letter commands like the t
temperature sensor read just type the
character and click Send.
The 4 stage display cycle is split into two separate commands. The r
command removes an image and the i
command displays an image.
e.g. if the current image was from sector 30 and you wanted to change
to sector 43 then type r30<space>i43<space>
into the serial monitor
and click Send.
The upload command u
need a terminal emulator with ASCII upload
capability or the ability to respond to a paste of the entire contents
of an XBM file. Also note that the u
command does not erase the
sector before uploading. To use the upload to upload an XBM into
sector 3b for example type u3b<space>
then start the ASCII upload or
paste the contents of the XBM file into the terminal window on upload
completion an image size message is displayed.
The image stored is compatible with the flash_loader sketch as described below and that program can be used to cycle through a set of images uploaded by this program.
Typical use: h
to bring up the help, t
to check that the temperature
is working and then w
to clear the display. To upload an image do e00
,
e01
and then u00
. Send the image file from the terminal program and then
type i00
to display it.
Link to the flash loader source.
This program has two modes of operation:
-
Copy a #included image to the FLASH chip on the eval board. define the image name and the destination sector. After programming the image will be displayed
-
Display a sequence of images from the FLASH chip on the eval board. A list of sector numbers an millisecod delay times defined by the
DISPLAY_LIST
macro to enable this mode. In this mode the flash programming does not occur. The images are stored in the same format as the command program above, so any images uploaded by it can be displayed by this program
The configuration of both modes is handled in this block of code:
// select image from: text_image cat ea aphrodite venus saturn
// select a suitable sector, (size 270 will take two sectors)
#define IMAGE ea
#define FLASH_SECTOR 0
// if the display list is defined it will take priority over the flashing
// (and FLASH code is disbled)
// define a list of {sector, milliseconds}
//#define DISPLAY_LIST {0, 3000}, {2, 3000}, {4, 3000}
Note: To show three different images with the DISPLAY_LIST
as shown
above you will have to upload the program four times to the Arduino:
DISPLAY_LIST
not defined,IMAGE
is e.g. ea,FLASH_SECTOR
is 0DISPLAY_LIST
not defined,IMAGE
is e.g. cat,FLASH_SECTOR
is 2DISPLAY_LIST
not defined,IMAGE
is e.g. venus,FLASH_SECTOR
is 4DISPLAY_LIST
defined and set to {0, 3000}, {2, 3000}, {4, 3000}