siliconchip.com.au Australia’s electronics magazine June 2019 43
Fig.3: here’s how to connect an e-Paper
display to a Micromite. Only eight
connections are required. Make sure you
are not using the SPI bus for anything
else, as this might conflict with the BASIC
program.
is complete, we shut down the control-
ler by pulling the reset pin low.
We found one more thing that was
not obvious from reading the data
sheet. There are two RAM buffers on
the controller, and it alternates be-
tween them each time the display is
refreshed.
Thus, it is quite easy to alternate
between two images by doing noth-
ing more than sending repeated re-
fresh sequences.
Our code
We’re providing two code exam-
ples, one for Arduino and one for Mi-
cromite. They both drive the display
in the same manner.
When you run this code, the dis-
play first shows what appears to be
various shades of grey, although the
mid-shades are actually alternating
patterns of light and dark pixels. The
display has a nominal resolution of
184 DPI, which is around 7 pixels per
millimetre, so dithering works quite
well to produce intermediate tones.
You have to be very close to the dis-
play to see the pixel patterns.
After a short pause, it shows the sec-
ond display page, which is a compari-
son between two fonts and also shows
the difference between white-on-black
and black-on-white text.
We think that the black-on-white
text is easier to read, perhaps because
Fig.4: this shows how to connect an e-Paper
display to the D1 Mini, a small Arduino-
compatible board. As with the Micromite,
we are using the hardware SPI bus of the
ESP8266 microcontroller to drive the display.
of its similarity to black ink printed
on white paper which we are so fa-
miliar with.
The next page is full of text in a tiny
font. Each character is around 1.5mm
high, much smaller than the text you
might find in a book or newspaper. The
text is quite legible, although you may
need to squint to read it.
The fourth page has larger text and
is quite easy to read. You will have
to look closely to see the individual
pixels.
The next page is designed to look
like what might be displayed on an
electronic price ticket. There are dif-
ferent sizes of text and a bitmap image
too. We used an online tool to convert
images to C code for the Arduino ex-
ample. It is at: http://www.digole.com/tools/
PicturetoC_Hex_converter.php
For the Micromite example, we had
to convert this data to a 32-bit format
to simplify the code, which was an
extra step, as well as converting it to
a format suitable for MMBasic.
The final page display is similar in
that it also shows an electronic price
ticket, although this example uses
the two RAM buffers to flash a ban-
ner across the image. As noted above,
once the two RAM buffers have been
filled, the refresh sequence is all that
is needed to alternate between them.
Between each example page, the
display is shut down (by pulling the
reset pin low), then the code waits
for a fixed period before repeating the
initialisation code, to restart the dis-
play before the next update.
Connecting it up
To try out our example code, you
will need a display and also a micro-
controller module to connect it to.
We provided a link (above) to the
online store where we bought ours.
We have not tried any others, but if
you find another 200x200 pixel e-
Paper display which uses the IL3820
controller and has an eight-way con-
nector, then there’s a good chance that
our code will work with it.
We have used the hardware SPI
ports to drive the displays in both the
Micromite and Arduino examples.
These, and the other necessary con-
nections, are noted near the top of
the sample code. You can also refer
to Figs.3 & 4 and the table of connec-
tions (Table 1) to wire up the display
to your microcontroller.
The module will only work at 3.3V,