Sharp Memory LCD Displays = Ultra Low Power


@peekay123 Sounds good. I think the 2.7 inch screen with the Photon and Electron are a perfect match for low power applications.

I never did hear back from Sharp but I did hear back from one of their resellers who apologized and asked me to resend him all the questions I previously sent so he could then forward them to Sharp.

Since you had the library up and running and It looks like we will soon have the color bitmap image creation with the proper bitmap output format I just figured we didn’t need their help anyways.

I have the color screen up and running and it’s working perfectly, just waiting on the guy to get the image conversion software ready to export to the format we need to keep moving forward with the screen layout.

The 5" Nextion screen arrived yesterday, its a very nice screen but these screens get washed out in bright light and they consume 2 watts while ON which is unacceptable in smaller battery powered applications.


@RWB, I still would like to hear from Sharp and I’m dumbfounded as to their lack of information.

The Nextion displays are very promising but only for non-battery applications for sure. It will be interesting to see what can be done with the image conversion software once they implement the new format. :smile:


@peekay123 @dplumly I have the 4 inch screen up and working now.

I’m not sure why the draw bitmap is showing all black in the demo code.

I had to change the DrawLine function as Paul described to this:

void testdrawline(void) {  
  for (uint16_t i=0; i<display.width(); i+=4) {
    display.drawLine(0, 0, i, display.height()-1, BLACK);
  for (uint16_t i=0; i<display.height(); i+=4) {
    display.drawLine(0, 0, display.width()-1, i, BLACK);
  for (uint16_t i=0; i<display.width(); i+=4) {
    display.drawLine(0, display.height()-1, i, 0, BLACK);
  for (int16_t i=display.height()-1; i>=0; i-=4) {
    display.drawLine(0, display.height()-1, display.width()-1, i, BLACK);
  for (int16_t i=display.width()-1; i>=0; i-=4) {
    display.drawLine(display.width()-1, display.height()-1, i, 0, BLACK);
  for (int16_t i=display.height()-1; i>=0; i-=4) {
    display.drawLine(display.width()-1, display.height()-1, 0, i, BLACK);

  for (uint16_t i=0; i<display.height(); i+=4) {
    display.drawLine(display.width()-1, 0, 0, i, BLACK);
  for (uint16_t i=0; i<display.width(); i+=4) {
    display.drawLine(display.width()-1, 0, i, display.height()-1, BLACK); 

Here is what a 2.7 inch screen looks like with a backlight.


@peekay123 I’ll forward your questions to the local Sharp sales rep and see what happens.

Do you think there is a way to upload a .H file full of bitmap arrays to the 1Mb of extra memory on the P1 using only the Flashee library and the online IDE?

That would be awesome since then I would be able to remotely update products + the bitmaps on the 1Mb of flash without having to do any local compiling.

I know were both busy but I’m willing to pay for your time if your willing to help figure a solution for this. The P1 looks to be a really good way to replace the Teeny 3’s I’m used to using.

The only advantage with the Teensy is they have the deep sleep modes only consuming around 2 uA vs 80 uA on the Photon & P1 but still both are pretty dam low.


@RWB @peekay123 That’s awesome guys! I updated to code, but am still getting a blank screen or a screen that looks like this.

I’m not sure what I am doing wrong. I posted the code I am using on github.

When you guys get a chance can you take a look?


@dplumly I used this code:

I changed the screen dimensions in the Sharpmemory.h file to the correct dimensions.

Then you will need to take the TestDrawLine code I pasted above and replace that at the bottom of the .INO file.

Check the ribbon cable on the screen to make sure you have not torn it since it’s really easy to do.

Start from scratch with the code and triple the check your wiring connections and it should work. I have the exact same setup.


@RWB, the bitmap IS all black!!! It’s just an array of all 1’s.

Nice display layout!!


@peekay123 Ahh that makes sense. I was expecting to see that circle face with the X X eyes like in the picture earlier in this thread :dizzy_face:

The screen layout is clean but it’s going to be completely redone to something better. The clean fonts are only possible because of YOU :smile: and your custom mfGFX library.

Now if I could only figure out how to store my bitmaps on the P1’s extra memory I would have plenty of room to make awesome full screen animations :smiley:


@RWB, you could use flashee-prom combined with an SD to flash your code over to the P1 external flash. You would first run an app to read a file, either a raw bin or a txt file (eg. CSV) with the data and flash it over. Then you could run your regular app making use of the data in external flash. :smile:


@peekay123 I was under the impression that the extra 1Mb of flash was just there and ready to use on the P1 via the online IDE.

What makes this extra memory so hard to write to via the normal IDE.

So once a P1 gets shipped out in a product the data that’s on the 1Mb chip can not be changed via a remote software update right? It would be so much better to be able to write to that memory via a remote update, like the Photon does now.


@peekay123 Hey Paul I’m laying out the schematic for a few new boards using the P1 Modules.

I have a quick question about the Memory Displays.

Am I right in assuming that the Color LCD requires the use of A2, A3, and A5 pins, and the monochrome display firmware requres the use of pins A1, A3, and A5?

The difference being the use of A1 or A2 for the SS signal.

Thanks :smile:


@RWB, you can use any pin for SS as long as you adjust the code accordingly.


Thank you for clarifying.

I missing getting your package out due to all the Holiday jazz but I’ll will go out tomorrow.


Hello All, I am having a terrible time trying to get peekay123’s library to work with my Photon connected to a 2.7 inch Sharp Mem LCD. I did make my own interface board, but it is almost identical to other’s interface boards. Using my board an an Arduino Nano - and limiting the screen to 400 x 24 pixels, I can get the whole thing working just fine (albeit with just 24 pixel height) using the original Adafruit library. However, switching to anything in the 32-bit realm, using SPI.h, seems to not work. I tried an Adafruit Feather M0 board and my Photon. I am now around 80% sure it has to do with SPI. Reading the Photon docs, SPI runs around 60Mhz. Reading the 2.7" LCD docs max clock should be 2Mhz. I’ve tried the following:

SPI.setClockSpeed(1, MHZ);







without any luck. I cannot imagine it is my hardware and interface board as it works fine with the other microcontroller. But, I could be wrong. I don’t get jumbled text or lines, I get a completely blank screen. I’ve tried several different options for SS, A1, A2, D7. I even tried my 400x24 trick that got the Nano working. I’ve switched back and forth between the Nano and the Photon and each time it works with the Nano. That is why I’ve been chasing down the possible SPI issue. However I cannot understand how others are able to get this working and I am not. Can someone post their exact connections/wiring?


I’m using the 2.7 inch screen on the Electron right now and I know it works on the Photon.

Here is the code to get the 2.7 inch screen working with some graphing code I found recently.

Download Paul’s code for the 2.7 inch screen here:

Let me know how it goes.


Thanks, RWB. Unfortunately, still not working. Can you tell me the exact interface board you are using?


Post a few pictures of exactly what you have going on over there.

Make sure you are using these pins on the Photon:

A3 = SCK,
A5 = MOSI,
A2 = SS



Photos here:
3 new photos by Benjamin Shockley

On mine I have been using A1 for SS.

my .ino code:

This is an example sketch for our Monochrome SHARP Memory Displays

  Pick one up today in the adafruit shop!

These displays use SPI to communicate, 3 pins are required to  

Adafruit invests time and resources providing this open source code, 
please support Adafruit and open-source hardware by purchasing 
products from Adafruit!

Written by Limor Fried/Ladyada  for Adafruit Industries.  
BSD license, check license.txt for more information
All text above, and the splash screen must be included in any redistribution

#include "Adafruit_mfGFX.h"
#include "Adafruit_SharpMem.h"

Our pin setup for the Spark

CLK = pin A3 
DI = pin A5
CS = pin A1

To convert your image to a Bitmap make the image 96px x 96px in a program like Photoshop. 
One the image is the correct size go to
to convert your image to a hex value like shown below.

Adafruit_SharpMem display(SCK, MOSI, A1);    //SCK, MOSI, SS

#define BLACK 0
#define WHITE 1

void setup(void) 

  display.init();       // Initialize the hardware ports since cannot be done in class instantation above

  // start & clear the display

  // draw the first ~12 characters in the font

  // text display tests
  display.println("Hello, world");


void loop(void) 
  // Screen must be refreshed at least once per second


void testdrawchar(void) {

  for (uint8_t i=0; i < 168; i++) {
    if (i == '\n') continue;
    //if ((i > 0) && (i % 14 == 0))


I was just reviewing my hardware again. It appears I haven’t tied EXTMODE to GND. Sigh.


The wiring looks good.

I’m not sure if changing A2 to A1 is OK or not. You may be able to choose which ever one you want but I’m not the expert on that. I would just leave it as A2 as Paul’s code is using because we know it works.

Do you have a link to that Memory LCD breakout that your using?

I’m using these breakouts, look at the schematic if you want to make sure yours is the same setup. :