timer in LPC1769

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

timer in LPC1769

769件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by koceila882 on Tue Apr 17 11:03:47 MST 2012
hello friends
I want to use a timer to count a time between an ultrasound transceiver and ultrasound receiver?
How can I use timer in this application ?
thank you
0 件の賞賛
返信
1 返信

736件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Tue Apr 17 23:45:35 MST 2012
Hi,

You are probably interested in the capture mode. Basically this mode lets you take a snapshot of the timer value on a external event (pin change).

You will need to have a digital input signal, signalling if there is, or if there is no ultrasound received. Let's assume a high signal if there is an ultrasound, and a low signal if there is none.

First you would inititalize the timer in capture mode to take the snapshot of the timer value on a rising edge of your "ultrasound present" signal and generate an interrupt on this event. More information on this can be found in the user manual, chapter 21. Then you can reset the timer value to 0, start the timer and enable the ultrasound transceiver. After this you will only have to wait for the capture interrupt and read the capture value.

Regards,
0 件の賞賛
返信