graphic lcd module ks0108 free sample
In this tutorial we will look at interfacing KS0108 display controller based JHD12864E display. There are many displays out there based on KS0108 or compatible display controller. They all work the same way, but make sure to check the datasheet for the pin diagram because the pin layout is not uniform, if you"ve a display from different manufacturer. We will look at the working of the display, the hardware setup and programming with ATmega32. You may use any other AVR MCU as well. You may port the library for other MCUs as well. We have it tested and working on 8051 PIC and ARM. We may do a similar tutorial on these MCUs as well. Unlike a 16 x 2 display, this does not have a character map for ascii values stored on its ROM. However it allows us the flexibility of creating fonts like Arial, times new roman etc. We could also display bit-map images on it and stretching it little further we can make GUI"s and little animation, but that"s for another day. So lets get started.
The image tells the story of the a 128 x 64 display. The display that we used for the tutorial is JHD12864E and it has two KS0108 controllers in built. Each controller controls 64 x 64 pixels. Hence the display is 128 pixels wide and 64 pixels in height.
If you"ve used a 16x2 displayed, this works exactly like it. However note that there is no ROM on this LCD. Hence the ASCII character patterns are not stored any where.
Well there are lot of things that can be done with the GLCD, and we will cover it in the GLCD interfacing with microcontroller tutorials. I am looking forward for your comments, doubts, suggestion or feedback.
The 128 x 64 graphics displays (GLCDs) like JHD12864 and other use KS0108 as the display controller. In this tutorial we will look at interfacing such a display with Explore M3. We will be using a graphics library written by Michael Margolis.
The pinout may differ according to the make of the LCD. For this sketch to work ensure that the pins are connected in the following manner. If you wish to change the pin configuration, it can be done in KS0108_pins.h file.
Since there are numerous connections and few passive parts to set the contrast and negative voltage etc. I will be using the LCD breakout board and the JHD12864 display that we see at our EE Store.
In this project, I will show you how to interface a 128X64 Graphical LCD with Arduino UNO. This particular LCD Module is based ST7920 LCD Controller. So, we will first see a little bit about the Graphical LCD Module and its LCD Controller ST7920.
In the previous Arduino project, I have interfaced a Nokia 5110 LCD Module with Arduino. It is also a graphical LCD which can display some basic bitmap images and graphics. But the issue with Nokia 5110 LCD Module is its resolution.
At 84 x 48 pixels, the Nokia 5110 LCD can be used for implementing a menu-based user interface. Due to its small size, the resulting menu will be limited to 3 or 4 items per page.
If we want a bigger display with more real estate to work with, then the obvious choice is to go for the bigger and better 128×64 Graphical LCD Module.
As a demonstration, after making all the hardware connections, I will display a bitmap image on the Graphical LCD Module. If you are interested in implementing a simple 16×2 Alpha-Numeric LCD with Arduino, then check out this tutorial.
At first glance, the 128×64 Graphical LCD Module seems like a bigger brother to the famous 16×2 LCD or 20×4 LCD Modules, with their similar construction and almost similar pin layout.
But there is a significant difference between those two. 16×2 or 20×4 LCDs are essentially character displays. They can only display alpha-numeric characters and some simple custom characters that are confined to a 5×8 matrix.
By using different combinations of pixels, we can basically display characters of various sizes. But the magic doesn’t end there. You can display images and graphics (small animations) as well. In a 128×64 LCD Module, there are 64 rows and 128 columns.
There are several versions of the Graphical LCD in the market. Even though the usage, application and implementations are almost identical, the main difference lies in the internal LCD Controller used to drive the dot matrix display.
Some of the commonly used LCD Controllers are KS0108, SSD1306, ST7920, SH1106, SSD1322, etc. The pin out of the final LCD Module might vary depending on the LCD Controller used. So, please verify the LCD Controller as well as the pin out before making a purchase.
The Graphical LCD Module I purchased consists of ST7920 Controller. It is manufactured by Sitronix and supports three types of bus interfaces i.e., 8-bit mode, 4-bit mode and Serial interface.
If you have used 16×2 LCD Display earlier, then you might be familiar with both 4-bit as well as 8-bit parallel interfaces. The serial interface is something new and we will explore this option in this project.
As I already mentioned, double-check with the manufacturer about the pinout of the Graphical LCD Module. The following table describes the pinout of the 128×64 LCD Module that I have.
Now that we have seen a little bit about the Graphical LCD and its controller ST7920, let us now proceed with interfacing the 128×64 Graphical LCD with Arduino. I will implement a simple circuit to demonstrate how easy it is to interface the LCD and Arduino using very few external components.
So, connect the RS, RW and E of the LCD to Digital IO pins 10, 11 and 13 of Arduino UNO. Also, in order to select the Serial Interface Mode, the PCB pin must be connected to GND.
The remaining connections are similar to a traditional 16×2 LCD. VCC and GND are connected to 5V and ground of the power supply. VO is connected to the wiper of a 10KΩ POT while the other two terminals of the POT are connected to 5V and GND respectively.
I have used the above “The Office” logo. Remember that the resolution of the 128×64 LCD is, well 128×64 pixels. So, the maximum image size should be 128×64. So, using Microsoft Paint, I have brought down the resolution of the above image to 128×64 pixels and also saved it as Monochrome Bitmap Image.
A simple project for interfacing the 128×64 Graphical LCD with Arduino is implemented here. Instead of displaying plain characters, I have displayed a bitmap image on the LCD to show its capability.
Trying to find wholesale deals on advanced graphic lcd module ks0108 monitors? Well, you"re in luck! Alibaba.com offers affordable graphic lcd module ks0108 monitors and accessories that creators of all skill levels can find useful.
Consumer demand for digital monitors and LCD graphics displays is fueled by industries and lines of work that require any type of graphic design material or content. Graphic artists and graphic designers value high-quality computer screen graphics that provide bright visuals and clear details. Aspects like a graphic monitor"s dimension, resolution, and color accuracy are all things consumers take into consideration when determining which type of graphic lcd module ks0108 is right for them.
Whether customers are producing marketing material, editing editorial designs, or creating informative and interactive infographics, they"ll need a powerful digital display to match. The same goes for game designers and artists, who require incredible levels of graphic detail to design video game content consumers will love. As technology like virtual reality and augmented reality become more accessible to everyday consumers, the need for graphic designers and advanced graphic lcd module ks0108 models is likely to increase as well.
Since graphic material appears in almost every industry in some form or another, it is probably a great time to make sure your inventory is stocked with these essential graphic lcd module ks0108 items. Fortunately, on Alibaba.com, you can quickly find some of the best monitors for graphic design and monitors for artists.
You can edit the GLCD_BufferWrite and GLCD_BufferRead functions to change the buffer"s location from the RAM to the EEPROM or any other external memory source.
A graphical LCD is an electronic display unit which can display any type of elements provided by the user. Unlike a character LCD which can only display alphanumeric characters, a graphical LCD can display images, fonts and other structures. This article gives details of graphic LCD interfacing with a PIC microcontroller.
JHD12864 graphical LCD has a resolution of 128×64 which means that it can display 8192 pixels on the screen. In comparison with character LCD, it can display anything on the screen provided by the user. Character LCD only displays the alphanumerical characters. The user can create images, fonts and other structures and display on them. It uses KS0108 display controllers for controlling LCD panels on the GLCD.
KS0108 is a dot matrix display controller from Samsung with 64 channel output. It receives input as 8-bit parallel data and stores in data RAM which has a capacity of 512 bytes (512×8 = 4096 bits). To drive 128×64 graphic display, we will need two of these controllers and each will be controlling a half of 64×64 pixels. To generate timing signals for these two controllers, there is a common driver KS0107. There are also other display controllers for graphic LCD, an example is Toshiba T6963C. But we will be discussing about KS0108 based graphic LCD interfacing in this article.
The pin 18 is the output of a negative voltage generator. It generates -10V in the case of JHD12864 GLCD module. By using a potentiometer, we can generate the required operating voltage by feeding the negative voltage to the Vo pin. The resulting LCD voltage will be Vdd-Vo (If the pot is in minimum, 5-(-10) = 15V). From the datasheet of JHD12864 module, the maximum LCD voltage allowed is 18V. We can vary Vo to change the contrast of the display.
CS1 and CS2 pins are used to select the KS0108 controller from the two. CS1 selects the left side controller and CS2 selects the right one which in turn selects the corresponding side of the displays 64×64 pixels. RST is the reset pin, it is used to reset the entire display content by clearing whole of the display RAM. R/W pin selects the type of operation being performed by the GLCD, a High indicates read operation and a Low indicates write operation. Data/Instruction (D/I) selects between data transfer or instruction.
The Enable pin is the clock of GLCD. It is used to clock the data/instruction to the display module. For transferring the data or instruction, first you need to place the data on the data lines, then pull R/W and D/I High or Low according to the type of instruction and then set the Enable pin Low and then a High in order to transfer the data. One of the important consideration while clocking is, always give at least 1 microsecond delay after every instruction or data transfer. This parameter will be defined as Ecycle in the datasheet of the module. For JHD12864, the Ecycle value is 1us.
Graphical LCD block diagram is given below, it has two KS0108 segment drivers and a KS0107 common driver. KS0108 is a dot matrix LCD segment driver with 64 channel output which maintains one half of the GLCD. KS0107 is a 64 channel common driver which generates timing signals to control the other two KS0108 segment drivers.
There is also a negative voltage generator which outputs the negative voltage through Vee pin. In some display modules, this section may not be present. So we will need to generate the negative voltage from outside. In some GLCD displays, the segment and common drivers used will be made by different manufacturer, but they will be compatible with KS0108 controllers.
Each KS0108 controls half of 128×64, that is 64×64 pixels. To select the one half, make the chip select pin low while making the other’s pin high. There are 8 pages in each half which is controlled by each KS0108 controller. One page (one row) contains 64 columns of 8 rows. Whenever we transfer the data, we first selects the half by CS bits, then page address (X) and then the Y address. The byte will be transferred as a 1 bit wide strip and will be stored in display RAM location. We can summarise this process as follows.
Take an example of displaying ‘P’ in the first line of GLCD. We are making a font of size 5×7 pixels. We will be leaving first two columns, 8th column and last row of the page for spacing. These fonts are called 5×7 fonts. Below image explains how the fonts are created in graphic LCDs.
The above table lists different instructions available for KS0108 controller. For example, to turn the display ON, make RS and R/W Low, put 00111111 in DB7-DB0 pins and clock it by making enable pin Low to High. We will be discussing each of the instructions and implementation in the next part of this article.
To interface the graphical LCD, we need one 8-bit port and 6 other pins. We may avoid using RST pin, but we will need to ground it for using the LCD. Below is the circuit diagram of GLCD interfacing with PIC18F4550. We have used a 1K resistor to limit the current to the backlit LED.