An interesting project that can be done using Microcontroller is a LED message scroll er. It teaches you a quite lot of things. So I decided to make one. I made the hardware design modular and cascadeble That means the whole display is made up of several 15×7 modules. Each module has everything to drive 15×7 led matrix which includes a ULN2003 row driver IC and two shift register IC to drive the 15 columns. Data is loaded serially into the 15 columns. and multiplexing is done along the row.
Video Demo
The 15×7 Smart LED Board.
The 15×7 Smart LED Board. |
Schematic. |
The Controller Board.
Any cheap AVR MCU like a ATmega8 can be used to control this board (also up to 4 such boards which give a total of 60px by 7px display). We are using our low cost development board as the controller to the LED matrix board. This board can be purchased at a price as low as Rs. 249 including the MCU ! So wiring this project is a matter of ten minutes !
Low Cost AVR Board |
Whole Setup. |
Connecting The Display Module with Devboard.
PIN Diagram. |
PIN No |
PIN Name |
Devboard PIN |
1 |
GND |
GND |
2 |
N/C |
|
3 |
+5V IN |
+5V out |
4 |
N/C |
|
5 |
Serial Data In |
PB0 |
6 |
ST_CP |
PB2 |
7 |
SH_CP |
PB1 |
8 |
ROW A |
PD1 |
9 |
ROW B |
PD0 |
10 |
ROW C |
PC1 |
11 |
ROW D |
PD4 |
12 |
ROW E |
PD5 |
13 |
ROW F |
PD6 |
14 |
ROW G |
PD7 |
Buy this project fully assembled and tested from our online store! Free shipping! Cash on Delivery! Buy Now
Program
The program is written in C language and compiled using the free GNU C compiler for AVR Platform. The Project manager is Atmel Studio 6. More information on how to install and use these software tool please see the following article.
/******************************************************************************
A Simple 15x7 LED Moving Message Display System.
Hardware
ATmega8 running at 16Mhz
LOW FUSE = 0xFF
HIGH FUSE = 0xC9
Written By
Avinash Gupta
gmail@avinashgupta.com
Ya thats correct ! My Email ID is reverse in format of others !
Copyright 2012
eXtreme Electronics, India
www.eXtremeElectronics.co.in
WARNING !!!
NO PART OF THIS WORK CAN BE USED IN ANY PRINTED OR ELECTRONIC MEDIA
WITHOUT A WRITTEN PERMISSION FOR THE ORIGINAL AUTHORS.
WE STRICTLY PROHIHIT THE USE OF THIS SOURCE CODE IN ANY COMMERCIAL
APPLICATION.
******************************************************************************/
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include <string.h>
#include "font5x7.h"
volatile PGM_P ptr=smallFont;
volatile uint16_t ii,iii;
//Message to display
volatile char string[]="Welcome ! * Avinash Gupta * ";
volatile uint8_t len;
#define DISP_ROW_CNT 7
#define DISP_COL_CNT 15
/***************************************
Configure Connections
****************************************/
#define HC595_PORT PORTB
#define HC595_DDR DDRB
#define HC595_DS_POS PB0
#define HC595_SH_CP_POS PB1
#define HC595_ST_CP_POS PB2
/***************************************
Configure Connections ***ENDS***
****************************************/
void HC595Init()
{
HC595_DDR|=((1<<HC595_SH_CP_POS)|(1<<HC595_ST_CP_POS)|(1<<HC595_DS_POS));
}
#define HC595DataHigh() (HC595_PORT|=(1<<HC595_DS_POS))
#define HC595DataLow() (HC595_PORT&=(~(1<<HC595_DS_POS)))
void HC595Pulse()
{
//Pulse the Shift Clock
HC595_PORT|=(1<<HC595_SH_CP_POS);//HIGH
HC595_PORT&=(~(1<<HC595_SH_CP_POS));//LOW
}
void HC595Latch()
{
//Pulse the Store Clock
HC595_PORT|=(1<<HC595_ST_CP_POS);//HIGH
_delay_loop_1(1);
HC595_PORT&=(~(1<<HC595_ST_CP_POS));//LOW
_delay_loop_1(1);
}
void SelectRow(uint8_t r)
{
DDRD|=(0B11110111);
PORTD&=(0B00001000);
switch(r)
{
case 6:
PORTD|=(1<<PD0);
break;
case 5:
PORTD|=(1<<PD1);
break;
case 4:
PORTD|=(1<<PD2);
break;
case 3:
PORTD|=(1<<PD4);
break;
case 2:
PORTD|=(1<<PD5);
break;
case 1:
PORTD|=(1<<PD6);
break;
case 0:
PORTD|=(1<<PD7);
break;
}
}
void main()
{
// Prescaler = FCPU/256
TCCR0|=((1<<CS02));
//Enable Overflow Interrupt Enable
TIMSK|=(1<<TOIE0);
//Initialize Counter
TCNT0=0;
//Enable Global Interrupt
sei();
//Init Shift Register
HC595Init();
//Get Length of message
len=strlen(string);
ii=iii=0;
while(1)
{
}
}
ISR(TIMER0_OVF_vect)
{
/*
This interrup service routine (ISR)
Updates the displays
*/
static uint8_t row;
static uint16_t cnt=0;
cnt++;
//Handle Scrolling
if(cnt == 29)
{
cnt =0;
ii++;
if(ii==5)
{
ii=0;
iii++;
if(iii>len)
iii=0;
}
return;
}
//Now Transfer a row of data
int8_t col;
int8_t chr = iii;
int8_t m=ii;
for(col=0;col<DISP_COL_CNT;col++)
{
uint8_t data;
if(m!=5)
{
data=pgm_read_byte( ptr + ((string[chr]-' ')*5)+m);
}
else
{
data=0x00;
}
if((data & (1<<row)))
HC595DataHigh();
else
HC595DataLow();
HC595Pulse();
m++;
if(m==6)
{
chr++;
m=0;
if(chr >=len)
chr=0;
}
}
//Acivate a row according to 'row'
SelectRow(row);
HC595Latch();
row++;
if(row==DISP_ROW_CNT)
{
//If on last row then come
//back to first.
row=0;
}
}
Downloads
Author
Avinash Gupta
http://www.AvinashGupta.com (My Facebook Profile)
Facing problem with your embedded, electronics or robotics project? We are here to help!
Post a help request.
Thanks for lot of information. What all changes(in code) i need to do to implement this using Atmega32? Please reply.
Very cool, i like the idea! This could be useful in some projects. I like the way how you write the software. Is very organised, with comments and explanations. Keep the good job up!
Excellent job…
project = great<85;
hello sir,
thanks 4 this valuable info but sir when i build the code it shows the error that
../MLED.c:8:21: fatal error: font5x7.h: No such file or directory
plese help me
thnks
Are the LED matrix common cathode or anode?
sir,
I am interested in purchase of led moving message display
project, complet with,display module,controller ,development board .complete to run the project.
kindly advise the cost including postage/qurrier charges.
I am in AHMEDABAD At following address.
VASANTBHAI PANCHAL
36 , SHREE RANG VILLA ROW HOUSES ,
NR. L.J.COLLEGE,VASTRAPUR, AHMEDABAD- 380015,
GUJARAT.
TEL;079-26761139;
MOB; 9638178925
EMAIL – pvasant_2006@yahoo.ca
Thanks.
Dear sir, when i running this project on proteus, LEDs are scrolling (it seems one is scrolling). Message is not scrolling.
Excellent tutorial avinash, i want to buy your PCB board. you didn’t mention any cost of it. where do i get it.
sir,
thank you
i want to buy this project
i am living in rajkot(gujarat)
before giving my further information i want some changes in this project
1. i want to interface 12 key keyboard with it
2. i want 20(5*7) led in row and 10(5*7) led in column
3. i also want micro controller to be mounted separately with connector
my mob no is +918511588011
reply me as soon as possible
thank you
nice work 🙂
but just as a matter of fact, can you please include the font file please
i have problem to store input in eeprom pls sugest the code to store
@Surya codes are NOT suggested ! They are written ! And I thing GOD has given you two hand with 5 fingers on each to do the typing!
it is a nyc reply ……..
i have problem to store input in eeprom of atmega8535 micro controller pls sugest the code to store in it
hello,,,,,Mr.Avinash
on this topic, i have make hardware for 15X7 dot matrix display,, i use Atmega8 for main controller and 4017 (decoder) to control the column, ( portd=row, 4017=column).
i use one 4017 for control the column and i group each of 10 column to 1 blok(group).
please help me to make a c program( i use codevision AVR).
please replay as soon as possible.
my emil; adexsugi@gmail.com
tanks for suggest
@I Gusti K,
Please make the circuit as described above and use the program as provided above!
And please try to understand the fact that no one in this world has enough free time to write programs for strangers !!!
im sorry,,
i try to to make the project as your description.
and thank much.
but i want to ask you.
may i make a project with more colom, if you permit, please advise how to do.
please replay.
best regard
Hi this is really a cool project, Mr.Avinash well said…people should understand you are showing them to a start they should not take it granted …keep it up man!
Thank you so much,I think this is very much useful…and keep doin the good work you do.:))
Great work. Helping students, but why dont you suggest some projects related to DSP contorllers.
eg:F28069,F28335 etc. or some 55X , c2000,c6000 series contollers.
Regards,
Rupa
Sorry I have no experience working on DSPs
hello sir,
i’ve been trying to program this circuit using my own code.
can you please tell me how the uln2003a transfers data from one 8 bit port to another. cause i am not able to decode it from the given program.
hello sir,
how can the speed of scrolling can be adjusting in the program?
Thank you sir very much for this,
sir there need a modification in code that is
if(iii>=len)
iii=0;
instead of
if(iii>len)
iii=0;
@avinash it is display is CA, i think correct me if am wrong
What do you mean by CA?
Column Anode
I had purchased the Controller Board and Message Display Board From You. when i tried to build this project in AS6 it gives some error regarding prog_uchar is not valid.
Error 1 unknown type name ‘prog_uchar’
Error 2 variable ‘smallFont’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’
please guide me with it
I have the same issue, did you fixed it? How…
@Sagar,
Is the controller board and display working properly ?
Ya it working Properly But only when i Build the hex file using AS5 but not in AS6. and i have to modify IO pin to work it properly.
I get over all the error.
sir,
I am interested in purchase of led moving message display
project, complet with,display module,controller ,development board .complete to run the project.
kindly advise the cost including postage/qurrier charges
I am in pune, India.
PLs send details from mail.
my email- vinodkore777@gmail.com
@Vinod,
You can purchase it from here
http://store.extremeelectronics.co.in/AVR-ATmega8-Based-Moving-Message-Display.html
hello avinash sir ,
good project but my led message continues flier and scrolling. please help me for this problem
change 20mhz crystel and solve my problem.
Is this internal crystal or external?
and can i directly connect it to atmega8??
@HEMANK
Do you have any problem doing it exactly as described?
yes sir, bcoz i dont have kit and 1st I want run it on proteus. and on proteus it doesnt give me desire o/p. It show me some line up nd down.
hello avinash sir,
can u tell me which dot matrix u have used,either it is common anode row or common anode column.sir pls reply me fast because it argent its my final year project.
it is common cathod dotmetrix ,common cathod column and common anode row.
i am sorry it is common anode dotmetrix , common anode coulumn and common cathod row.
i am making this project too.
can you please help me out with few problems if you completed this project.
email id: akshaysoni099@gmail.com
thanks shailesh ,
can u tell me how to display a message on this dot matrix message send via GSM MODEM pls help i need
hi avinash
am planing buy complete kit of moving message before that i want to make sure few things
i want to implement rtc and LM35 what my concern is while reading adc there will be a delay will come.
and it may lead to flickering of display ???
Very nice project Avinash Guptaji. I have bought it and it is working. Congrats. Regards
The project s working very nicely but how can we change the message, please let me know by writing to my private mail and oblige. Regards
@Ashok Shah
See the program care fully, make required changes and recompile project. Get the hex file and burn to the MCU.
sir would you please send me circuit diagram with proper connection with microcontroller and font5x7.h file.
my email id is dheerajsachdeva3@gmail.com
thanks in advance sir.
My 15×7 Smart LED Matrix Board was working perfectly fine but has now developed some problem. The message was moving from right to left and all charcters were perfectly readable, but now the characters are not readable and instead of the scrolling or moving message dots seem to be moving only vertically…please guide as to what can be the problem?
Regards,
Ashok Shah
Ahmedabad
Please use the discussion forum for this
http://forum.extremeelectronics.co.in/index.php?board=8.0
I am about to build the circuit and I’m using LEDs. I have a question though. Are the row pins anode while the column pins cathode?
sir,
i want to display “feroze gandhi institute of eng. and technology,raebareli” .so please tell me the size of the led display and is it possible with atmega8, atmega16 ??? .please tell me the cost of display or cost of the project if possible???
sir,
i want to display “feroze gandhi institute of eng. and technology,raebareli” .so please tell me the size of the led display and is it possible with atmega8, atmega16 ??? .please tell me the cost of display or cost of the project if possible???
PLEASE GIVE SOME IDEA OF PROGRAM OF THIS PROJECT ,USING GSM
hello avinash sir,
i’m interested to buy the kit. I want to what are the items include in the kit.
Regards
Albin
hi,sir
i need a program for irc tech fest at least cost. and a atmega16 kit also.
plz help me.
sir i want to display font having pixel size is not same how can i do that ?
Ex. if i want to display “aiaj” where the width of ‘a’ and ‘i’ and ‘j’ is not same than how can i do that. sir i try alot but i only display “ai” but if width of the font increase after ‘i’ than it’s not work.
sir,
i have few question.
1> in my pc where i copy “font5x7.h” file ?
2> how can i modify for 16*16 display.
3> if i use 16*128 matrix display what i have to do now ?
my mail is jrigun@yahoo.com
bangladesh my facebook id is facebook.com/jewel3g. ihope reply me as soon as possible.
whats the purpose of PD3 is left open and even not used in code?
plz let me know……….. thanks
hey avinash sir,
sir I want the proper schematic diagram . Its not clearly visible here. can u please mail me
sir , excellent job, i was test this project 5×7 font, interfacing rtc module and display tine,date and day it will work fine ,now i can change led 5×7 matrix to 8×8 matrix ,what is modification change in code,i was test 8×8 font in same code but it was not work properly ,
Sir, can i ask something. It’s quite difficult for me to know what are the components. Can you pls. help. I need to know it. This is urgent, thanks.
hi sir ,
i am facing a problem on moving any character in a 5×7 led matrix i use simple.code like
eg:
port ob11111111
so.please tell.me how to move the character
Good morning .,
I wish to buy this display board ., can u show me the output sir ,
— Thank you
hello sir,
Thank u for such a information.
Can I directly connect it to the atmega8??
Sir,
Can you please send me all details about AVR MATRIX or FND BASED clock:
CIRCUIT DIAGRAM,
PARTS LIST,
PCB LAYOUT &
SOURCE CODE ( c and hex)
Thanks
Sarabjeet singh
hello Sir,
Can I have its proteus design file please?
I hardly needed it.
Dear avinash sir
i was done this project with crystal 20 mhz but led flicker rate to high ,can i modify the software for change scan rate .
@shailesh prajapati,
what is your order ID?
Hello Sir,
Please explain how we get data through following command
data=pgm_read_byte(ptr+((string[chr]-‘ ‘)*5)+m)
Kindly explain the above command.
Pingback: [AVR] Do you have 8x8 matrix and Atmega8A project ?
Pingback: [AVR] Please Help Me with LED sign board C Program
sir where i had to connect connector pin ( your circuit diagram) with which pin of atmega8, and sir will you please provide font5x7.h file?
can you please give me the Proteus design file , Please ………………………………….
is this task possible with max 6952 using atmega 16
Don’t the LED’s in the matrix need current limiting resistors?
Regards, Roger
Sir,
i am getting unknown characters being displayed…Please help me with that
i did my project from your source code..Can you tell me the need of SelectRow() function too???
whts the coding for showing some lines on led ..how can i make led running project..can anybody plzz tell me
See amazing LED project here: http://kck.st/1Oi2sHC
Simply and affordable…
hi I am new in this project,I want to know what software should be installed for this.can anybody help me from c coding, hex file and hex file burning for Micro controller.
Thanks in advance.
my mail id is shaliniojha31@gmail.com
I have purchsed the ATmega 8 based moving message display kit.Owing to pre-occupiedin my work I couldnot try the same. Now for the past 2 days i have been trying to run the kit with PS/2 Keyboard.The messages are only that of “Avinash” appears but nothing gets fed from the key board.What would be the reason.I have gone through the sample program found in the web page; and I think the key board files are not included in the program.Is it because of this the keyed messages are not reflected in the display.Please explain.
This is the first time I am trying with a MCU that too in programming.
A Line in this problem from you is hoghly anticipated.
VRK
hello sir
nice project ,
how can change msg with ps2 keyboadr? help me sir thanks
Hello sir ,
When code built some error…. Please solution this errors
fatal error: font5x7.h: No such file or directory
Hello Mr. DEEP,
You should download the whole project in atmel studio 6 format from here. It has all the files and the compilation steps. And i suggest you to clearly read the steps and follow them exactly as told. http://digital-wizard.net/files/AS6_M8_MovingMsg.zip