How to introduce Delay in QG8

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to introduce Delay in QG8

2,037 Views
Sandeepsharma
Contributor I
Hi,
  I am using QG8 demo board, and want to introduce some know value of delay between two instructions.
  i.e. 5 sec or 5 min. So how to calculate and introduce in my program.
 
sandeep
Labels (1)
0 Kudos
Reply
3 Replies

653 Views
Ake
Contributor II
Sandeep,
There are various ways of creating a delay like that.
One of them is to use the RTI clock in the 9S08QG.
It has a 1 KHz source and can be divided down by 200 to get a 5 Hz interrupt signal.
 
I have included software, that I have not tested, but tell me if it does not work.
 
Regards,
Ake
0 Kudos
Reply

653 Views
bigmac
Specialist III
Hello Sandeep,
 
The following thread provides discussion in the context of providing switch de-bounce delays, but might also be relevant to your problem.
 
 
Regards,
Mac
 
0 Kudos
Reply

653 Views
RogerSchaefer
Contributor III
If you would perfer assembly language you could look at the software from this project that uses various delay subroutines.
 
Roger Schaefer
0 Kudos
Reply