Home > Projects > LCD Projects > ST7565 LCDs: Graphical LCDs

ST7565 LCDs: Graphical LCDs

Summary of ST7565 LCDs: Graphical LCDs


This article introduces the ST7565, a 128x64 pixel graphical monochrome LCD with an LED backlight. It details setup instructions for Arduino and microcontrollers, highlighting differences from KS0108 displays regarding voltage, interface type, and RAM requirements. The guide includes wiring diagrams using specific wire colors for connections like Chip Select, Reset, and data lines, along with library installation steps.

Parts used in the ST7565 Graphical LCD Project:

  • ST7565 Graphical LCD (128x64 pixels)
  • Rainbow wires
  • Soldering equipment
  • ATmega328 microcontroller
  • Level shifter or 4050 chip
  • Adafruit ST7565 Library
  • Arduino IDE

What it is…

Introduction:

This mini-tutorial will go through the process of setting up a ST7565 LCD. These LCDs are   graphical which means they can display pixels, not just text. This type of LCD in particular has 128×64 pixels, which appear dark gray on a green-blue background. They have a backlight but can also be used without the light on for daytime visibility.

Graphical LCDsAnother kind of LCD is the KS0108-type. These are not the same and are not compatible! Here are some comparisons

KS0108 ST7565
Voltage
5V
3.3V
Interface
Parallel
Serial
Data pins needed
14
4 or 5
Display size
128×64
128×64
Contrast adj.
requires potentiometer
internal, no extras!
Buffer needed?
No

Yes

As you can see there are a few differences.

  • For one the ST7565 runs at 3.3V not 5. This means a buffer chip or level shifting is necessary, you can use resistors or a chip like the 4050 (or equiv).
  • Second, the interface is Serial (one bit at a time) instead of Parallel (8 bits at a time). This means it uses waaay fewer pins (yay!)
  • The biggest downside is that you can’t read from the LCD in serial mode, only write. This means that the chip has to keep track of the display (the KS0108 lets you read or write). So whatever microcontroller you use will need to spend 1024 bytes (1Kb) of RAM on the display memory. For some chips this is a little and some its a lot – you will need to check the micro’s datasheet.

If you are using an ATmega168 or ATmega8 such as used in older Arduinos you must upgrade to a ‘328 to use this LCD. And if you’re using a ‘328 note that half the RAM is going to the display so you wont have a lot left over. This pretty much means you can’t use something with an SD card (like a Wave Shield or Data logger Shield at the same time you will straight-up run out of RAM and it will be weird so don’t bother).

Step 1: Get The Code & Wire It Up!

Get the code!

Schematic Graphical LCDs

     We’ve written a tidy library for both C and Arduinoese, if you aren’t using an AVR the C code is very portable and should take only a few minutes to turn into your favorite microcontroller.

Download it from github – click Download Source to grab it all. If you are using an Arduino, install the ST7565 folder which contains the library and an example sketch

Wire it up!
We’ll begin by soldering wires to the LCD. I’ll use rainbow wires to make it a bit easier to tell apart but you can use whatever you’d like. The pitch of the connector is 2mm which means it won’t fit into a breadboard but wires are easy to add on.

Here are the wire colors and the pins they go to:

  1. /CS – Chip Select – White
  2. /RST – Reset – Blue
  3. A0 – sometiimes called RS – Green
  4. SCLK – Serial clock – Yellow
  5. SID – Serial Input Data – Orange
  6. VDD – 3.3V power – Red
  7. GND – ground – Black
  8. K – LED cathode – Brown
  9. A – LED anode – White

For more detail: ST7565 LCDs: Graphical LCDs

Quick Solutions to Questions related to ST7565 Graphical LCD Project:

  • What is the resolution of the ST7565 display?
    The display has 128x64 pixels.
  • Does the ST7565 require a 5V power supply?
    No, it runs at 3.3V and requires level shifting if using 5V logic.
  • Can I read data from the ST7565 LCD?
    No, you can only write to the LCD in serial mode.
  • How much RAM does the microcontroller need for this display?
    The chip needs 1024 bytes of RAM to track the display memory.
  • Can I use an ATmega168 or ATmega8 with this LCD?
    No, you must upgrade to an ATmega328 because the smaller chips lack sufficient RAM.
  • What color wire connects to the VDD pin?
    A red wire connects to the VDD pin for 3.3V power.
  • Is the KS0108 compatible with the ST7565?
    No, they are not the same and are not compatible.
  • Can I use an SD card shield with this LCD on an ATmega328?
    No, you will run out of RAM if trying to use both simultaneously.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top