Soldering an LCD directly to Espruino

Soldered LCD Display

Sometimes you might want to make a very small device with an LCD display. Using the row of pins along the middle of Espruino, you can easily do this!

The PCD8544 LCD uses so little power that it can easily be powered directly from GPIO lines - requiring no special wiring other that the swapping of two signal wires.

You'll Need

Wiring Up

LCD Display with pins

LCD Display with pins

Soldered LCD Display

Note: If you want to fit the LCD the other way around, you could insert the pin strip into the bottom row of pins and can then place the LCD on the opposite side of the board.

The LCD should now be connected as follows:

LCD pin Pin type Example pin on Espruino Board
GND GND A2
LIGHT Any A3
VCC 3.3v A4
CLK SPI SCK A5
DIN SPI MOSI A7
DC Any A6
CE Any B0
RST Any B1

Software

Because the display is now powered directly from Espruino's GPIO pins, they must be set correctly in order to power the LCD. Otherwise, initialisation happens just as before:

A2.write(0); // GND
// A3.write(1); // light on
A4.write(1); // VCC
SPI1.setup({ baud: 1000000, sck:A5, mosi:A7 });

var g;

function onInit() {
  setTimeout(function() {
    g = require("PCD8544").connect(SPI1,A6,B0,B1, function() {
      g.clear();
      g.drawString("Hello",0,0);
      g.drawLine(0,10,84,10);
      g.flip();
    });
  }, 200);
}

onInit();

This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.