Showing posts with label led. Show all posts
Showing posts with label led. Show all posts

December 26, 2011

Creating Characters on Dot matrix display (Proteus Simulation)

In earlier post we have seen how to make a single LED,a Row  or a Column ON. But that's not enough when we want to generate a character like 'K' on a display so what we have to do for that?


Here comes a principle from physics called "Perception of eye" I hope all have studied about that in high school so not discussing more about that in detail just keep in mind that if we constantly change our ON LED we can make an image like any character on human eye.



so

 +

 +

 +

 +


  =

alphanumeric character in dot matrix display
alphanumeric character on dot matrix


this is the magic of perception of eye principle if you will repeat above 5 images at enough faster rate you will be able to see a  'K ' character.



Doing this with microcontroller is damn easy thing.

just try following code in your AVR 8535 microcontroller to see the character being displayed.


//program to display K on dot matrix display

#include"avr/io.h"
#include "delay.h"


void main(void)
 {  
    DDRA=0xFF;            // Port A data direction declaration as out put.
    DDRC=0xFF;          
// Port C data direction declaration as out put.
    while(1)      
    {
    PORTA=0b00000001;            //column 1
    PORTC=0b10000000;          
    delayms(1);
    PORTA=0b00000010;            //column 2
    PORTC=0b11110111;
    delayms(1);
    PORTA=0b00000100;            //column 3
    PORTC=0b11101011;
    delayms(1);
    PORTA=0b00001000;            //column 4
    PORTC=0b11011101;
    delayms(1);
    PORTA=0b00010000;            //column 3
    PORTC=0b10111110;
    delayms(1);
    delayms(1000);
    }
  
}

the circuit diagram for above program is given below...


with this all you can make all your  characters and display them on dot matrix display.


Once you are through with all your characters making you can group them in a standard header file to use later.you can read my earlier post  "how to make a header file?" for the help.

this is good if you want to display something on a single block of dot matrix display but what if you want to display a message such as "KEYUR" on a series of blocks????

1    2      3
Read more ...

Dotmatrix LED(5x7)

I was always fascinated to see the large boards made of  red LEDs and i always thought that some day i will make it i hope you also have same thoughts that's why you are on this page, right?
So let us start with what is a basic dot matrix LED connection?
It is connections of LED in such a way that more LEDs can be accessed by less no. of micro controller pins.


as you can see in figure.


Internally, the LEDs are organized in a matrix. Here's a 5x7 display internal wiring (requires a minimum of 13 pins, likely to be shipped in a 14 pins package).
so you can access 35 LED with just 13 pins of microcontroller isn't it a great deal?

Now got enough information about dot matrix so let us start with how to use them?

Basically you can turn on those LEDs to which you supply proper forward biasing all the game starts from here.
see in the figure if you want to make left top corner LED(we want to turn on only one LED right now note that) you have to give a high to 1 pin and a low to A pin.
but if you observe something you will come to know that if we apply low to rest of the B to G pins whole first column  will glow up but that's not we want. so we have to give A=low and B-G=high to make a LED on.

Hey wait did you again observe something? let me tell you that if we have A=low and B-G=high that's fine but what about the pins 1-5? so if we have 1-5=high and A=low and B-G=high we will get the first row on because of the connections so now what to do ?
we can again  change our configurations to 1=high, 2-5=low, A=high, B-G=low.

huh, so is that enough to turn on single LED on your display..?

yes that's all you have to do to make different LEDs on.
Now you have the power to turn on any desired LED of 5x7 matrix.


Are you happy with this thing?
if yes then what about displaying characters on matrix.


1      2        3

Read more ...
Related Posts Plugin for WordPress, Blogger...