Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

How to display an image on Graphics LCD using AT89C52- (Part 45/45)

By Himanshu Choudhary

The Graphics LCD as the name suggests is a type of LCD which can display graphics. The graphical representation of any data presents good understanding than just characters. More user friendly applications can be designed by using the graphical LCDs. The graphical LCD can be used for advertisement boards or information boards and so on. This article explains the method of displaying image on a 128x64 graphical LCD using AT89C52. For basic operations and working, refer Graphics LCD interfacing with 8051

 


 

Microcontroller AT89C52 has been used to control the operations of the graphical LCD. The Graphics LCD used here is JHD12864E. This LCD is divided into two parts which are controlled by two different controllers. Each of these parts is divided into rows and columns. For basic instructions and programming procedure, refer to interfacing Graphics LCD with 8051. Also see displaying text on Graphics LCD.
 
For an image to be displayed on (128×64) graphics LCD, the image must have following features:
·         It should be in Windows BitMap format (.bmp)
·         It should be black and white (1 bit per pixel)
·         It should not have any compression
·         Its size should be 128 x 64 pixels
 
The hex code for an image can be generated from any of the bitmap code generating software available on internet. These codes are stored in an array and the array is stored in a header file with ‘.h’ extension. This header file must be included in main program. (The header file declarations for this project is given in Code2) The connections of Graphical LCD with controller are shown in circuit diagram.

 
Programming Steps:
 
A function is written to display the image in the format of a two dimensional array with size: [8][128].
a)    First, set the column and page to 0.
 
b)   Column is made to vary from 0 to 128 while row is kept constant. The corresponding hex code from the two dimensional array is then sent to the LCD Data Port.
 
c)     [ lcddata(&val[ (j*128) ],128); ] This condition is used to display codes on LCD from column 0 to 127. j*128 is given to skip 128 bytes when page(row) changes.

 

Project Source Code

###

/*Program to display Image on Graphics LCD using AT89C52*/

#include<reg51.h>
#include<intrins.h>
#define dport P2

#include "font.h"
#include "font2.h"
#include "smiley.h"

sbit rs=P1^0;
sbit rw=P1^1;
sbit en=P1^2;
sbit cs1=P1^3;
sbit cs2=P1^4;
unsigned char c;
unsigned char z=0;

void ctrloff()
{
	rs=0;
	rw=0;
	en=0;
	cs1=0;
	cs2=0;
}

//DELAY FUNCTION
void delay(unsigned int j)
{
	unsigned int i;
	for(i=0;i<j;i++);
}
			 
void displayon()
{ 
	ctrloff();
	dport=0x3f;  
	cs1=1;cs2=1;
	rw=0;rs=0;
	en=1;
	_nop_();  
	en=0;
}

void displayoff()
{
	ctrloff();
	dport=0x3e;
	cs1=1;cs2=1;
	rs=0;rw=0;
	en=1;
	_nop_(); 
	en=0;
}
 
void setcolumn(unsigned char y)
{
	if(y<64)
	{
		ctrloff();
		c=y;
		dport=0x40|(y&63);	  //0x40 represents Column 0
		cs1=1;cs2=0;
		rs=0;
		rw=0;
		en=1;
		_nop_();  
		en=0;
	}
	else
	{ 
		c=y;
		dport=0x40|((y-64)&63);	  //0x40 represents Column 0
		cs2=1;cs1=0;
		rs=0;
		rw=0;
		en=1;
		_nop_(); 
		en=0;
  
	}
}

void setpage(unsigned char x)
{
	ctrloff();
	dport= 0xb8|x;	   //0xb8 represents Page 0
	cs1=1;
	cs2=1;
	rs=0;
	rw=0;
	en=1;
	_nop_();
	en=0; 
}

//Function to Scroll Strings
void setstartline(unsigned char z)			 
{
	ctrloff();
	dport=0xc0|z;	   //0xc0 represents Line 0
	cs1=1;
	cs2=1;
	rs=0;
	rw=0;
	en=1;
	_nop_();  
	en=0;		  
} 

void lcddata(unsigned char *value,unsigned int limit)
{
	unsigned int i;
	for(i=0;i<limit;i++)
	{
		if(c<64)
		{
			dport=value[i];
			cs1=1;cs2=0;
			rs=1;
			rw=0;
			en=1;
			_nop_(); 
			en=0	;
			c++;
		}
		else
		{ 
			setcolumn(c);
			dport=value[i];
			cs2=1;cs1=0;
			rs=1;
			rw=0;
			en=1;
			_nop_();  
			en=0	;
			c++;
		}
		if(c>127)
	           return;
	}
}

void lcdputs1(unsigned char y,unsigned char x,unsigned char *str)
{
	unsigned char i;
	unsigned int a;
	setcolumn(y);
	setpage(x);
	for(i=0;str[i]!=0;i++)
	{
		a=(*(str+i));
		a*=8;
		lcddata(&Character8x8[a],8);
	}
}

void lcdputs2(unsigned char y,unsigned char x,unsigned char *str)
{
	unsigned char i;
	unsigned int a;
	setcolumn(y);
	setpage(x);
	for(i=0;str[i]!=0;i++)
	{
		a=(*(str+i)-32);
		a*=5;
		lcddata(&font5x7[a],5);
	}
}

//Function to display Image
void picture(unsigned char * val)
{
	unsigned char j;
	setcolumn(0);
	setpage(0);
	for (j=0;j<8;j++)
	{
		setpage(j);
		setcolumn(0);
		lcddata(&val[(j*128)],128);				 
	}
}

void clrlcd()
{
    unsigned char i,j;
    for (i=0;i < 8;i++)
    {
	setpage(i);
	setcolumn(0);
        for (j= 0 ;j < 128; j++)
        lcddata(&z,1);
    }
}


unsigned char ar0[]="****************";
unsigned char ar1[]="EngineersGarage";
unsigned char ar2[]="Inspiring Creations";
unsigned char ar3[]="Graphics LCD";
unsigned char ar4[]="128x64";

void main()
{
	unsigned char i;
	displayon();
	setstartline(0);
	clrlcd();
	picture(&smiley[0]); 
	delay(65000);
	delay(65000);
	delay(65000);
	delay(65000);
	delay(65000);
	clrlcd();
	
	lcdputs1(0,1,ar0);
	lcdputs1(0,2,ar1);
	lcdputs2(0,3,ar2);
	lcdputs2(0,4,ar3);
	lcdputs2(0,5,ar4);
	delay(60000);
	delay(60000);
	
	for(i=0;i<5;i++)
	{
		displayoff();
		delay(65000);
		displayon();
		delay(65000);
		delay(65000);
	}
	i=0;
	while(1)
	{
		setstartline(i++);	 //Function to Scroll Strings
		delay(40000);
	}
} 

###


Project Source Code

###

/**************************************************************/
/************** SMILEY.H **************************************/
/**************************************************************/
code unsigned char smiley[8][128]=
{
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,192,192,224,
224,240,240,248,248,248,252,252,252,252,252,254,254,254,254,254,254,254,254,254,254,
254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
254,254,254,252,252,252,252,252,252,252,252,252,248,248,248,248,248,240,240,240,240,
224,224,224,224,192,192,192,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},

{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,192,224,240,240,248,248,252,254,254,254,31,15,7,7,
3,3,3,3,3,3,7,7,31,31,31,31,15,15,15,15,7,7,7,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,7,7,7,7,7,7,7,15,15,15,15,31,31,31,31,63,63,63,127,127,255,255,255,
255,255,255,255,255,255,255,255,254,254,252,252,248,248,240,224,224,192,192,128,0,0,0,0,0},

{0,0,0,0,0,0,0,0,0,0,0,128,224,248,254,255,255,255,255,255,255,255,255,255,127,7,2,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,224,224,224,224,224,224,224,224,192,192,128,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,224,224,240,240,240,240,240,240,224,224,224,192,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,3,3,7,7,15,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,252,240,0,0},

{0,0,0,0,0,0,0,0,0,0,120,255,255,255,255,255,255,255,255,255,255,255,255,255,128,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3,3,3,3,3,3,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,3,3,3,3,3,3,1,1,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0},

{0,0,0,0,0,0,0,0,0,0,0,3,63,127,255,255,255,255,255,255,255,255,255,255,255,252,240,
224,192,128,0,0,0,0,0,0,0,0,0,0,0,24,56,48,112,96,96,224,192,192,192,192,192,192,192,
192,192,192,192,192,192,192,192,192,192,192,192,192,192,224,224,224,224,224,224,224,
224,224,224,224,224,224,240,248,248,252,126,126,63,63,31,31,15,15,7,7,0,0,0,0,0,0,0,
0,0,0,0,0,192,224,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,0,0},

{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,7,15,15,31,63,127,127,255,255,255,255,255,255,255,
255,254,252,252,248,248,248,240,240,224,224,192,192,128,128,128,0,0,0,0,0,0,0,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,
192,192,224,248,252,254,255,255,255,255,255,255,255,255,255,255,255,255,127,63,31,7,1,0,0,0,0},

{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,7,7,15,15,31,31,31,63,63,
127,127,127,255,255,255,255,255,255,255,255,255,254,254,254,254,252,252,252,252,252,
252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
252,252,252,252,252,252,252,252,252,254,254,254,254,254,254,255,255,255,255,255,255,
255,255,255,127,127,127,63,63,63,31,31,15,15,15,7,3,1,0,0,0,0,0,0,0,0,0,0},

{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,1,1,3,3,3,3,3,3,3,3,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,3,3,3,
3,3,3,3,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

};

/**************************************************************/
/************** FONT.H ****************************************/
/**************************************************************/
code unsigned char Character8x8[] = {
  0,   0,   0,   0,   0,   0,   0,   0,
126, 129, 149, 177, 177, 149, 129, 126,
126, 255, 235, 207, 207, 235, 255, 126,
 14,  31,  63, 126,  63,  31,  14,   0,
  8,  28,  62, 127,  62,  28,   8,   0,
 24, 186, 255, 255, 255, 186,  24,   0,
 16, 184, 252, 255, 252, 184,  16,   0,
  0,   0,  24,  60,  60,  24,   0,   0,
255, 255, 231, 195, 195, 231, 255, 255,
  0,  60, 102,  66,  66, 102,  60,   0,
255, 195, 153, 189, 189, 153, 195, 255,
112, 248, 136, 136, 253, 127,   7,  15,
  0,  78,  95, 241, 241,  95,  78,   0,
192, 224, 255, 127,   5,   5,   7,   7,
192, 255, 127,   5,   5, 101, 127,  63,
153,  90,  60, 231, 231,  60,  90, 153,
127,  62,  62,  28,  28,   8,   8,   0,
  8,   8,  28,  28,  62,  62, 127,   0,
  0,  36, 102, 255, 255, 102,  36,   0,
  0,  95,  95,   0,   0,  95,  95,   0,
  6,  15,   9, 127, 127,   1, 127, 127,
 64, 218, 191, 165, 253,  89,   3,   2,
  0, 112, 112, 112, 112, 112, 112,   0,
128, 148, 182, 255, 255, 182, 148, 128,
  0,   4,   6, 127, 127,   6,   4,   0,
  0,  16,  48, 127, 127,  48,  16,   0,
  8,   8,   8,  42,  62,  28,   8,   0,
  8,  28,  62,  42,   8,   8,   8,   0,
 60,  60,  32,  32,  32,  32,  32,   0,
  8,  28,  62,   8,   8,  62,  28,   8,
 48,  56,  60,  62,  62,  60,  56,  48,
  6,  14,  30,  62,  62,  30,  14,   6,
  0,   0,   0,   0,   0,   0,   0,   0,
  0,   6,  95,  95,   6,   0,   0,   0,
  0,   7,   7,   0,   7,   7,   0,   0,
 20, 127, 127,  20, 127, 127,  20,   0,
 36,  46, 107, 107,  58,  18,   0,   0,
 70, 102,  48,  24,  12, 102,  98,   0,
 48, 122,  79,  93,  55, 122,  72,   0,
  4,   7,   3,   0,   0,   0,   0,   0,
  0,  28,  62,  99,  65,   0,   0,   0,
  0,  65,  99,  62,  28,   0,   0,   0,
  8,  42,  62,  28,  28,  62,  42,   8,
  8,   8,  62,  62,   8,   8,   0,   0,
  0, 128, 224,  96,   0,   0,   0,   0,
  8,   8,   8,   8,   8,   8,   0,   0,
  0,   0,  96,  96,   0,   0,   0,   0,
 96,  48,  24,  12,   6,   3,   1,   0,
 62, 127, 113,  89,  77, 127,  62,   0,
 64,  66, 127, 127,  64,  64,   0,   0,
 98, 115,  89,  73, 111, 102,   0,   0,
 34,  99,  73,  73, 127,  54,   0,   0,
 24,  28,  22,  83, 127, 127,  80,   0,
 39, 103,  69,  69, 125,  57,   0,   0,
 60, 126,  75,  73, 121,  48,   0,   0,
  3,   3, 113, 121,  15,   7,   0,   0,
 54, 127,  73,  73, 127,  54,   0,   0,
  6,  79,  73, 105,  63,  30,   0,   0,
  0,   0, 102, 102,   0,   0,   0,   0,
  0, 128, 230, 102,   0,   0,   0,   0,
  8,  28,  54,  99,  65,   0,   0,   0,
 36,  36,  36,  36,  36,  36,   0,   0,
  0,  65,  99,  54,  28,   8,   0,   0,
  2,   3,  81,  89,  15,   6,   0,   0,
 62, 127,  65,  93,  93,  31,  30,   0,
124, 126,  19,  19, 126, 124,   0,   0,   
 65, 127, 127,  73,  73, 127,  54,   0,
 28,  62,  99,  65,  65,  99,  34,   0,
 65, 127, 127,  65,  99,  62,  28,   0,
 65, 127, 127,  73,  93,  65,  99,   0,
 65, 127, 127,  73,  29,   1,   3,   0,
 28,  62,  99,  65,  81, 115, 114,   0,
127, 127,   8,   8, 127, 127,   0,   0,
  0,  65, 127, 127,  65,   0,   0,   0,
 48, 112,  64,  65, 127,  63,   1,   0,
 65, 127, 127,   8,  28, 119,  99,   0,
 65, 127, 127,  65,  64,  96, 112,   0,
127, 127,  14,  28,  14, 127, 127,   0,
127, 127,   6,  12,  24, 127, 127,   0,
 28,  62,  99,  65,  99,  62,  28,   0,
 65, 127, 127,  73,   9,  15,   6,   0,
 30,  63,  33, 113, 127,  94,   0,   0,
 65, 127, 127,   9,  25, 127, 102,   0,
 38, 111,  77,  89, 115,  50,   0,   0,
  3,  65, 127, 127,  65,   3,   0,   0,
127, 127,  64,  64, 127, 127,   0,   0,
 31,  63,  96,  96,  63,  31,   0,   0,
127, 127,  48,  24,  48, 127, 127,   0,
 67, 103,  60,  24,  60, 103,  67,   0,
  7,  79, 120, 120,  79,   7,   0,   0,
 71,  99, 113,  89,  77, 103, 115,   0,
  0, 127, 127,  65,  65,   0,   0,   0,
  1,   3,   6,  12,  24,  48,  96,   0,
  0,  65,  65, 127, 127,   0,   0,   0,
  8,  12,   6,   3,   6,  12,   8,   0,
128, 128, 128, 128, 128, 128, 128, 128,
  0,   0,   3,   7,   4,   0,   0,   0,
 32, 116,  84,  84,  60, 120,  64,   0,
 65, 127,  63,  72,  72, 120,  48,   0,
 56, 124,  68,  68, 108,  40,   0,   0,
 48, 120,  72,  73,  63, 127,  64,   0,
 56, 124,  84,  84,  92,  24,   0,   0,
 72, 126, 127,  73,   3,   2,   0,   0,
152, 188, 164, 164, 248, 124,   4,   0,
 65, 127, 127,   8,   4, 124, 120,   0,
  0,  68, 125, 125,  64,   0,   0,   0,
 96, 224, 128, 128, 253, 125,   0,   0,
 65, 127, 127,  16,  56, 108,  68,   0,
  0,  65, 127, 127,  64,   0,   0,   0,
124, 124,  24,  56,  28, 124, 120,   0,
124, 124,   4,   4, 124, 120,   0,   0,
 56, 124,  68,  68, 124,  56,   0,   0,
132, 252, 248, 164,  36,  60,  24,   0,
 24,  60,  36, 164, 248, 252, 132,   0,
 68, 124, 120,  76,   4,  28,  24,   0,
 72,  92,  84,  84, 116,  36,   0,   0,
  0,   4,  62, 127,  68,  36,   0,   0,
 60, 124,  64,  64,  60, 124,  64,   0,
 28,  60,  96,  96,  60,  28,   0,   0,
 60, 124, 112,  56, 112, 124,  60,   0,
 68, 108,  56,  16,  56, 108,  68,   0,
156, 188, 160, 160, 252, 124,   0,   0,
 76, 100, 116,  92,  76, 100,   0,   0,
  8,   8,  62, 119,  65,  65,   0,   0,
  0,   0,   0, 119, 119,   0,   0,   0,
 65,  65, 119,  62,   8,   8,   0,   0,
  2,   3,   1,   3,   2,   3,   1,   0,
112, 120,  76,  70,  76, 120, 112,   0,
 14, 159, 145, 177, 251,  74,   0,   0,
 58, 122,  64,  64, 122, 122,  64,   0,
 56, 124,  84,  85,  93,  25,   0,   0,
  2,  35, 117,  85,  85, 125, 123,  66,
 33, 117,  84,  84, 125, 121,  64,   0,
 33, 117,  85,  84, 124, 120,  64,   0,
 32, 116,  87,  87, 124, 120,  64,   0,
 24,  60, 164, 164, 228,  64,   0,   0,
  2,  59, 125,  85,  85,  93,  27,   2,
 57, 125,  84,  84,  93,  25,   0,   0,
 57, 125,  85,  84,  92,  24,   0,   0,
  1,  69, 124, 124,  65,   1,   0,   0,
  2,   3,  69, 125, 125,  67,   2,   0,
  1,  69, 125, 124,  64,   0,   0,   0,
121, 125,  22,  18,  22, 125, 121,   0,
112, 120,  43,  43, 120, 112,   0,   0,
 68, 124, 124,  85,  85,  69,   0,   0,
 32, 116,  84,  84, 124, 124,  84,  84,
124, 126,  11,   9, 127, 127,  73,   0,
 50, 123,  73,  73, 123,  50,   0,   0,
 50, 122,  72,  72, 122,  50,   0,   0,
 50, 122,  74,  72, 120,  48,   0,   0,
 58, 123,  65,  65, 123, 122,  64,   0,
 58, 122,  66,  64, 120, 120,  64,   0,
154, 186, 160, 160, 250, 122,   0,   0,
  1,  25,  60, 102, 102,  60,  25,   1,
 61, 125,  64,  64, 125,  61,   0,   0,
 24,  60,  36, 231, 231,  36,  36,   0,
104, 126, 127,  73,  67, 102,  32,   0,
 43,  47, 252, 252,  47,  43,   0,   0,
255, 255,   9,   9,  47, 246, 248, 160,
 64, 192, 136, 254, 127,   9,   3,   2,
 32, 116,  84,  85, 125, 121,  64,   0,
  0,  68, 125, 125,  65,   0,   0,   0,
 48, 120,  72,  74, 122,  50,   0,   0,
 56, 120,  64,  66, 122, 122,  64,   0,
122, 122,  10,  10, 122, 112,   0,   0,
125, 125,  25,  49, 125, 125,   0,   0,
  0,  38,  47,  41,  47,  47,  40,   0,
  0,  38,  47,  41,  47,  38,   0,   0,
 48, 120,  77,  69,  96,  32,   0,   0,
 56,  56,   8,   8,   8,   8,   0,   0,
  8,   8,   8,   8,  56,  56,   0,   0,
 79, 111,  48,  24, 204, 238, 187, 145,
 79, 111,  48,  24, 108, 118, 251, 249,
  0,   0,   0, 123, 123,   0,   0,   0,
  8,  28,  54,  34,   8,  28,  54,  34,
 34,  54,  28,   8,  34,  54,  28,   8,
170,   0,  85,   0, 170,   0,  85,   0,
170,  85, 170,  85, 170,  85, 170,  85,
221, 255, 170, 119, 221, 170, 255, 119,
  0,   0,   0, 255, 255,   0,   0,   0,
 16,  16,  16, 255, 255,   0,   0,   0,
 20,  20,  20, 255, 255,   0,   0,   0,
 16,  16, 255, 255,   0, 255, 255,   0,
 16,  16, 240, 240,  16, 240, 240,   0,
 20,  20,  20, 252, 252,   0,   0,   0,
 20,  20, 247, 247,   0, 255, 255,   0,
  0,   0, 255, 255,   0, 255, 255,   0,
 20,  20, 244, 244,   4, 252, 252,   0,
 20,  20,  23,  23,  16,  31,  31,   0,
 16,  16,  31,  31,  16,  31,  31,   0,
 20,  20,  20,  31,  31,   0,   0,   0,
 16,  16,  16, 240, 240,   0,   0,   0,
  0,   0,   0,  31,  31,  16,  16,  16,
 16,  16,  16,  31,  31,  16,  16,  16,
 16,  16,  16, 240, 240,  16,  16,  16,
  0,   0,   0, 255, 255,  16,  16,  16,
 16,  16,  16,  16,  16,  16,  16,  16,
 16,  16,  16, 255, 255,  16,  16,  16,
  0,   0,   0, 255, 255,  20,  20,  20,
  0,   0, 255, 255,   0, 255, 255,  16,
  0,   0,  31,  31,  16,  23,  23,  20,
  0,   0, 252, 252,   4, 244, 244,  20,
 20,  20,  23,  23,  16,  23,  23,  20,
 20,  20, 244, 244,   4, 244, 244,  20,
  0,   0, 255, 255,   0, 247, 247,  20,
 20,  20,  20,  20,  20,  20,  20,  20,
 20,  20, 247, 247,   0, 247, 247,  20,
 20,  20,  20,  23,  23,  20,  20,  20,
 16,  16,  31,  31,  16,  31,  31,  16,
 20,  20,  20, 244, 244,  20,  20,  20,
 16,  16, 240, 240,  16, 240, 240,  16,
  0,   0,  31,  31,  16,  31,  31,  16,
  0,   0,   0,  31,  31,  20,  20,  20,
  0,   0,   0, 252, 252,  20,  20,  20,
  0,   0, 240, 240,  16, 240, 240,  16,
 16,  16, 255, 255,  16, 255, 255,  16,
 20,  20,  20, 255, 255,  20,  20,  20,
 16,  16,  16,  31,  31,   0,   0,   0,
  0,   0,   0, 240, 240,  16,  16,  16,
255, 255, 255, 255, 255, 255, 255, 255,
240, 240, 240, 240, 240, 240, 240, 240,
255, 255, 255, 255,   0,   0,   0,   0,
  0,   0,   0,   0, 255, 255, 255, 255,
 15,  15,  15,  15,  15,  15,  15,  15,
 56, 124,  68, 108,  56, 108,  68,   0,
252, 254,  42,  42,  62,  20,   0,   0,
126, 126,   2,   2,   6,   6,   0,   0,
  2, 126, 126,   2, 126, 126,   2,   0,
 99, 119,  93,  73,  99,  99,   0,   0,
 56, 124,  68, 124,  60,   4,   4,   0,
128, 254, 126,  32,  32,  62,  30,   0,
  4,   6,   2, 126, 124,   6,   2,   0,
153, 189, 231, 231, 189, 153,   0,   0,
 28,  62, 107,  73, 107,  62,  28,   0,
 76, 126, 115,   1, 115, 126,  76,   0,
 48, 120,  74,  79, 125,  57,   0,   0,
 24,  60,  36,  60,  60,  36,  60,  24,
152, 252, 100,  60,  62,  39,  61,  24,
 28,  62, 107,  73,  73,   0,   0,   0,
126, 127,   1,   1, 127, 126,   0,   0,
 42,  42,  42,  42,  42,  42,   0,   0,
 68,  68,  95,  95,  68,  68,   0,   0,
 64,  81,  91,  78,  68,  64,   0,   0,
 64,  68,  78,  91,  81,  64,   0,   0,
  0,   0,   0, 254, 255,   1,   7,   6,
 96, 224, 128, 255, 127,   0,   0,   0,
  8,   8, 107, 107,   8,   8,   0,   0,
 36,  54,  18,  54,  36,  54,  18,   0,
  0,   6,  15,   9,  15,   6,   0,   0,
  0,   0,   0,  24,  24,   0,   0,   0,
  0,   0,   0,  16,  16,   0,   0,   0,
 16,  48, 112, 192, 255, 255,   1,   1,
  0,  31,  31,   1,  31,  30,   0,   0,
  0,  25,  29,  23,  18,   0,   0,   0,
  0,   0,  60,  60,  60,  60,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0
};


/**************************************************************/
/************** FONT2.H ***************************************/
/**************************************************************/
code unsigned char font5x7[] = {
0x00, 0x00, 0x00, 0x00, 0x00,// (space)
0x00, 0x00, 0x5F, 0x00, 0x00,// !
0x00, 0x07, 0x00, 0x07, 0x00,// "
0x14, 0x7F, 0x14, 0x7F, 0x14,// #
0x24, 0x2A, 0x7F, 0x2A, 0x12,// $
0x23, 0x13, 0x08, 0x64, 0x62,// %
0x36, 0x49, 0x55, 0x22, 0x50,// &
0x00, 0x05, 0x03, 0x00, 0x00,// '
0x00, 0x1C, 0x22, 0x41, 0x00,// (
0x00, 0x41, 0x22, 0x1C, 0x00,// )
0x08, 0x2A, 0x1C, 0x2A, 0x08,// *
0x08, 0x08, 0x3E, 0x08, 0x08,// +
0x00, 0x50, 0x30, 0x00, 0x00,// ,
0x08, 0x08, 0x08, 0x08, 0x08,// -
0x00, 0x30, 0x30, 0x00, 0x00,// .
0x20, 0x10, 0x08, 0x04, 0x02,// /
0x3E, 0x51, 0x49, 0x45, 0x3E,// 0
0x00, 0x42, 0x7F, 0x40, 0x00,// 1
0x42, 0x61, 0x51, 0x49, 0x46,// 2
0x21, 0x41, 0x45, 0x4B, 0x31,// 3
0x18, 0x14, 0x12, 0x7F, 0x10,// 4
0x27, 0x45, 0x45, 0x45, 0x39,// 5
0x3C, 0x4A, 0x49, 0x49, 0x30,// 6
0x01, 0x71, 0x09, 0x05, 0x03,// 7
0x36, 0x49, 0x49, 0x49, 0x36,// 8
0x06, 0x49, 0x49, 0x29, 0x1E,// 9
0x00, 0x36, 0x36, 0x00, 0x00,// :
0x00, 0x56, 0x36, 0x00, 0x00,// ;
0x00, 0x08, 0x14, 0x22, 0x41,// <
0x14, 0x14, 0x14, 0x14, 0x14,// =
0x41, 0x22, 0x14, 0x08, 0x00,// >
0x02, 0x01, 0x51, 0x09, 0x06,// ?
0x32, 0x49, 0x79, 0x41, 0x3E,// @
0x7E, 0x11, 0x11, 0x11, 0x7E,// A
0x7F, 0x49, 0x49, 0x49, 0x36,// B
0x3E, 0x41, 0x41, 0x41, 0x22,// C
0x7F, 0x41, 0x41, 0x22, 0x1C,// D
0x7F, 0x49, 0x49, 0x49, 0x41,// E
0x7F, 0x09, 0x09, 0x01, 0x01,// F
0x3E, 0x41, 0x41, 0x51, 0x32,// G
0x7F, 0x08, 0x08, 0x08, 0x7F,// H
0x00, 0x41, 0x7F, 0x41, 0x00,// I
0x20, 0x40, 0x41, 0x3F, 0x01,// J
0x7F, 0x08, 0x14, 0x22, 0x41,// K
0x7F, 0x40, 0x40, 0x40, 0x40,// L
0x7F, 0x02, 0x04, 0x02, 0x7F,// M
0x7F, 0x04, 0x08, 0x10, 0x7F,// N
0x3E, 0x41, 0x41, 0x41, 0x3E,// O
0x7F, 0x09, 0x09, 0x09, 0x06,// P
0x3E, 0x41, 0x51, 0x21, 0x5E,// Q
0x7F, 0x09, 0x19, 0x29, 0x46,// R
0x46, 0x49, 0x49, 0x49, 0x31,// S
0x01, 0x01, 0x7F, 0x01, 0x01,// T
0x3F, 0x40, 0x40, 0x40, 0x3F,// U
0x1F, 0x20, 0x40, 0x20, 0x1F,// V
0x7F, 0x20, 0x18, 0x20, 0x7F,// W
0x63, 0x14, 0x08, 0x14, 0x63,// X
0x03, 0x04, 0x78, 0x04, 0x03,// Y
0x61, 0x51, 0x49, 0x45, 0x43,// Z
0x00, 0x00, 0x7F, 0x41, 0x41,// [
0x02, 0x04, 0x08, 0x10, 0x20,// ""
0x41, 0x41, 0x7F, 0x00, 0x00,// ]
0x04, 0x02, 0x01, 0x02, 0x04,// ^
0x40, 0x40, 0x40, 0x40, 0x40,// _
0x00, 0x01, 0x02, 0x04, 0x00,// `
0x20, 0x54, 0x54, 0x54, 0x78,// a
0x7F, 0x48, 0x44, 0x44, 0x38,// b
0x38, 0x44, 0x44, 0x44, 0x20,// c
0x38, 0x44, 0x44, 0x48, 0x7F,// d
0x38, 0x54, 0x54, 0x54, 0x18,// e
0x08, 0x7E, 0x09, 0x01, 0x02,// f
0x08, 0x14, 0x54, 0x54, 0x3C,// g
0x7F, 0x08, 0x04, 0x04, 0x78,// h
0x00, 0x44, 0x7D, 0x40, 0x00,// i
0x20, 0x40, 0x44, 0x3D, 0x00,// j
0x00, 0x7F, 0x10, 0x28, 0x44,// k
0x00, 0x41, 0x7F, 0x40, 0x00,// l
0x7C, 0x04, 0x18, 0x04, 0x78,// m
0x7C, 0x08, 0x04, 0x04, 0x78,// n
0x38, 0x44, 0x44, 0x44, 0x38,// o
0x7C, 0x14, 0x14, 0x14, 0x08,// p
0x08, 0x14, 0x14, 0x18, 0x7C,// q
0x7C, 0x08, 0x04, 0x04, 0x08,// r
0x48, 0x54, 0x54, 0x54, 0x20,// s
0x04, 0x3F, 0x44, 0x40, 0x20,// t
0x3C, 0x40, 0x40, 0x20, 0x7C,// u
0x1C, 0x20, 0x40, 0x20, 0x1C,// v
0x3C, 0x40, 0x30, 0x40, 0x3C,// w
0x44, 0x28, 0x10, 0x28, 0x44,// x
0x0C, 0x50, 0x50, 0x50, 0x3C,// y
0x44, 0x64, 0x54, 0x4C, 0x44,// z
0x00, 0x08, 0x36, 0x41, 0x00,// {
0x00, 0x00, 0x7F, 0x00, 0x00,// |
0x00, 0x41, 0x36, 0x08, 0x00,// }
};

###


Circuit Diagrams

Circuit-Diagram-Of-Displaying-Image-Graphics-LCD-AT89C52

Project Components

  • AT89C52 Microcontroller
  • Graphics LCD

Project Video


Filed Under: 8051 Microcontroller
Tagged With: at89c52, display, lcd, microcontroller
 

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • PS2 Keyboard To Store Text In SD Card Using Arduino Circuit Setup On Breadboard
    How To Use PS2 Keyboard To Store Text In SD Card Using Arduino- (Part 42/49)
  • Wireless Path Tracking System Using Mouse, XBee And Arduino Circuit Setup On Breadboard
    How To Make A Wireless Path Tracking System Using Mouse, XBee And Arduino- (Part 43/49)
  • How to Make a Wireless Keyboard Using Xbee with Arduino- (Part 44/49)
  • Making Phone Call From GSM Module Using Arduino Circuit Setup On Breadboard
    How to Make Phonecall From GSM Module Using Arduino- (Part 45/49)
  • How to Make a Call using Keyboard, GSM Module and Arduino
    How To Make A Call Using Keyboard, GSM Module And Arduino- (Part 46/49)
  • Receiving SMS Using GSM Module With Arduino Prototype
    How to Receive SMS Using GSM Module with Arduino- (Part 47/49)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • Renesas delivers intelligent sensor solutions for IoT applications
  • Microchip Technology releases AVR-IoT Cellular Mini Development Board
  • Qualcomm acquires Cellwize to accelerate 5G adoption and spur infrastructure innovation
  • MediaTek’s chipset offers high-performance option for 5G smartphones
  • Nexperia’s new level translators support legacy and future mobile SIM cards

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • SRF04 module measure distance
  • Adaptive filters fundamental
  • Using LTspice to check Current sense transformer reset?
  • Thermal pad construction on pcb
  • lna+mixer noise figure problem

RSS Electro-Tech-Online.com Discussions

  • Are Cross-wind compensation and Road crown compensation functions inputs to LKA function?
  • Interfacing ZMOD4410 with Arduino UNO
  • Help diagnosing a coffee maker PCB
  • Capacitor to eliminate speaker hum
  • Identify a circuit.
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering