I recently received a Nokia 5110 LCD screen and have hooked it up to my Uno and got it displaying stuff.

I'd like to try using it in a project with an ATtiny85 and found some resources to that effect, however, I'd like to be able to run it from fewer pins than the 5 I've started off with.

I found a few things online which suggested I can tie the RST to VCC and the CE pin to ground.

I connected RST to VCC and that seems to work ok.

Connecting CE to ground doesn't work properly - it either displays half inverted with a bit of garbage or more usually just displays nothing at all. From looking at the datasheet, CE needs to see a falling edge in order to enable.

I reconnected it to a pin and modified my code so that it simply writes it HIGH and then LOW in the setup() function and leaves it alone after that and the screen seems to work happily after that.

Feels like a waste of a pin though! Is there any way I can simulate the falling edge without it needing to be connected to a pin?

  • \$\begingroup\$ When does the falling pin need to fall and when should it rise back to Vcc? \$\endgroup\$
    – Andy aka
    Nov 29, 2015 at 9:43
  • \$\begingroup\$ As far as I've been able to work out, it needs to fall just after the screen is powered on and can stay low after that (that's what my code is doing with it connected to the pin). \$\endgroup\$ Nov 29, 2015 at 9:47

2 Answers 2


What you want to do (one falling edge on SCE, keep it low ever after) is allowed according to the PCF8544 datasheet, but it has a lurking problem: you no longer use the SCE edges to indicate the byte boundaries, so after one clock missed (for example due to noise), you will be forever out of sync with the LCD.

An IMO better approach would be to use a SPI extender (a simple HC595 will do) to supply all the signals in your system that need to change only rarely (for the LCD: res). This approach takes the same number of pins as driving all LCD pins directly, but gives you 7 'slow pins'.

  • \$\begingroup\$ This is interesting - I was trying to free pins for a hc595 (and a shift-in as well). So could I use the same CLK and DIN for all 3, and then one pin for the hc595 latch and one for the shift-in and then drive the CE on the lcd from one of the hc595 outputs? \$\endgroup\$ Nov 29, 2015 at 11:26
  • \$\begingroup\$ Shared clock and data (in this case only MOSI, MISO can be more difficult because it requires that the slave tri-states its output whe not selected) and an individual CS (or CE, or LATCH, ...) is the standard way to wire SPI (or SPI-like) peripherals. \$\endgroup\$ Nov 29, 2015 at 11:49
  • \$\begingroup\$ I am not totally sure that what you decsribe is what I mean. I would still put the LCD's CE on a direct pin (because I don't feel comfortable without byte-level synchronization), but the LCD's RS can be an HC595's output pin. \$\endgroup\$ Nov 29, 2015 at 11:51
  • \$\begingroup\$ You have two 595's? If speed is not an issue, the second 595's latch input could be an output of the first 595. \$\endgroup\$ Nov 29, 2015 at 11:52
  • \$\begingroup\$ I have a few 595s. I'm going to try hooking up latch and CE to their own pins and driving DC from a pin on the 595 using CLK and DIN on the same 2 pins. If I could think of a way to NOT the CE with the latch so they alternate when I switch, I wonder if they could even share a pin! But 3 pins for latches and 2 for CLK & DIN give me shift-in, shift-out and LCD control on 5 pins with the ATtiny85. I guess the worst I can do is set fire to the LCD :) \$\endgroup\$ Nov 29, 2015 at 15:39

As far as I've been able to work out, it needs to fall just after the screen is powered on and can stay low after that

Use an RC network across the supply to produce a delayed rising exponential signal. Then use a schmitt trigger input invertor to generate a falling edge and continuous zero level that will occur approximately RC seconds after power is applied.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.