How to use timer to achieve delay in MC56F8006?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to use timer to achieve delay in MC56F8006?

737件の閲覧回数
khalil001
Contributor II

I am using the MC56F8006.

 

And I want to use timer to achieve delay .

 

Please tell me how to do it.

 

Thank you very very much.

ラベル(1)
タグ(1)
0 件の賞賛
4 返答(返信)

581件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I do not suggest you can use timer to implement the delay. Generally, we suggest customer use nop instruction to generate delay. If you use Timer, you can start time so that it can count the ticks, you can poll the timer counter, when it reaches a predefined value the delay time corresponds to, you can disable timer, and execute the next instruction.

BR

Xiangjun Rong

0 件の賞賛

581件の閲覧回数
khalil001
Contributor II

Use the TMR Hold Register and the TMR Counter Register?

0 件の賞賛

581件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

It is okay to read the TMRn_CNTR directly if you only use one Timer.

BR

XiangJun Rong

0 件の賞賛

581件の閲覧回数
khalil001
Contributor II

Thank you very much.

wish you have a happy life

0 件の賞賛