How to introduce Delay in QG8

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

How to introduce Delay in QG8

1,758 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
3 Replies

374 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

374 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

374 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