In this article, we will discuss BIG Font display with 16×2 LCD. Normal 16×2 LCD can show small fonts but if you wish to show big font, it is possible too. Many people have displayed big fonts and used them in their projects which looks so nice to me. So I make one of mine which I’m sharing here and you can make that too for your project.

Disclaimer:

Advertisements

LCD Display:

There are many types of LCD displays in the market. But for electronic projects or some products, 16×2 LCD displays are used in very common.

LCD display

We who are working with electronics, this type of LCD display is very common to us. We know what type of character we can show in this display. Today, we’ll learn how to show Big fonts in this display.

You may find this helpful: How to remove noise/garbage from the HD44780 LCD display

Circuit Diagram:

Here I’m using a PIC16F877A micro-controller but if you clearly understand the concept and have little experience with programming, I hope you can do this project with almost any micro-controllers. Anyway, here is the circuit diagram that I’ll use for this project:

BIG Font display with 16x2 LCD
Circuit Diagram 1
BIG Font display with 16x2 LCD
Circuit Diagram 2

Download proteus file of this project.

mikroC code:

/*******************************************************************************
* Program for Big font Display on 16X2 LCD                                     *
* Program Written by_ Engr. Mithun K. Das                                      *
* MCU:PIC16F877A; X-Tal:20MHz; mikroC pro for PIC v7.6.0                       *
* Date:18-04-2020                                                              *
*******************************************************************************/
#include "CustomeChar.h"
// LCD module connections
sbit LCD_RS at RB7_bit;
sbit LCD_EN at RB6_bit;
sbit LCD_D4 at RB5_bit;
sbit LCD_D5 at RB4_bit;
sbit LCD_D6 at RB3_bit;
sbit LCD_D7 at RB2_bit;

sbit LCD_RS_Direction at TRISB7_bit;
sbit LCD_EN_Direction at TRISB6_bit;
sbit LCD_D4_Direction at TRISB5_bit;
sbit LCD_D5_Direction at TRISB4_bit;
sbit LCD_D6_Direction at TRISB3_bit;
sbit LCD_D7_Direction at TRISB2_bit;
// End LCD module connections

unsigned int number1[4],number0[4];
int j=0;
void Disp_temp(unsigned int value)
{
    number1[0] = value/1000%10;
    if(number1[0]!=number0[0])
    {
       LCD_Erase(1,1);
       LCD_BigFont(1,1,number1[0]);
    }
    else  
    {
       LCD_BigFont(1,1,number1[0]);
    }
    
    number1[1] = value/100%10;
    if(number1[1]!=number0[1])
    {
       LCD_Erase(1,5);
       LCD_BigFont(1,5,number1[1]);
    }
    else
    {
       LCD_BigFont(1,5,number1[1]);
    }
    
    number1[2] = value/10%10;
    if(number1[2]!=number0[2])
    {
       LCD_Erase(1,9);
       LCD_BigFont(1,9,number1[2]);
    }
    else
    {
       LCD_BigFont(1,9,number1[2]);
    }


    number1[3] = value%10;
    if(number1[3]!=number0[3])
    {
       LCD_Erase(1,13);
       LCD_BigFont(1,13,number1[3]);
    }
    else
    {
       LCD_BigFont(1,13,number1[3]);
    }
    
    for(j=0;j<4;j++)
    {
       number0[j]=number1[j];
    }
}

unsigned int counter=0;
void main()
{
  ADCON1 = 0x07;
  ADCON0 = 0x00;
  Lcd_Init();
  Lcd_Cmd(_LCD_CLEAR);
  Lcd_Cmd(_LCD_CURSOR_OFF);
  Lcd_Out(1,1,"Big Font LCD");
  Delay_ms(2000);
  Lcd_Cmd(_LCD_CLEAR);
 while(1)
 {

    Disp_temp(counter);
    counter++;
    Delay_ms(1000);
 }
}




//

This is the main code of our project where I used a sub-function “Disp_temp()” and called that in while(1) loop. In this sub-function, I simply put the number in 4 digits sequentially and erased then printed the digit it is changed. In this way, we can remove garbage on display. Code is simple and easily understandable. For the custom numbers, I used a CustomeChar library file.

Here I simply used a custom library that needs to add with the main source file from the header file section of the mikroC compiler.

Add header file in mikroC project file

Here is that header file that I used here.

char CUL[] = {7,15,31,31,31,31,31,31};
char UP[] = {31,31,31,0,0,0,0,0};
char CUR[] = {28,30,31,31,31,31,31,31};
char CDL[] = {31,31,31,31,31,31,15,7};
char DOWN[] = {0,0,0,0,0,31,31,31};
char CDR[] = {31,31,31,31,31,31,30,28};
char EIGHT_UP[] = {31,31,31,0,0,0,31,31};
char i=0;

void Disp_0(char row, char column)
{
        Lcd_Cmd(64);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CUL[i]);
        Lcd_Chr(row, column, 0);
        Lcd_Cmd(72);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(UP[i]);
        Lcd_Chr(row, column + 1, 1);
        Lcd_Cmd(80);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CUR[i]);
        Lcd_Chr(row, column + 2, 2);
        Lcd_Cmd(88);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CDL[i]);
        Lcd_Chr(row + 1, column, 3);
        Lcd_Cmd(96);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(DOWN[i]);
        Lcd_Chr(row + 1, column + 1, 4);
        Lcd_Cmd(104);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CDR[i]);
        Lcd_Chr(row + 1, column + 2, 5);
}
void Disp_1(char row, char column)
{
        Lcd_Cmd(72);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(UP[i]);
        Lcd_Chr(row, column, 1);
        Lcd_Cmd(80);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CUR[i]);
        Lcd_Chr(row, column + 1, 2);
        Lcd_Cmd(96);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(DOWN[i]);
        Lcd_Chr(row + 1, column, 4);
        Lcd_Chr(row + 1, column + 1, 255);
        Lcd_Cmd(96);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(DOWN[i]);
        Lcd_Chr(row + 1, column + 2, 4);
}
void Disp_2(char row, char column)
{
        Lcd_Cmd(112);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(EIGHT_UP[i]);
        Lcd_Chr(row, column, 6);
        Lcd_Cmd(112);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(EIGHT_UP[i]);
        Lcd_Chr(row, column + 1, 6);
        Lcd_Cmd(80);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CUR[i]);
        Lcd_Chr(row, column + 2, 2);
        Lcd_Cmd(88);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CDL[i]);
        Lcd_Chr(row + 1, column, 3);
        Lcd_Cmd(96);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(DOWN[i]);
        Lcd_Chr(row + 1, column + 1, 4);
        Lcd_Cmd(96);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(DOWN[i]);
        Lcd_Chr(row + 1, column + 2, 4);
}
void Disp_3(char row, char column)
{
        Lcd_Cmd(112);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(EIGHT_UP[i]);
        Lcd_Chr(row, column, 6);
        Lcd_Cmd(112);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(EIGHT_UP[i]);
        Lcd_Chr(row, column + 1, 6);
        Lcd_Cmd(80);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CUR[i]);
        Lcd_Chr(row, column + 2, 2);
        Lcd_Cmd(96);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(DOWN[i]);
        Lcd_Chr(row + 1, column, 4);
        Lcd_Cmd(96);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(DOWN[i]);
        Lcd_Chr(row + 1, column + 1, 4);
        Lcd_Cmd(104);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CDR[i]);
        Lcd_Chr(row + 1, column + 2, 5);
}
void Disp_4(char row, char column)
{
        Lcd_Cmd(88);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CDL[i]);
        Lcd_Chr(row, column, 3);
        Lcd_Cmd(96);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(DOWN[i]);
        Lcd_Chr(row, column + 1, 4);
        Lcd_Cmd(80);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CUR[i]);
        Lcd_Chr(row, column + 2, 2);
        Lcd_Cmd(104);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CDR[i]);
        Lcd_Chr(row + 1, column + 2, 5);
}
void Disp_5(char row, char column)
{
        Lcd_Cmd(88);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CDL[i]);
        Lcd_Chr(row, column, 3);
        Lcd_Cmd(112);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(EIGHT_UP[i]);
        Lcd_Chr(row, column + 1, 6);
        Lcd_Cmd(112);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(EIGHT_UP[i]);
        Lcd_Chr(row, column + 2, 6);
        Lcd_Cmd(96);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(DOWN[i]);
        Lcd_Chr(row + 1, column, 4);
        Lcd_Cmd(96);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(DOWN[i]);
        Lcd_Chr(row + 1, column + 1, 4);
        Lcd_Cmd(104);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CDR[i]);
        Lcd_Chr(row + 1, column + 2, 5);
}
void Disp_6(char row, char column)
{
        Lcd_Cmd(64);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CUL[i]);
        Lcd_Chr(row, column, 0);
        Lcd_Cmd(112);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(EIGHT_UP[i]);
        Lcd_Chr(row, column + 1, 6);
        Lcd_Cmd(112);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(EIGHT_UP[i]);
        Lcd_Chr(row, column + 2, 6);
        Lcd_Cmd(88);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CDL[i]);
        Lcd_Chr(row +1, column, 3);
        Lcd_Cmd(96);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(DOWN[i]);
        Lcd_Chr(row + 1, column + 1, 4);
        Lcd_Cmd(104);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CDR[i]);
        Lcd_Chr(row + 1, column + 2, 5);
}
void Disp_7(char row, char column)
{
        Lcd_Cmd(72);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(UP[i]);
        Lcd_Chr(row, column, 1);
        Lcd_Cmd(72);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(UP[i]);
        Lcd_Chr(row, column + 1, 1);
        Lcd_Cmd(80);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CUR[i]);
        Lcd_Chr(row, column + 2, 2);
        Lcd_Cmd(104);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CDR[i]);
        Lcd_Chr(row + 1, column + 2, 5);
}
void Disp_8(char row, char column)
{
        Lcd_Cmd(64);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CUL[i]);
        Lcd_Chr(row, column, 0);
        Lcd_Cmd(112);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(EIGHT_UP[i]);
        Lcd_Chr(row, column + 1, 6);
        Lcd_Cmd(80);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CUR[i]);
        Lcd_Chr(row, column + 2, 2);
        Lcd_Cmd(88);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CDL[i]);
        Lcd_Chr(row + 1, column, 3);
        Lcd_Cmd(96);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(DOWN[i]);
        Lcd_Chr(row + 1, column + 1, 4);
        Lcd_Cmd(104);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CDR[i]);
        Lcd_Chr(row + 1, column + 2, 5);
}
void Disp_9(char row, char column)
{
        Lcd_Cmd(64);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CUL[i]);
        Lcd_Chr(row, column, 0);
        Lcd_Cmd(112);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(EIGHT_UP[i]);
        Lcd_Chr(row, column + 1, 6);
        Lcd_Cmd(80);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CUR[i]);
        Lcd_Chr(row, column + 2, 2);
        Lcd_Cmd(96);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(DOWN[i]);
        Lcd_Chr(row + 1, column + 1, 4);
        Lcd_Cmd(104);
        for (i = 0; i<=7; i++) Lcd_Chr_CP(CDR[i]);
        Lcd_Chr(row + 1, column + 2, 5);
}

void LCD_BigFont(char row, char column,char number)
{
    if(number==0)
    {
       Disp_0(row,column);
    }
    if(number==1)
    {
       Disp_1(row,column);
    }
    if(number==2)
    {
       Disp_2(row,column);
    }
    if(number==3)
    {
       Disp_3(row,column);
    }
    if(number==4)
    {
       Disp_4(row,column);
    }
    if(number==5)
    {
       Disp_5(row,column);
    }
    if(number==6)
    {
       Disp_6(row,column);
    }
    if(number==7)
    {
       Disp_7(row,column);
    }
    if(number==8)
    {
       Disp_8(row,column);
    }
    if(number==9)
    {
       Disp_9(row,column);
    }
}


void LCD_Erase(char row, char column)
{
  Lcd_Chr(row,column,' ');
  Lcd_Chr(row,column + 1,' ');
  Lcd_Chr(row,column + 2,' ');
  Lcd_Chr(row + 1,column,' ');
  Lcd_Chr(row + 1,column + 1,' ');
  Lcd_Chr(row + 1,column + 2,' ');
}

I’ve done all the coding for the number display here. You just need to use this.

Download mikroC file from here.

Practical Result:

In the simulation, the display doesn’t show good but in reality, it looks fine. Here was my result in practical testing:

BIG Font display with 16x2 LCD
Big Font in 16×2 LCD

A video clip is here:

Simulation in proteus

I hope you enjoyed this article and made one for yourself. If you need any help feel free to contact me. Thank you.

For more useful articles, don’t forget to subscribe.

For Professional Designs or Help:

Loading

Check this out: 5 coolest multimeters you can buTop 5 Digital Multimeters for beginners


MKDas

Mithun K. Das. B.Sc. in Electrical and Electronic Engineering (EEE) from KUET. Senior Embedded Systems Designer at a leading international company. Welcome to my personal blog! I share articles on various electronics topics, breaking them down into simple and easy-to-understand explanations, especially for beginners. My goal is to make learning electronics accessible and enjoyable for everyone. If you have any questions or need further assistance, feel free to reach out through the Contact Us page. Thank you for visiting, and happy learning!

3 Comments

Chandana · 31/07/2020 at 2:13 am

Excellent Explanation. Many Thanks for Your Hard Works

    Mithun K. Das · 31/07/2020 at 7:01 am

    You are welcome

Chathuranga · 17/08/2020 at 3:09 am

Sir. you are master of pic programming…

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *