Pulse counter using Timer

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

Pulse counter using Timer

1,538 次查看
rajani_sureja33
Contributor III

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

标签 (1)
0 项奖励
回复
7 回复数

1,225 次查看
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,225 次查看
rajani_sureja33
Contributor III

Instant help will be appreciated:smileyhappy:

0 项奖励
回复

1,225 次查看
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,225 次查看
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,225 次查看
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,225 次查看
soledad
NXP Employee
NXP Employee

Hello,

 

Could you please mention the device you are using?

Regards

Sol

0 项奖励
回复

1,225 次查看
rajani_sureja33
Contributor III

we are using lpc1833 on P1.0 

0 项奖励
回复