In earlier posts we have discussed about how to display alphanumeric characters on a single block of 5x7 dot matrix display. but now it is time to move on to display characters on a series of blocks. basic concept remains same. Only two things are new here
- Buffer with tristated output (74 LS 541)
- De-multiplexer(74 LS 138)
Buffers here are used to isolate other blocks while accessing a single block.
Let us say we want to dispaly 'Y' on 3rd block so at that time we must not disturb other blocks so we have tristated(in rough term disconnected ) them to prevent from any changes.
De-multiplexers are used to decode address of the destination block. Assume we are having 30 blocks to display in that case we can't give separate enable pin to each Buffer that's why if we are having a 5to32 demultiplexer we can address up to 32 blocks with help of only 5 pins of microcontroller.
Here in my design i only wanted to display 5 Characters simultaneously so i used 3to8 demultiplexer(decoder).
5x7 Dot matrix display in proteus |
by inserting some decoding mechanism in our program and using earlier made header file we are all set to display a message 'KEYUR' on the blocks. the program is as shown below
#include"avr/io.h"
#include"delay.h"
#include"dotmatrix.h"
void main()
{
DDRA=0xFF;
DDRB=0xFF;
DDRC=0xFF;
while(1)
{
PORTB=0; //select first block
display('k',1);
PORTB=1; //select second block
display('e',1);
PORTB=2; //select third block
display('y',1);
PORTB=3; //select fourth block
display('u',1);
PORTB=4; //select fifth block
display('r',1);
}
}
#include"delay.h"
void main()
{
DDRA=0xFF;
DDRB=0xFF;
DDRC=0xFF;
while(1)
{
PORTB=0; //select first block
display('k',1);
PORTB=1; //select second block
display('e',1);
PORTB=2; //select third block
display('y',1);
PORTB=3; //select fourth block
display('u',1);
PORTB=4; //select fifth block
display('r',1);
}
}
we can further minimize the program by making a function to display message on series of displays.
final output may look like this
A creative imagination you will not see this in software |
I figured it out that this source code and circuit diagram is not only for a string displaying on dot-matrix.But if you want to design NxNxN (3X3X3,8X8X8,anything ) cube of LEDs to display some fancy patterns this circuit design and coding will be like a base guide for you.
That cube display will be more attractive than this one displayed above but i found above one more commercial to make.
very good.
ReplyDelete