Pulse counter using Timer

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

Pulse counter using Timer

1,544件の閲覧回数
rajani_sureja33
Contributor III

Is it possible to use timer to count the pulses ??? if yes then how??

ラベル(1)
0 件の賞賛
返信
7 返答(返信)

1,231件の閲覧回数
rajani_sureja33
Contributor III

I am getting the pclk freq but don't get external input freq, Can anyone suggest me what has been remained to select external input on this pin?.

1,231件の閲覧回数
rajani_sureja33
Contributor III

Instant help will be appreciated:smileyhappy:

0 件の賞賛
返信

1,231件の閲覧回数
rajani_sureja33
Contributor III

This is the P1.0 (Timer1/capture1) initialization code for rpm reading.

 

TIM_COUNTERCFG_Type TIM_FanspeedTimerConfig;
TIM_CAPTURECFG_Type TIM_FanspeedCaptureConfig;

TIM_FanspeedCaptureConfig.CaptureChannel = TIM_COUNTER_INCAP1;
TIM_FanspeedCaptureConfig.RisingEdge = ENABLE;
TIM_FanspeedCaptureConfig.FallingEdge = DISABLE;
TIM_FanspeedCaptureConfig.IntOnCaption = DISABLE;


TIM_ConfigCapture(LPC_TIMER1,&TIM_FanspeedCaptureConfig);
TIM_ResetCounter(LPC_TIMER1);

TIM_Cmd(LPC_TIMER1,ENABLE);

1,231件の閲覧回数
rajani_sureja33
Contributor III

I am using Timer0 to generate an interrupt at every 1sec and I am reading capture value at pin 1.0 to count value of rpm. is it a right way to measure the rpm of fan?

But, I m still not getting actual rpm reading on this pin.

Can you please advice me asap? 

1,231件の閲覧回数
soledad
NXP Employee
NXP Employee

Please check the below thread and let me know if this helps.

Any example to use CAPTURE PINS as pulse counters? | www.LPCware.com 


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

1,231件の閲覧回数
soledad
NXP Employee
NXP Employee

Hello,

 

Could you please mention the device you are using?

Regards

Sol

0 件の賞賛
返信

1,231件の閲覧回数
rajani_sureja33
Contributor III

we are using lpc1833 on P1.0 

0 件の賞賛
返信