How to introduce Delay in QG8

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to introduce Delay in QG8

2,006 次查看
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
标签 (1)
0 项奖励
回复
3 回复数

622 次查看
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 项奖励
回复

622 次查看
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 项奖励
回复

622 次查看
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 项奖励
回复