2018-03-27 11:28 PM
I want to use 3 khz frequency signal has input to the micro controller.
2018-03-27 11:48 PM
Hi,
i am unable to read 0-3 khz frequency input signal to the microcontroller please give me any suggesion or code related to that- You can always read input signals by configuring GPIO pins as inputs and setting the speed(max frequency limit) which is greater than the input signal
i am unable to read 0-3 khz frequency input signal to the microcontroller please give me any suggesion or code related to that- What did you try so far?
2018-03-28 04:02 AM
i have used pin number 2(PD5/ AIN5),from that pin i tried to capture the frequency signal coming from sensor (3KHZ ).
we have to measure that signal and to indicate how much frequency is coming.
2018-03-28 05:19 AM
i have tried through ADC pin(ANI) but could not read.
2018-03-28 05:24 AM
'
please give me any suggesion'
post your code.
'
or code related to that '
no.
2018-03-28 06:32 AM
You'd likely want to use a TIM in Input Capture, PWM Input, or External Count mode. At that point you're looking to measure the period, or get a count over an integration period.
2018-03-29 04:28 AM
i have tried through ADC pin(ANI) but could not read.
You cannot measure frequency using ADC peripheral. You have to configure the PD5 as an alternate function timer in INPUT CAPTURE mode either to count rising or falling edges of input signal. After this, get the value from corresponding CCR register, divide this value from system clock frequency to get the frequency of input signal.
2018-03-29 07:05 PM
'
You cannot measure frequency using ADC peripheral.'
you certainly can. but it is generally unwise to do so.