Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

need the moving Led display idea /Logic

Status
Not open for further replies.

thannara123

Advanced Member level 5
Joined
Jan 7, 2010
Messages
1,580
Helped
122
Reputation
244
Reaction score
114
Trophy points
1,353
Location
India
Activity points
10,387
Hi experts'
i need the tutorial about how the Led moving display works

Most of my tutors in this forum said that ,use Shift registers ,vertical and horizontal scanning can be use
But actually i didn't get anything how can i program


Actually how the LED s bling
please teach the logic simply because i am not well in English
i need with a simple matrix led moving display tutorial

Please help somebody in the Forum

I saying Thanks in Advance my Tutors
Gireesh Kuamr K.S
Thannara123@gmail.com
 

hello...
If you are new to this topic, then at first you dont go for a moving led display. Instead just try to understand how a letter could be displayed in a small dot matrix display, say 8x8 led display.
8x8 led matrix display have 8 row connection (may be all positive or all negative) and 8 column connections.(all negative or all positive, as opposit to row)
So if you connect a negative first column and give a 8bit data to row then the 8 bit binary data is displayed in first column.
Now if you change the column connection to second column and if you keep the row data same then the same data is displayed in second column and first column become inactive.
So if you switch column very fast in circular manner then you could see full display column showing the data given in row.
So if you change data for each column while shifting the column then you could see different data in different column and if the column selecting speed is high (utilizing the persistance of vision property of eye) then you could see all column data at the same time.
Now if you could give data in such a way that it displays a letter 'A' then you could see the letter 'A' in the display. But actually one column is glowing at a time...
So now i hope you understood how the display works...

Now, to make display scroll text, each column data is shifted to near by left column and new data is introduced to right column. Then the process continues and you could see scrolling of data from right most column to left most column...

---------- Post added at 10:21 ---------- Previous post was at 10:14 ----------

so for the above purpose you could use a microcontroller for controlling the data to row of the matrix display and a ring counter to shift the column one by one according to the clock signal given to the ring counter, from the microcontroller.
So now just think,
If ring counter resets then it points the first column. So first column is activated. Now microcontroller gives data to row . Then after a short delay it switch off the data and then give a clock to counter. Then the second column is activated and first column is deactivated. Now another data is given to row. Then the process continues very fast and thus you could see all data at a time ... If the data corresponds to any letter then that letter is displayed...
 
thanks for helping me
have u a single mikroc program as an example
thanks
 

i wrote some program for this For High Tech C compiler. I need to modify it for U and i will post it here with in 1 week. Now at college.
 
do you made any hardware setup for this? Do you have an led dotmatrix display connected to a ring counter like cd4017 and a microcontroller say PIC16F877A?
Pls tell me about your hardware setup so that i could provide you the C program for your setup.
 
#include <htc.h>
__CONFIG(0x3F3A);
#define _XTAL_FREQ 20e6
#define reset RB7=1;RB7=0;
#define clock RB6=1;RB6=0;
char buffer[10],p;
unsigned short int still,i,j,s;
void scroll(short int a,short int b,short int c,short int d,short int e)
{
short int count=6;
while(count>0)
{
buffer[0]=~a;
a=b;b=c;c=d;d=e;e=255;
reset;
for(s=0;s<still;s++)
{
for(i=0;i<10;i++)
{
p=1;
for(j=0;j<9;j++)
{
PORTD=~(buffer&(p));__delay_ms(.1);p<<=1;
}
clock;
}
}
for(i=9;i>0;i--)
{
buffer=buffer[i-1];
}
count--;
}
}
void A(){scroll(0xC1, 0xB7, 0x77, 0xB7, 0xC1);} //letter A
void B(){scroll(0x01, 0x6D, 0x6D, 0x6D, 0x93);}
void C(){scroll(0x83, 0x7D, 0x7D, 0x7D, 0xBB);}
void D(){scroll(0x01, 0x7D, 0x7D, 0xBB, 0xC7);}
void E(){scroll(0x01, 0x6D, 0x6D, 0x6D, 0x7D);}
void F(){scroll(0x01, 0x6F, 0x6F, 0x6F, 0x7F);}
void G(){scroll(0x83, 0x7D, 0x65, 0x6D, 0xA3);}
void H(){scroll(0x01, 0xEF, 0xEF, 0xEF, 0x01);}
void I(){scroll(0x7D, 0x7D, 0x1, 0x7D, 0x7D);}
void J(){scroll(0xF3, 0x7D, 0x7D, 0x03, 0x7F);}
void K(){scroll(0x01, 0xEF, 0xD7, 0xBB, 0x7D);}
void L(){scroll(0x01, 0xFD, 0xFD, 0xFD, 0xFD);}
void M(){scroll(0x01, 0xBF, 0xDF, 0xBF, 0x01);}
void N(){scroll(0x01, 0xBF, 0xDF, 0xEF, 0x01);}
void O(){scroll(0x83, 0x7D, 0x7D, 0x7D, 0x83);}
void P(){scroll(0x01, 0x6F, 0x6F, 0x6F, 0x9F);}
void Q(){scroll(0x83, 0x7D, 0x75, 0x79, 0x81);}
void R(){scroll(0x01, 0x6F, 0x6F, 0x6F, 0x91);}
void S(){scroll(0x9B, 0x6D, 0x6D, 0x6D, 0xB3);}
void T(){scroll(0x7F, 0x7F, 0x01, 0x7F, 0x7F);}
void U(){scroll(0x03, 0xFD, 0xFD, 0xFD, 0x03);}
void V(){scroll(0x07, 0xFB, 0xFD, 0xFB, 0x07);}
void W(){scroll(0x01, 0xFB, 0xF7, 0xFB, 0x01);}
void X(){scroll(0x39, 0xD7, 0xEF, 0xD7, 0x39);}
void Y(){scroll(0x3F, 0xDF, 0xE1, 0xDF, 0x3F);}
void Z(){scroll(0x79, 0x75, 0x6D, 0x5D, 0x3D);}
void D0(){scroll(0x83, 0x7D, 0x7D, 0x7D, 0x83);} //NUM 0
void D1(){scroll(0xDD, 0xBD, 0x1, 0xFD, 0xFD);}
void D2(){scroll(0xBD, 0x79, 0x75, 0x6D, 0x9D);}
void D3(){scroll(0x7B, 0x7D, 0x5D, 0x4D, 0x33);}
void D4(){scroll(0xCF, 0xAF, 0x6F, 0xEF, 0x1);}
void D5(){scroll(0xB, 0x5D, 0x5D, 0x5D, 0x63);}
void D6(){scroll(0x83, 0x6D, 0x6D, 0x6D, 0xB3);}
void D7(){scroll(0x79, 0x77, 0x6F, 0x5F, 0x3F);}
void D8(){scroll(0x93, 0x6D, 0x6D, 0x6D, 0x93);}
void D9(){scroll(0x9B, 0x6D, 0x6D, 0x6D, 0x83);}
void SP(){scroll(255,255,255,255,255);}



main()
{
TRISB6=0;TRISB7=0;RB7=0;TRISD=0;
still=8;
while(1)
{
E();D();A();B();O();A();R();D();SP(); //LETTERS TO BE SCROLLED

}
}

---------- Post added at 03:50 ---------- Previous post was at 02:06 ----------

above program is an example program which i had written and tested yesterday. In above program you can make much modifications ...you can use pointers and can write strings directly instead of calling every font characters individually. The above program is not an ideal one. Its just for an understanding....
Its for my 10x8 dotmatrix display. I connected 8 bit row to port D of a pic16f877a . (row is negative in my case). Then connected a cd4017 outputs to 10 columns. Its reset and clock is connected to RB7 and RB6 respectively.
I used 20Mhz crystal .Scrolling speed could be adjusted using the variable still. To eliminate the brightness difference due to the difference in leds glowing in different column, i introduced a horizontal scanning (as in a TV)which enables single LED to glow at a time in the column. This equalizes the brightness.
 
Hi vinodstanur,

as our friend thannara123 is a beginner in programming, use the "code" tags for formating the code, it's easier to read and figure out parts of it, like below.

Code:
#include <htc.h>
__CONFIG(0x3F3A);
#define _XTAL_FREQ 20e6
#define reset RB7=1;RB7=0;
#define clock RB6=1;RB6=0;
char buffer[10],p;
unsigned short int still,i,j,s;

void scroll(short int a,short int b,short int c,short int d,short int e)
{
  short int count=6;
  while(count>0)
  {
    buffer[0]=~a;
    a=b;b=c;c=d;d=e;e=255;
    reset;
    for(s=0;s<still;s++)
    {
      for(i=0;i<10;i++)
      {
        p=1;
        for(j=0;j<9;j++)
        {
          PORTD=~(buffer[i]&(p));__delay_ms(.1);p<<=1;
        }
        clock;
      }
    }
    for(i=9;i>0;i--)
    {
      buffer[i]=buffer[i-1];
    }
    count--;
  }
}
void A(){scroll(0xC1, 0xB7, 0x77, 0xB7, 0xC1);} //letter A
void B(){scroll(0x01, 0x6D, 0x6D, 0x6D, 0x93);}
void C(){scroll(0x83, 0x7D, 0x7D, 0x7D, 0xBB);}
void D(){scroll(0x01, 0x7D, 0x7D, 0xBB, 0xC7);}
void E(){scroll(0x01, 0x6D, 0x6D, 0x6D, 0x7D);}
void F(){scroll(0x01, 0x6F, 0x6F, 0x6F, 0x7F);}
void G(){scroll(0x83, 0x7D, 0x65, 0x6D, 0xA3);}
void H(){scroll(0x01, 0xEF, 0xEF, 0xEF, 0x01);}
void I(){scroll(0x7D, 0x7D, 0x1, 0x7D, 0x7D);}
void J(){scroll(0xF3, 0x7D, 0x7D, 0x03, 0x7F);}
void K(){scroll(0x01, 0xEF, 0xD7, 0xBB, 0x7D);}
void L(){scroll(0x01, 0xFD, 0xFD, 0xFD, 0xFD);}
void M(){scroll(0x01, 0xBF, 0xDF, 0xBF, 0x01);}
void N(){scroll(0x01, 0xBF, 0xDF, 0xEF, 0x01);}
void O(){scroll(0x83, 0x7D, 0x7D, 0x7D, 0x83);}
void P(){scroll(0x01, 0x6F, 0x6F, 0x6F, 0x9F);}
void Q(){scroll(0x83, 0x7D, 0x75, 0x79, 0x81);}
void R(){scroll(0x01, 0x6F, 0x6F, 0x6F, 0x91);}
void S(){scroll(0x9B, 0x6D, 0x6D, 0x6D, 0xB3);}
void T(){scroll(0x7F, 0x7F, 0x01, 0x7F, 0x7F);}
void U(){scroll(0x03, 0xFD, 0xFD, 0xFD, 0x03);}
void V(){scroll(0x07, 0xFB, 0xFD, 0xFB, 0x07);}
void W(){scroll(0x01, 0xFB, 0xF7, 0xFB, 0x01);}
void X(){scroll(0x39, 0xD7, 0xEF, 0xD7, 0x39);}
void Y(){scroll(0x3F, 0xDF, 0xE1, 0xDF, 0x3F);}
void Z(){scroll(0x79, 0x75, 0x6D, 0x5D, 0x3D);}
void D0(){scroll(0x83, 0x7D, 0x7D, 0x7D, 0x83);} //NUM 0
void D1(){scroll(0xDD, 0xBD, 0x1, 0xFD, 0xFD);}
void D2(){scroll(0xBD, 0x79, 0x75, 0x6D, 0x9D);}
void D3(){scroll(0x7B, 0x7D, 0x5D, 0x4D, 0x33);}
void D4(){scroll(0xCF, 0xAF, 0x6F, 0xEF, 0x1);}
void D5(){scroll(0xB, 0x5D, 0x5D, 0x5D, 0x63);}
void D6(){scroll(0x83, 0x6D, 0x6D, 0x6D, 0xB3);}
void D7(){scroll(0x79, 0x77, 0x6F, 0x5F, 0x3F);}
void D8(){scroll(0x93, 0x6D, 0x6D, 0x6D, 0x93);}
void D9(){scroll(0x9B, 0x6D, 0x6D, 0x6D, 0x83);}
void SP(){scroll(255,255,255,255,255);}


main()
{
  TRISB6=0;TRISB7=0;RB7=0;TRISD=0;
  still=8;
  while(1)
  {
    E();D();A();B();O();A();R();D();SP(); //LETTERS TO BE SCROLLED
  }
}

Much easier to visualise code stricture 8)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top