??? 12/13/04 10:07 Read: times |
#82978 - You need a timer! Responding to: ???'s previous message |
How to write a code for a 4 seconds counter ... not using ... timers ... can be used in a code where the program has to do lots of things at the same time. If you're not going to use timers, the only solution is to use some piece of software with a known execution time (4s in this example). The commonest way to do this is with a loop, where you count the total number of instruction cycles "consumed" by the loop - and adjust that to your required delay. But, if your processor is stuck in such a timing loop, it will be totally 100% dedicated to that task: it will not be ale to do any other thing - let alone "lots of things at the same time". If you want timing without locking-up your processor, you must use a hardware timing function - whether on-chip or external hardware (unless you can precisely calculate the execution times of every other part of your system...) |
Topic | Author | Date |
Use of Bitwise Area | 01/01/70 00:00 | |
Limited View Point | 01/01/70 00:00 | |
Method or formula | 01/01/70 00:00 | |
try these | 01/01/70 00:00 | |
Similar Code | 01/01/70 00:00 | |
You need a timer! | 01/01/70 00:00 | |
try this | 01/01/70 00:00 | |
Thank you | 01/01/70 00:00 | |
Vertical counters | 01/01/70 00:00 | |
Vertical Counters![]() | 01/01/70 00:00 |