how to read frequency of Din0

Universal Programmable Converter for CAN FD and CAN
Post Reply
tbraux
Posts: 5
Joined: Mon 17. Jun 2024, 16:56

how to read frequency of Din0

Post by tbraux » Mon 17. Jun 2024, 16:59

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

M.Maidhof
Support
Support
Posts: 1748
Joined: Wed 22. Sep 2010, 14:00

Re: how to read frequency of Din0

Post by M.Maidhof » Mon 17. Jun 2024, 17:20

Hi,

which frequency range do you want to measure?

regards

Michael

tbraux
Posts: 5
Joined: Mon 17. Jun 2024, 16:56

Re: how to read frequency of Din0

Post by tbraux » Mon 17. Jun 2024, 17:23

from 0 to 1.1 kHz
that is a speed information, 27.5 Hz = 1 km/h
I need up to 40 km/h

M.Maidhof
Support
Support
Posts: 1748
Joined: Wed 22. Sep 2010, 14:00

Re: how to read frequency of Din0

Post by M.Maidhof » Wed 19. Jun 2024, 09:43

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

tbraux
Posts: 5
Joined: Mon 17. Jun 2024, 16:56

Re: how to read frequency of Din0

Post by tbraux » Fri 9. Aug 2024, 09:41

it works ! thanks for the help.

Post Reply