Is it possible to use timer to count the pulses ??? if yes then how??
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?.
Instant help will be appreciated:smileyhappy:
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);
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?
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!
-----------------------------------------------------------------------------------------------------------------------
Hello,
Could you please mention the device you are using?
Regards
Sol
we are using lpc1833 on P1.0