- 96 x 96 pixel, 1.35″ Memory LCD
- 128 x 128 pixel, 1.28″ Memory LCD
Memory LCDs are the type of black & white, ultra low-power, ultra high-contrast displays used in smartwatches like the Pebble and the Agent. They fall somewhere between being an e-ink display and a regular LCD. They have the low-power requirement and high contrast of an e-ink display, but as with a regular LCD, you need to keep power connected to maintain the image.
However they do have (write-ony) pixel memory, so you don’t need to repeatedly send the same frame data to the LCD in order to keep the image on screen. Once you’ve sent the data to the screen, it stays there for as long as power is supplied.
The LCDs have a simple SPI interface which is rated at 1 MHz (although I’ve had some models running glitch-free at 4MHz) and a simple command structure. The commands are simply:
- Write a single line
- Write multiple lines
- Clear the screen
- Enter power saving mode
As you can see from the commands – the minimum addressable unit is a single line. You can’t alter single pixels individually. If you want to do that, you’ll have to incrementally update a line buffer or a whole frame buffer before sending the completed line(s) to the LCD.
Why do you need a breakout board?
Well, luxurious and ergonomic as they look inside a smartwatch, as a bare component they are nothing but a small rectangle of glass with a delicate and breadboard-unfriendly 0.5 mm pitch flat flex cable dangling off one edge.
With the breakout board, you get the following features that make using the Memory LCD easy:
- 0.5 mm pitch flat flex cable connector to connect the Memory LCD
- 0.1″ header strip for compatibility with breadboards
- 3V LDO voltage regulator and logic level shifting IC (all Memory LCDs have a 3V logic-high level).
- Jumper to select the correct supply volage for the particular Memory LCD model (some Memory LCDs have a 5V power requirement)
- Jumper to select the display refresh signal source
- Positions for 6 optional tactile switches around the perimeter of the LCD
- 3mm mounting holes for easy mounting of the board inside an enclosure
- Double-sided adhesive pads to secure the LCD to the PCB
The dimensions of the small Memory LCD breakout board are 54 x 58 mm (W x H) and it is designed for the following LCDs:
- LS013B4DN02 (1.35″, 96 x 96 pixels, requires a minimum 5V supply)
- LS013B4DN04 (1.35″, 96 x 96 pixels, requires a minimum 3V3 supply)
- LS013B7DH03 (1.28″, 128 x 128 pixels, requires a minimum 3V3 supply)
Aside from the headline pixel dimensions of the 1.35″ display with its 96 x 96 pixels and the 1.28″ display with its 128 x 128 pixels. It’s also worth considering a few other factors.
First, the pixel count doesn’t sound like much on its own but the display with the higher pixel count has a fractionally smaller screen – giving a much finer dot pitch.
Second, the higher the number of pixels in the display, the more microcontroller RAM you’ll have to dedicate to a framebuffer (assuming you’re wanting to use one, that is). Assuming you’re being frugal and storing individual pixels as bits, not bytes, for a complete framebuffer;
- 96 x96 pixel LCD requires 1152 Bytes of RAM
- 128 x 128 pixel LCD requires 2048 Bytes of RAM
So, if you geek weapon of choice is an Arduino and your particular model is ATMega328-based like the Duemilanove or Uno and therefore limited to 2KB SRAM, you’re only going to be able to implement a framebuffer for the 96 x 96 pixel display. However, if you use the new Leonardo, you can framebuffer the whole 128 x 128 pixel LCD and still have a mere few hundred bytes left over for the rest of your variables. However all this framebuffer angst starts to recede once you move towards the more powerful Mega (8KB SRAM) or Due (96 KB SRAM) models.
Third, the two displays have a slightly different appearance, The 96 x 96 pixel display is definitely shinier than the 128 x 128 pixel model but it lacks its black border.
How to use the breakout board?
The breakout board comes partially assembled. All surface mount components are already soldered onto the back of the board, as are the two 3×1 right-angle headers for selecting the Memory LCD supply voltage and EXTMODE. The LCD is affixed to the front of the board with double-sided sticky foam pads. All you have to do is solder the supplied 14-way header to the board and decide which, if any, of the two types of tactile switches you want mount on the board and solder them in place too.
Two different types of tactile switch are included. The first type has a short actuator and is intended for use on breakout boards that will be used exposed (e.g. on a breadboard). The second, with the longer actuator, is desinged for breakout boards that are to be mounted inside an enclosure and the actuators are intended to be long enough to protrude through a hole in the wall of an enclosure with a wall thickness of between 2 to 3 mm. The following photographs show the difference between the two switch types:
As previously mentioned, the Memory LCDs have a 0.5 mm flat flex cable with 10 contacts. Aside from the two power and two ground connections (which are reduced to a single Vin and GND on the breakout board 0.1″ header) – there are 6 data connections that need to be made. The first three will be familiar to anyone who’s ever used an SPI peripheral before.
- SI – Serial data In
- SCS – Serial Chip Select
- SCLK – Serial Clock
SPI Note 1: The Serial Chip Select (SCS) pin is active high – which is a departure from the standard SPI approach of having CS active low. So don’t try to communicate with the Memory LCD using your microcontroller’s dedicated CS pin and a standard SPI library.
SPI Note 2: The SPI “mode” expected by the display is 0 (CPOL = 0, CPHA = 0).
SPI Note 3: The Memory LCD datasheet suggests a SPI clock of 1 MHz or less, although I have had some samples running at 4 MHz without problems.
The other three pins from the flat flex connector that are brought out to the 1″ header are:
- DISP – Display on/off (active high)
- EXTMODE - Set source of VCOM inversion signal
- EXTCOMIN – External COM INversion signal
DISP should be self explanatory and could simply be tied high instead of being controlled by a microcontroller pin, but EXTMODE and EXTCOMIN need some discussion.
Memory LCDs require a regular polarity inversion of the voltage across the LCD panel to prevent latent charge building up. The recommended frequency of this inversion is from 1-60 Hz and it is the EXTMODE and EXTCOMIN pins that control/provide the source of the signal that instructs the panel to invert its polarity.
EXTMODE allows the user to control whether the polarity inversion is actioned through software or hardware.
Tie EXTMODE to LOW for software control of the inversion signal. Software control consists of flipping a particular bit in one of one of the command bytes that preceeds the pixel line data sent over SPI when communicating with the LCD. You can save a microcontroller pin (the EXTCOMIN pin, which is explained below) by using this software control but you MUST remember to keep sending commands to the LCD at least once a second even if you’re not changing what’s displayed on the screen.
Tie EXTMODE to HIGH for hardware control of the inversion signal. This tells the LCD to listen for a square wave signal on the EXTCOMIN pin that will act as a toggle for the polarity inversion. Yes, it uses a microcontroller pin, but it means that you can use a dedicated PWM pin, set it to output a 2 Hz squarewave, connect it to EXTCOMIN and just forget about it.
NB: Setting EXTMODE high or low is intended to be done by changing the position of the shunt/jumper on the 3×1 right-angle header JP1. When you receive your breakout board, you do need to connect the EXTMODE pin on the breakout board’s 14-way header to anything on your breadboard or microcontroller. However, if for some strange reason, you do wish to set EXTMODE manually on your breadboard or automatically using your microcontroller, then removing the shunt/jumper from the JP1 header and shorting the two exposed contacts of the EXT-MCU pad with a blob of solder will allow you to set EXTMODE high or low via the EXTMODE pin on the 14-way header.
Aside from the pins on the breakout board header that control the Memory LCD, there are 6 pins for the optional tactile switches that can be mounted around the perimeter of the board. The switches are SPST-NO type and depressing the switch will result in a LOW signal. I designed the breakout board to make use of a microcontroller’s INTERNAL pull-up resistors. If your microcontroller does not have internal pull-up resistors or you do not wish to make use of them, you will need to add your own external pull-ups.
Memory LCD References:
- Videos of the small breakout boards running a demo
- Sharp Memory LCD website
- Product page for the 96 x 96 pixel, 1.35″ Memory LCDs
- Datasheets for the 96 x 96 pixel, 1.35″ Memory LCDs: 5V model LS013B4DN02 and 3V3 model LS013B4DN04
- Product page for the 128 x 128 pixels, 1.28″ Memory LCDs
- Datasheet for the 128 x 128 pixels, 1.28″ Memory LCD 3V3 model LS013B7DH03
- Memory LCD programming guide
Memory LCD Software:
I have created a separate page for software libraries for the Memory LCDs.