EASy68K  
It is currently Fri Jun 05, 2020 3:25 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Time delay
PostPosted: Wed Jul 18, 2012 5:46 am 
Offline

Joined: Tue May 01, 2012 2:10 pm
Posts: 8
Location: nkana
How can I implement a five minutes delay routine with 68000?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 18, 2012 5:10 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
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.

Lee.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group