6*8 LED Display Using a Decoder and Atmega8

Many of you have been wondered by seeing the LCD Display at various places and would have given a little thought about how the things work behind such a real time display. Let’s clear such confusions and create a 6*8 LED display approximately similar to LCD display. There might be some variations in LCD display and that goes up to you to make out. I have presented here a 6*8 LED Display using a decoder and a microcontroller.

Step 1: Overview of the Project

I made this 6*8 LED Display screen using 48 LEDs using Atmega8(we can use any controller) with only 9 GPIO pins with 1 decoder. Instead of using 9 GPIO we can make it using only 6 GPIO using 2 decoders. Many display functions like scrolling, sliding and doing some graphics can be done easily by just altering some GPIO pins. This project can be extended into many applications like Display boards, 3D LED cube, large Display screen.This can also be made by using Raspberry Pi which is going to be uploaded soon. This display screen can also be made to interface with the Bluetooth module so that it can display the data which is given by any Bluetooth devices like mobiles, Laptops. How to interface this LED display with Bluetooth is shown in next instructable.

This screen works on the principle of Persistence of Vision. General reception of human eye is about to 10 to 12 images per second. Using this concept, the screen is made to display a particular character more than 50 times by using some delays.

Step 2: Components Required and Working

  1. LED – 48
  2. Resistor(270ohm) – 6
  3. Decoder(74LS138) – 1
  4. Atmega8 -1
  5. Voltage Regulator(7805) – 1
  6. Power source(9V battery) – 1

Decoder:

75LS138 is a 3*8 active low decoder which consists of 3 input pins(Select A, B, C) controlling 8 output pins only one at a time with 3 enabling pins. This decoder gives output according to the inputs shown in the truth table. Enable pins are set active according to their states.

Step 3: Layout of LEDs

The layout which I used is shown. All the anode part of LEDs are connected along the row side making 8 rows named as A to H. Cathode part of LEDs are connected along column wise named as M to R. This rows from A to H are connected to the output of the decoder. In order to on a particular LED say 24(in the Layout) just give E row active low output and O column active high output. To make active low just give input of the decoder with 101(i.e., A=C=5V, B=0V). Similarly, multiple LEDs can be controlled by giving a particular pattern.

Step 4: Circuit Diagram and Working

LED layout shown in the previous step is connected to the respective pins of a microcontroller as shown in circuit diagram. In order to display a particular pattern on the screen, we should have a particular idea which LEDs should be kept on. By accessing a particular row one at a time using active low decoder and inputting the column LEDs with particular input(5V-on or 0V-off). To access every row at a time, just on the single row and by giving a particular delay of say 2ms and by incrementing the row value.

Step 5: Code to Display a Particular Alphabet

void alphaA()

{

for(i=0;i<180;i++)

{

PORTB=0x00;

PORTC=0b00000000;

_delay_ms(2); //LED1,10,11,12,13,14 off

PORTB++;

PORTC = 0b00111000;

_delay_ms(2); //LED 35,42,28 on

PORTB++;

PORTC = 0b00001100;

_delay_ms(2); //LED29,22

PORTB++;

PORTC = 0b00001010;

_delay_ms(2);//LED 16,30

PORTB++;

PORTC = 0b00001001;

_delay_ms(2);//LED 5,31

PORTB++;

PORTC = 0b00001010;

_delay_ms(2);//LED 18,32

PORTB++;

PORTC = 0b00001100;

_delay_ms(2);//LED26,33

PORTB++;

PORTC = 0b00110000;

_delay_ms(2);//LED34,41,48

}

}

This code is used to display a particular Alphabet ‘A’. PORTB pins of a microcontroller (PINB0, PINB1, PINB2) are connected to the input of the decoder. and columns are connected to the PORTC pins(PINC0 to PINC5).

Step 6: Final Code

This code consists of the functions for displaying alphabets(A to Z), numeric values(0-9) and some special symbols like diode and transistor.

Try displaying other symbols by developing the same logic as done in code and happy using LED Display..Cheers!

Source: 6*8 LED Display Using a Decoder and Atmega8


About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Leave a Comment

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

Scroll to Top