AtomSoft
Well-Known Member
Hey guys i need some help. Im trying to wrap my head around scrolling text on some LED matrixs.
Im using my LPC2148 for this but it shouldnt matter much. I can convert PIC code to it without any issues.
I have code in place to show characters on a single matrix but how would i scroll the text across the matrix?
I commented the code below for the character display i have in place but i can write strings also but it will just show the character for some time then show the next, then the next without scrolling feature.
How can i implement it?
Im using my LPC2148 for this but it shouldnt matter much. I can convert PIC code to it without any issues.
I have code in place to show characters on a single matrix but how would i scroll the text across the matrix?
I commented the code below for the character display i have in place but i can write strings also but it will just show the character for some time then show the next, then the next without scrolling feature.
How can i implement it?
Code:
void LEDChar(unsigned char letter,unsigned char style){
unsigned int myData; //Data Holder
char x; //loop holder
letter -= 0x20; //Deduct 0x20 from original char for array
SETBIT(DEC,Dec_Rst); //Clear the 4017 Johnson Counter
CLRBIT(DEC,Dec_Rst); //Start It
for(x=0;x<5;x++){ //Loop 5 times (column)
CLRBIT(DEC,Dec_Clk); //4017 Clock Low
SETBIT(DEC,Dec_Clk); //4017 Clock High
myData = 0; //Clear data
myData = (Font5x7[((letter*5) + x)] | style) ; //Get Font Data
myData <<= LEDS; //Shift over for output to pins p1.25:p1.19
LEDP = (LEDP & ~(0x7F<<LEDS)) | ~myData; //Clear old pin data and place new data
DelayUs(1); //Delay 1 us before updating new row
}
}