moving message display

Status
Not open for further replies.

halee awan

Full Member level 3
Joined
Apr 8, 2006
Messages
151
Helped
11
Reputation
22
Reaction score
11
Trophy points
1,298
Activity points
2,207
hi to every one

i want to make a single/doble line led moving message dispaly
using 8051 micro controller .but i have no information or idea how i can do it ...
 

Just use timer interrupt.
Check the pseudo codes below..



//-------------------------------------------------
char dispBuffer[MessageSize];


//Timer interrupt 500mSec
void Timer1()
{

printf(" "); // Clear LCD Line

strcpy (dispBuffer, dispBuffer+1, MessageSize-1); // Scroll n-1 Byte
strncat (dispBuffer, dispBuffer,1); // Add 1st char at the end
dispBuffer[MessageSize] = 0; // String Termination

printf (dispBuffer); // display New Messeage

}

//------------------------------------------------------


the message should be initialized in a main routine at the very beginning..

Timer routine can also be replaced into simple loop using loop-delay in it.

You may process any user input to break out of the loop then.

Try this and have fun...
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…