This is a monochome LCD display driver used in 128 x 64 and 132 x 64 LCD displays. The LCDs are available (pre-mounted on PCBs) relatively cheaply from via various suppliers online.
Support is included in the ST7565 (About Modules) module, using the Graphics library.
Just wire up as follows:
LCD pin | Pin type | Example pin on Espruino Pico |
---|---|---|
LEDA | Any | 3.3 (backlight on) |
VSS / GND | GND | GND |
VDD | 3.3v | 3.3 |
SCK / CLK | Any | B10 |
SDA / DIN | Any | B1 |
RS / DC | Any | A7 |
RST | Any | A6 (optional) |
CS / CE | Any | A5 |
You can use hardware SPI for SCK
and SDA
, but on small monochome displays there is so little data transferred that using software SPI won't hurt, and gives you more flexibility about the pins that you use.
This display draws very little power, so if it makes wiring easier you can power it from GPIO.
var spi = new SPI();
spi.setup({ sck: B10, mosi: B1 });
var g = require("ST7565").connect({ spi:spi, dc:A7, cs:A5, rst:A6 }, function() {
g.clear();
g.drawString("Hello",0,0);
g.drawLine(0, 10, g.getWidth(), 10);
g.flip();
});
Note:
.connect
in the onInit()
function.g.flip()
before any changes take effect.g.setContrast(0.45)
to set the contrast of the LCD display. It takes a value between 0
and 1
- 0.5
is the default.g.setContrast(0.5, x)
where x
is an integer between 0 and 7.132 x 64
displays, you'll need to specify the width as an option or you'll end up with 4 columns of random pixels: var g = require("ST7565").connect({spi:spi, dc:A7, cs:A5, rst:A6, width: 132}, function() { ... })
(No tutorials are available yet)
This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.