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