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.

moving message display

Status
Not open for further replies.

halee awan

Full Member level 3
Joined
Apr 8, 2006
Messages
152
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 ...
 

sahn001

Newbie level 5
Joined
Feb 21, 2007
Messages
10
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,346
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top