Hello,
can anyone tell me if can I use threads and timers (like in C/C++) on LPC2361 and where can I found some demo/examples/manuals about that?
Thanks
"when you run a function from one timer the other timers dont work"
So don't do that, then!
That was just a very simplistic example to give you the idea.
"And some functions can take a long time"
So, indeed, you would not call them direct from the timer code!
You could, just as one example, set a flag to indicate that the timer has expired - and test that flag in your main loop...
// The countdown is running if( --timer_1 == 0 ) { // The countdown has reached zero; ie, the timer has expired // Set flags and/or call functions as appropriate }
"as appropriate" is the key phrase there!
www.8052.com/.../144417
Dear Andrew
you right. The only way is to make sure that the required time is at most or less than the available time. So you must provide in time escape from any running sequence. But will be harder to program :(. That's why they invented multithreading, that you don't worry about that. No offence, I hope
Dorin
Forgive me I forgot to say thanks for help. Thanks man. I appreciate your help.
Can i know how to do multithreading in it?