An Overview Of Graphic LCD With KS0108 Controller
Graphic LCD commonly found in electronics equipment, comes with various sizes. It's actually a dot matrix display, made from tiny crystal points with display driver and controller. There are many different part numbers of display driver and controller.
An industrial standard ks0108 dot matrix graphic LCD controller. Currently there are many controller IC compatible with this one. This chip is embedded in a graphic LCD module with an 8-bit parallel port interface with some additional control pins. It could be found from any online store such as E bay or Amazon around 7 US Dollars.
A RT12864J-1 graphical LCD module |
It comes with 20 pins connection.
Pin diagram of KS0108 LCD Module |
One KS0108 controller could drive 64 segment. Thus to get 128 segments they put two KS0108 controller IC. As we can see, we have two chip select pin for these two segments driver IC. Another common driver used for driving its common pins. It's KS0107 common driver. KS0107 could drive up to 64 common pins of the dot matrix.
C Programming And Interfacing With PIC16F877A
Many C compiler such as MikroC and CCS PICC develop a library for this controller IC. CCS PICC is fast and efficient. In this example, I use PIC16F877A to interface with a 128x64 LCD module controlled by KS0108/KS0107 IC.
Schematic Diagram. The LCD module in Proteus different in pin outs. But it functions the same to the physical hardware. |
The overall program just show the power up time of the system that being run by PIC16F877A.
#include <16F877A.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
#define GLCD_CS1 PIN_B0
// Chip Selection 1
#define GLCD_CS2 PIN_B1
// Chip Selection 2
#define GLCD_DI PIN_B2
// Data or Instruction input
#define GLCD_RW PIN_B3
// Read/Write
#define GLCD_E PIN_B4
// Enable
#define GLCD_RST PIN_B5
// Reset
#define xOffSet 25
#include <HDM64GS12.c>
#include <graphics.c>
void main() {
char txt1[]="Start Up Time:";
char timeString[15];
int timeCounter=0;
int second=0;
int minute=0;
int hour=0;
glcd_init(ON);
glcd_text57(23,15,txt1,1,ON);
while(1){
/* Get time in second*/
second=timeCounter;
if(second>60){
minute+=1;
timeCounter=0;
}
if(minute>60){
hour+=1;
minute=0;
}
if(hour>24) hour=0;
/*convert number to string data*/
sprintf(timeString,"%u:%u:%u",hour,minute,second);
/*Clear the old value using a mask rectangle*/
glcd_rect(23,25,120,40,YES,OFF);
/*Show the time text string*/
glcd_text57(23,25,timeString,2,ON);
delay_ms(1000);
timeCounter+=1;
}
}
The simulation screen shot |
If you want a standard PCB for ATMega32 micro-controller, you can order my AVR Microcontroller project from PCBWay with a reasonable price. Click here to get a free $5 credit for new account.
ATMega16 ATMega32 Experiment Board PCB from PCBWay |
We can the ATMega32 micro-controller to interface with this graphical LCD module. Check this link for more information.
This is actually good to read content of this blog. A is very general and huge knowledgeable platform has been known by this blog. I in reality appreciate this blog to have such kind of educational knowledge. graphic LCD
ReplyDeletePositive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. TV BF Deals
ReplyDeleteI curious more interest in some of them hope you will give more information on this topics in your next articles. JBL Pulse 3
ReplyDeleteRecruitment Technology has for a long time fallen behind the developments in other professional industries such as accounting, legal, insurance etc. with a number of excellent technology tools and software products being developed in these areas. Recently though their has been a surge of development within recruitment technology with some truly fantastic products being developed to take us out of the dark ages of recruitment methodologies. But if recruiters don't embrace this development we will hinder our progress into the future. Programming Help
ReplyDeleteThanks for visiting my blog.
ReplyDeleteThank you very much.Very informative and impressive post you have written.HDMI Display with USB TouchScreen manufacturers
ReplyDeleteOh It's really good.
DeleteThere is quite a bit of misinformation and hype about electric vehicles. In this article, a group of motorsports enthusiasts dig deeper into the realities, myths, and misconceptions many people have about electrics. Even if you currently do not have interest in an electric vehicle, this information does impact you. https://electricity24.nl/
ReplyDelete