i think its difficult to explain the full working, just if u found any problem while doing the project, then many one could help u....
i will just give an introduction if u r new to dotmatrix displays...
microcontroller is connected to row(7 rows),then connect a ring counter to 30 column (mod 30)
clock and reset of counter is controlled by microchip....
just read this sample c program i had done for our techfest (just day before yesterday)
then ask if u got any doubt....display which i made is 38x7 . just check the program and ask ur doubts...it will be better in ur case, i think so...
////////////////////////////////////////
//LED DOTMATRIX MESSAGE DISPLAY //
//
vinodstanur@gmail.com //
////////////////////////////////////////
//used hightech c compiler(not free)////
////////////////////////////////////////
#include <htc.h>
#define _XTAL_FREQ 16e6 // 4MHz
__CONFIG(0x3F3A);
int a1,b1,c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1,n1,o1,p1,q1,r1,s1,t1,u1,v1,w1,x1,y1,z1,z2,z3,z4,z5,z6,z7,z8,z9,z10,z11,z12,z13;
void begin()
{
(a1=0);(b1=0);(c1=0);(d1=0);(e1=0);(f1=0);(g1=0);(h1=0);(i1=0);(j1=0);
(k1=0);(l1=0);(m1=0);(n1=0);(o1=0);(p1=0);(q1=0);(r1=0);(s1=0);(t1=0);
(u1=0);(v1=0);(w1=0);(x1=0);(y1=0);(z1=0);(z2=0);(z3=0);(z4=0);(z5=0);
(z6=0);(z7=0);(z8=0);(z9=0);(z10=0);(z11=0);(z12=0);(z13=0);
}
void delay(unsigned int k){for(int i=0;i<=k;i++);}
void clock(){delay(50);PORTB=0;RD2=1;RD2=0;delay(10);}
void reset(){delay(50);PORTB=0;RD3=1;RD3=0;delay(10);}
void scroll(int a,b,c,d,e)
{
(a=~a);(b=~b);(c=~c);(d=~d);(e=~e);
int t;(t=0);
loop1
a1=a);
for(int i=0;i<=10;i++)
{
PORTB=a1;clock();
PORTB=b1;clock();
PORTB=c1;clock();
PORTB=d1;clock();
PORTB=e1;clock();
PORTB=f1;clock();
PORTB=g1;clock();
PORTB=h1;clock();
PORTB=i1;clock();
PORTB=j1;clock();
PORTB=k1;clock();
PORTB=l1;clock();
PORTB=m1;clock();
PORTB=n1;clock();
PORTB=o1;clock();
PORTB=p1;clock();
PORTB=q1;clock();
PORTB=r1;clock();
PORTB=s1;clock();
PORTB=t1;clock();
PORTB=u1;clock();
PORTB=v1;clock();
PORTB=w1;clock();
PORTB=x1;clock();
PORTB=y1;clock();
PORTB=z1;clock();
PORTB=z2;clock();
PORTB=z3;clock();
PORTB=z4;clock();
PORTB=z5;clock();
PORTB=z6;clock();
PORTB=z7;clock();
PORTB=z8;clock();
PORTB=z9;clock();
PORTB=z10;clock();
PORTB=z11;clock();
PORTB=z12;clock();
PORTB=z13;reset();
}
(z13=z12);
(z12=z11);
(z11=z10);
(z10=z9);
(z9=z8);
(z8=z7);
(z7=z6);
(z6=z5);
(z5=z4);
(z4=z3);
(z3=z2);
(z2=z1);
(z1=y1);
(y1=x1);
(x1=w1);
(w1=v1);
(v1=u1);
(u1=t1);
(t1=s1);
(s1=r1);
(r1=q1);
(q1=p1);
(p1=o1);
(o1=n1);
(n1=m1);
(m1=l1);
(l1=k1);
(k1=j1);
(j1=i1);
(i1=h1);
(h1=g1);
(g1=f1);
(f1=e1);
(e1=d1);
(d1=c1);
(c1=b1);
(b1=a1);
(a=b);
(b=c);
(c=d);
(d=e);
(t=t+1);
if(t==5){(a=0);}
if(t==6){goto exit;}
goto loop1;
exit:;
}
//////FONT DATA BEGIN////////////////////////////////////////////////
void font(unsigned char c)///////////ASCII/////////////////////
{
if(c==97){scroll(0xF3, 0xAD, 0xAD, 0xAB, 0xC5);} //a
if(c==98){scroll(0x1, 0xED, 0xED, 0xED, 0xF3);}
if(c==99){scroll(0xC3, 0xBD, 0xBD, 0xBD, 0xDB);}
if(c==100){scroll(0xF3, 0xED, 0xED, 0xED, 0x1);}
if(c==101){scroll(0xC3, 0xAD, 0xAD, 0xAD, 0xCB);}
if(c==102){scroll(0xEF, 0xEF, 0x1, 0x6F, 0xAF);}
if(c==103){scroll(0xCF, 0xB5, 0xB5, 0xAD, 0xC3);}
if(c==104){scroll( 0x1, 0xEF, 0xDF, 0xDF, 0xE1);}
if(c==105){scroll(0xFF, 0xFF, 0xA1, 0xFF, 0xFF);}
if(c==106){scroll(0xFB, 0xFD, 0xFD, 0xA3, 0xFF);}
if(c==107){scroll(0x1, 0xF7, 0xE7, 0xDB, 0xFD);}
if(c==108){scroll(0xFF, 0xFF, 0x1, 0xFF, 0xFF);}
if(c==109){scroll(0xC1, 0xBF, 0xC1, 0xBF, 0xC1);}
if(c==110){scroll(0x81, 0xDF, 0xBF, 0xBF, 0xC1);}
if(c==111){scroll(0xC3, 0xBD, 0xBD, 0xBD, 0xC3);}
if(c==112){scroll(0x81, 0xD7, 0xB7, 0xB7, 0xCF);}
if(c==113){scroll(0xCF, 0xB7, 0xB7, 0xB7, 0xC1);}
if(c==114){scroll(0x81, 0xEF, 0xDF, 0xDF, 0xDF);}
if(c==115){scroll(0xDB, 0xAD, 0xAD, 0xAD, 0xB3);}
if(c==116){scroll(0xDF, 0xDF, 0x3, 0xDD, 0xDB);}
if(c==117){scroll(0x83, 0xFD, 0xFD, 0xFB, 0x81);}
if(c==118){scroll(0x87, 0xFB, 0xFD, 0xFB, 0x87);}
if(c==119){scroll(0x83, 0xFD, 0xF3, 0xFD, 0x83);}
if(c==120){scroll(0xB9, 0xD7, 0xEF, 0xD7, 0xB9);}
if(c==121){scroll(0x9B, 0xED, 0xED, 0xED, 0x83);}
if(c==122){scroll(0xDD, 0xD9, 0xD5, 0xCD, 0xDD);} //z
if(c==65){scroll(0xC1, 0xB7, 0x77, 0xB7, 0xC1);} //letter A
if(c==66){scroll(0x01, 0x6D, 0x6D, 0x6D, 0x93);}
if(c==67){scroll(0x83, 0x7D, 0x7D, 0x7D, 0xBB);}
if(c==68){scroll(0x01, 0x7D, 0x7D, 0xBB, 0xC7);}
if(c==69){scroll(0x01, 0x6D, 0x6D, 0x6D, 0x7D);}
if(c==70){scroll(0x01, 0x6F, 0x6F, 0x6F, 0x7F);}
if(c==71){scroll(0x83, 0x7D, 0x65, 0x6D, 0xA3);}
if(c==72){scroll(0x01, 0xEF, 0xEF, 0xEF, 0x01);}
if(c==73){scroll(0x7D, 0x7D, 0x1, 0x7D, 0x7D);}
if(c==74){scroll(0xF3, 0x7D, 0x7D, 0x03, 0x7F);}
if(c==75){scroll(0x01, 0xEF, 0xD7, 0xBB, 0x7D);}
if(c==76){scroll(0x01, 0xFD, 0xFD, 0xFD, 0xFD);}
if(c==77){scroll(0x01, 0xBF, 0xDF, 0xBF, 0x01);}
if(c==78){scroll(0x01, 0xBF, 0xDF, 0xEF, 0x01);}
if(c==79){scroll(0x83, 0x7D, 0x7D, 0x7D, 0x83);}
if(c==80){scroll(0x01, 0x6F, 0x6F, 0x6F, 0x9F);}
if(c==81){scroll(0x83, 0x7D, 0x75, 0x79, 0x81);}
if(c==82){scroll(0x01, 0x6F, 0x6F, 0x6F, 0x91);}
if(c==83){scroll(0x9B, 0x6D, 0x6D, 0x6D, 0xB3);}
if(c==84){scroll(0x7F, 0x7F, 0x01, 0x7F, 0x7F);}
if(c==85){scroll(0x03, 0xFD, 0xFD, 0xFD, 0x03);}
if(c==86){scroll(0x07, 0xFB, 0xFD, 0xFB, 0x07);}
if(c==87){scroll(0x01, 0xFB, 0xF7, 0xFB, 0x01);}
if(c==88){scroll(0x39, 0xD7, 0xEF, 0xD7, 0x39);}
if(c==89){scroll(0x3F, 0xDF, 0xE1, 0xDF, 0x3F);}
if(c==90){scroll(0x79, 0x75, 0x6D, 0x5D, 0x3D);} //letter Z
if(c==48){scroll(0x83, 0x7D, 0x7D, 0x7D, 0x83);} //NUM 0
if(c==49){scroll(0xDD, 0xBD, 0x1, 0xFD, 0xFD);}
if(c==50){scroll(0xBD, 0x79, 0x75, 0x6D, 0x9D);}
if(c==51){scroll(0x7B, 0x7D, 0x5D, 0x4D, 0x33);}
if(c==52){scroll(0xCF, 0xAF, 0x6F, 0xEF, 0x1);}
if(c==53){scroll(0xB, 0x5D, 0x5D, 0x5D, 0x63);}
if(c==54){scroll(0x83, 0x6D, 0x6D, 0x6D, 0xB3);}
if(c==55){scroll(0x79, 0x77, 0x6F, 0x5F, 0x3F);}
if(c==56){scroll(0x93, 0x6D, 0x6D, 0x6D, 0x93);}
if(c==57){scroll(0x9B, 0x6D, 0x6D, 0x6D, 0x83);} //NUM 9
if(c==32){scroll(0xFF, 0xFF, 0xFF, 0xFF, 0xFF);} //space
if(c==46){scroll(0xFF, 0xF9, 0xF9, 0xFF, 0xFF);} //.
if(c==58){scroll(0xFF, 0x99, 0x99, 0xFF, 0xFF);} //:
if(c==47){scroll(0xFB, 0xF7, 0xEF, 0xDF, 0xBF);} // /
if(c==92){scroll(0xBF, 0xDF, 0xEF, 0xF7, 0xFB);} // \
if(c==35){scroll(0xD7, 0x1, 0xD7, 0x1, 0xD7);} // #
if(c==40){scroll(0xC7, 0xBB, 0x7D, 0x7D, 0xFF);} // (
if(c==41){scroll(0xFF, 0x7D, 0x7D, 0xBB, 0xC7);} // )
if(c==95){scroll(0xFD, 0xFD, 0xFD, 0xFD, 0xFD);} // _
if(c==64){scroll(0x83, 0x6D, 0x55, 0x6D, 0x8B);} // @
if(c==38){scroll(0xC9, 0xB6, 0xCA, 0xFD, 0xFA);} // &
if(c==45){scroll(0xEF, 0xEF, 0xEF, 0xEF, 0xEF);} // -
if(c==36){scroll(0xDF, 0xAB, 0x1, 0xAB, 0xF7);} // $
if(c==43){scroll(0xEF, 0xEF, 0x83, 0xEF, 0xEF);} // +
if(c==37){scroll(0x3B, 0x37, 0xEF, 0xD9, 0xB9);} // %
if(c==94){scroll(0xEF, 0xDF, 0xBF, 0xDF, 0xEF);} //^
if(c==63){scroll(0xBF, 0x7F, 0x65, 0x5F, 0x9F);} // ?
if(c==59){scroll(0xFF, 0x92, 0x91, 0xFF, 0xFF);} // ;
if(c==61){scroll(0xEB, 0xEB, 0xEB, 0xEB, 0xEB);} // =
if(c==60){scroll(0xEF, 0xD7, 0xBB, 0x7D, 0xFF);} // <
if(c==62){scroll(0xFF, 0x7D, 0xBB, 0xD7, 0xEF);} // >
if(c==44){scroll(0xFF, 0xF5, 0xF3, 0xFF, 0xFF);} // ,
if(c==91){scroll(0xFF, 0x1, 0x7D, 0x7D, 0xFF);} // [
if(c==93){scroll(0xFF, 0x7D, 0x7D, 0x1, 0xFF);} // ]
if(c==126){scroll(0xEF, 0xDF, 0xEF, 0xF7, 0xEF);} // ~
if(c==33){scroll(0xFF, 0xFF, 0x5, 0xFF, 0xFF);} // !
if(c==42){scroll(0xAB, 0xC7, 0x1, 0xC7, 0xAB);} // *
//////FONT DATA END////////////////////////////////////////////////
}
int f;s
void typehere(const char *s)
{
while(*s)
font(*s++);
}
void main()
{
__delay_ms(100);
__delay_ms(200);
__delay_ms(100);
TRISB=0;
TRISD=0b01110011;
PORTD=0;
RD3=1;
RD3=0;
begin();
delay(10);
begin();
while(1)
{
typehere("-*-*-*-WELCOME TO GHATECH 2011-*-*the tech feast of Palghat-*-");
typehere(" GOVERNMENT ENGINEERING COLLEGE SREEKRISHNAPURAM, PALAKKAD ");
typehere(" ...testing display font..... abcdefghijklmnopqrstuvwxyz....ABCDEFGHIJKLMNOPQRSTUVWXYZ....0123456789....!@#$%^&*()_+-=;:?/>.<,~+\..... ..... ..... ..... .....");
}
}
:idea::idea::idea::idea:
---------- Post added at 14:17 ---------- Previous post was at 14:13 ----------
my 'c' knowledge is limited , so that will be very much reflected in the above program(never mind), i dont mean u should use the program, its just for getting some ideas....