Go Down

Topic: Help with display: 12864 / Controller ST7920 (Read 3 times) previous topic - next topic


Hi everyone,

brief introduction: I have not much of a develloper skill, I know how to read and interprete codes though. I started with the Arduino a few weeks ago and I am currently building my own aqua controller. Currentlich I have finished the dimming of 4 different HighPowerLED-stripes. I am using a RTC for that.
Btw, I am from Germany but did not find much information in the German part of this forum.

My next step is adding an LCD display to it. I have a 12864 / Controller ST7920.
I want to display only text / ASCII in four rows.
There should be a change like every minute in the display like:
1) Show percentige of the Dim-status of each LED stripe (row1= "Blue: Dimmed by 55%") etc
2) Show Time (RTC) in hh/mm/ss
3) Show water temperaturer (later, not built yet)
and then loop back to 1.

Here we go:
I do have problems with the setup of my display. I was able to connect everything as shown in this thread:
and installed the PONG game.
I could see the graphics but it was very dark.
I noticed I needed to setup a POTI but couldn't.

so my questions are now:
1) any good tutorial on the net where this is explained even for LCD beginners?
2) Do I need a POTI or is there any other way to get the screen lighter? I have a 4 WATT 4,7 kOHM Potz, can I use that and how do I connect it? (Do I connect it to the Arduino or to the display?)
3) Since I only would like to show ASCII / text, do I really need all these PINs connected?? I think it is quite a lot. (see below)

Hope that someone could help me

Wiring: (taken from the link I attached)

EN = Arduino Pin 18
RS = Arduino Pin 17
RW = Arduino Pin 16
D7 = Arduino Pin 7
D6 = Arduino Pin 6
D5 = Arduino Pin 5
D4 = Arduino Pin 4
D3 = Arduino Pin 11
D2 = Arduino Pin 10
D1 = Arduino Pin 9
D0 = Arduino Pin 8
CSEL1 = Arduino Pin 14
You also need to connect a POT with 5V on one side, ground on the other, and 5V (perhaps with 150 Ohm resistance) + LCD Pin 19 to the wiper (middle one usually). Otherwise you won't see much.


Yes, you need the POT1 in order to adjust contrast so you can see the image as sharply as possible.
No, you have to use all pins to even display texts. The screen treats everything as pixels, including the characters.

I strongly suggest you go with 20X4 HD44780-compatible character displays. They are so much easier to use and a lot easier to understand the code. Plus, only 6 arduino pins are needed. You still need a POT though.

Here is an online store where you can buy one:
They have tutorials on how to hook it up.

Another place to buy:

You can also buy a shield for the display to save you from jumper wire spaghetti monsters.


well,the thing is that I already bought one of them...didnt expect it to be that hard to use.
would like to tra out first before gettig a new/other on.
anyone else who could help me?


You can try a smaller character display for cheap: http://dipmicro.com/store/LCD-1602A-Y

Or you can go through this tutorial (instead of the one you pointed out):

and dissect the code. You can print text with basic commands like:

Code: [Select]
  // display number of iterations in one second
  GLCD.ClearScreen();               // clear the screen 
  GLCD.CursorTo(13,2);              // positon cursor 
  GLCD.Puts("FPS= ");               // print a text string 
  GLCD.PrintNumber(iter);           // print a number

I've got a display like yours and I played with it as far as loading a demo. It's just too many wires and too complicated for my text-based projects.


ok, thx. I will think about using this one or gettings another one.
First will try to get this one working, we'll see.
So for the potentiometre...does the resistor factor matter? I have a 4,7kOhm.

Go Up