jibranjin
Newbie level 3
Guys i m making a Scrolling text using 5x7 display with 8051 but i m having a problem that i m unable to figure out that how to scroll a text i wrote this test code but it keeps displaying 'A' .. plz can sumbody tell me what is the prob with this code...... i ll very thankful.....
**broken link removed**
View attachment ISIS Professional - C__Documents and Settings_Administrator_Desktop_counter_matrix_4.DSN.pdf
i also Attached Schematic's proteus file ...... and its pdf
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 #include<reg51.h> int count[5]={0x08,0x10,0x20,0x40,0x80}; int A[5]= {0x7F,0x98,0x98,0x7F,0x00}; int Blank[5]= {0x0F,0x00,0x00,0x00,0x00}; int c; int i,j ; int z; void delay(unsigned int msec) // Function to provide time delay in msec. { for(i=0;i<msec;i++) for(j=0;j<1275;j++); } void scroll() interrupt 1 { TL0=0x36; //Reloading Timer0 TH0=0xA6; for(z=0;z<5;z++){ P2=~A[z]; P3=count[z]; delay(1); P2=0xFF; } } void main () { TMOD=0x11; //Intialize Timer 0 TL0=0x36; //Reloading Timer0 TH0=0xA6; IE=0x82; // Enable Timer 0 interrupt TR0=1; //Start Timer 0 while(1){ for (c=0;c<5;c++){ delay(100); for (z=0;z<4;z++){ A[z]=A[z+1]; } A[4]=Blank[c]; } } }
**broken link removed**
View attachment ISIS Professional - C__Documents and Settings_Administrator_Desktop_counter_matrix_4.DSN.pdf
i also Attached Schematic's proteus file ...... and its pdf
Last edited by a moderator: