Page 1 of 1

how to read frequency of Din0

Posted: Mon 17. Jun 2024, 16:59
by tbraux
Hi
for a personnal project, i need to read the frequency of the signal on input Din0, and update that value every 250 ms.
any idea how to do that ?
thanks

Re: how to read frequency of Din0

Posted: Mon 17. Jun 2024, 17:20
by M.Maidhof
Hi,

which frequency range do you want to measure?

regards

Michael

Re: how to read frequency of Din0

Posted: Mon 17. Jun 2024, 17:23
by tbraux
from 0 to 1.1 kHz
that is a speed information, 27.5 Hz = 1 km/h
I need up to 40 km/h

Re: how to read frequency of Din0

Posted: Wed 19. Jun 2024, 09:43
by M.Maidhof
Hi,

the digital inputs of the PCAN-Router FD are designed to read only low frequencies (low pass filter included). The Din0 is linked to MicrocController (NXP LPC4078) P1.14 which can be used with Timer2 Cap0 for such an application. We don't have any code available to read frequencies with that port, but it should be possible. You have to use timer 2 and the capture input to trigger the signal. See MicroController datasheet for more details.

regards

Michael

Re: how to read frequency of Din0

Posted: Fri 9. Aug 2024, 09:41
by tbraux
it works ! thanks for the help.