|Page 1 of 1|
|Author:||romario [ Wed Jul 18, 2012 5:46 am ]|
|Post subject:||Time delay|
How can I implement a five minutes delay routine with 68000?
|Author:||lee [ Wed Jul 18, 2012 5:10 pm ]|
Here's a few different approaches you can take.
A busy loop. If you know how fast your 68000 is clocked (if you're using EASy68K then you may like to try this) then you can know how long each instruction takes to execute. Knowing that you can work out how many times you a simple count and loop if not done piece of code would need to be executed. This count can be written into the loop.
A timed loop 1. If you have time functions, like EASy68K task 8, you can get the current time, work out when five minutes in the future will be, then just keep getting the current time and checking to see if it has reached this value yet.
A timed loop 2. If you have timed interrupts available, EASy68K has them via task 32, you can set up a counter that is changed by them and wait for this counter to count out.
A system call. The system you're coding for may have something that can do this as a built in function. EASy68K task 23 for example.
|Page 1 of 1||All times are UTC|
|Powered by phpBB® Forum Software © phpBB Group