1 Introduction
2 ------------
3
4 The ben-epaper distribution provides a program, epaper, that runs on the Ben
5 NanoNote and controls the EM027AS012 display from Pervasive Displays on an
6 Embedded Artists' 2.7 inch E-paper Display module. To connect the module to
7 the Ben, the 8:10 port which is typically employed to access microSD cards is
8 instead used to hold a suitable breakout board that exposes the 8:10 port's
9 connectors to other circuits. These connectors are in turn connected to
10 specific connectors on the E-Paper Display module as follows:
11
12 Sniffer UBB EM027AS012
13 ------- ---- -----------
14 DAT2 DAT2 4 (MOSI)
15 CD DAT3 6 (SSEL)
16 CMD CMD 11 (PWM)
17 VCC VDD 13 (PANEL)
18 CLK CLK 3 (SCK)
19 GND GND
20 DAT0 DAT0 12 (RESET)
21 DAT1 DAT1 14 (DIS)
22
23 On the E-Paper Display module the socket appears as follows, with the numbered
24 pins protruding from the board:
25
26 Socket
27 --------------------
28 2 4 6 8 10 12 14
29 1 3 5 7 9 11 13
30 ---------__---------
31
32 However, it is more convenient to use standard male-to-male jumper wires to
33 connect the Sniffer or UBB breakout board to the end of a suitable cable which
34 in turn plugs into the socket on the E-Paper Display module board. The jumper
35 wires plug into the holes in the cable plug. Remember that the pin numbering
36 is "mirrored" on the end of the cable:
37
38 __
39 --------- ---------
40 1 3 5 7 9 11 13
41 2 4 6 8 10 12 14
42 --------------------
43 Cable
44
45 In addition to the Sniffer or UBB connections, additional connections for 3.3V
46 power and ground must be connected as follows:
47
48 3.3V Supply EM027AS012
49 ----------- ----------
50 GND 1 (GND)
51 3V3 2 (3V3)
52
53 Note that the VCC output of the 8:10 port is used as a "power control" signal
54 and not to power the display board.
55
56 Collecting Images for Display
57 -----------------------------
58
59 Before building the epaper program, you will first need to collect some images
60 with the following specific properties:
61
62 Width: 264 pixels
63 Height: 176 pixels
64
65 An image preparation program then needs to be run on a list of image filenames
66 to produce suitable source files that can be incorporated into the built
67 program. To save you the effort, such files are included pre-built in the
68 distribution of this software, meaning that you can skip forward to the
69 "Building the Software" section, but to use other images you will need to
70 consult the following instructions.
71
72 A suitable image preparation program can be found in the tools directory and
73 is called bitmap.py. This program is written in Python and needs the Python
74 Imaging Library, available in Debian as the python-imaging package and in
75 other GNU/Linux distributions under other names. It is also available from the
76 following location:
77
78 https://pypi.python.org/pypi/PIL
79
80 To get you started, some example images are provided in the examples
81 directory, and these images are prepared for the program as follows:
82
83 python tools/bitmap.py images examples/*.JPG
84
85 Here, three JPEG files are loaded, internally converted (the files are not
86 changed), and the bitmap data written out to two files:
87
88 images.c
89 images.h
90
91 Since the Makefile and epaper program reference these files, it is recommended
92 that the "images" basename be retained when running the bitmap.py program.
93
94 The bitmap.py program also supports other common image formats such as PNG.
95
96 Building the Software
97 ---------------------
98
99 Before building the software, it will probably be necessary to edit the
100 Makefile to specify the locations of the cross-compilation toolchain and of
101 libubb. Obtaining a toolchain and libubb is currently beyond the scope of this
102 document.
103
104 The epaper program is built as follows:
105
106 make
107
108 Running the Software
109 --------------------
110
111 On the Ben, the epaper program can be deployed together with libubb in a
112 particular directory and invoked as follows:
113
114 LD_LIBRARY_PATH=. ./epaper
115
116 Alternatively, the library search path can be configured properly and the
117 epaper program installed in such a way that merely typing the name of the
118 program is enough to run it.
119
120 The epaper program accepts a list of options:
121
122 <image number> This indicates which image to display (where 0 is
123 the first image).
124
125 --have <image number> This indicates that the display is showing the
126 image with the given number (where 0 is the first
127 image) and is used to influence subsequent
128 options.
129
130 --blank This blanks the screen, using knowledge of the
131 current screen image if provided either by the
132 --have option or by the display of a preceding
133 image.
134
135 --wait <delay in seconds> This causes a delay between operations.
136
137 Hardware: Embedded Artists' 2.7 Inch E-paper Display Module
138 -----------------------------------------------------------
139
140 This board provides an interface to the EM027AS012 display from Pervasive
141 Displays:
142
143 http://www.embeddedartists.com/products/displays/lcd_27_epaper.php
144
145 This software has only been tested with revision A of the board, and employs
146 code from Pervasive Displays that may have been superseded upon release of new
147 revisions of this and related boards (as mentioned below).
148
149 More information and source code licensed under Free Software licences can be
150 found on the RePaper site:
151
152 http://repaper.org/
153
154 Other boards that provide an interface to the EM027AS012 display and other
155 displays from the same manufacturer also exist. For example:
156
157 http://www.adafruit.com/products/1316
158
159 This software has not been tested with such boards.
160
161 Hardware: 8:10 Port Breakout Board
162 ----------------------------------
163
164 To connect the Ben NanoNote to the E-Paper Display module, a suitable breakout
165 board is required to expose the connections inside the 8:10 slot. To achieve
166 this, the Sparkfun microSD Sniffer has been used:
167
168 https://www.sparkfun.com/products/9419
169
170 This board is apparently intended for eavesdropping on communications between
171 a "host" device with a microSD slot and a microSD-based device that can be
172 inserted into a slot mounted on the board (instead of being inserted directly
173 into the host device). However, the board-mounted slot can be ignored and the
174 exposed connections routed to the display board instead.
175
176 Another board that achieves the same purpose is the Universal Breakout Board
177 (UBB):
178
179 http://en.qi-hardware.com/wiki/UBB
180
181 The UBB is somewhat more difficult to work with as its connectors are very
182 small and, compared to the microSD Sniffer, awkward to attach things to. The
183 microSD Sniffer employs connectors situated around holes with 0.1 inch
184 spacing, meaning that commonly available connection headers can be soldered
185 onto the board.
186
187 Although the labelling of the connections is different between the microSD
188 Sniffer and UBB (see above), the layout appears to be identical.
189
190 Contact, Copyright and Licence Information
191 ------------------------------------------
192
193 The author can be contacted at the following e-mail address:
194
195 paul@boddie.org.uk
196
197 Copyright and licence information can be found in the docs directory - see
198 docs/COPYING.txt and docs/gpl-3.0.txt for more information.