Frequency Measurement

Author Message

Joined: 11/12/2012
Location: United Kingdom
Posts: 3404
Posted: 02:15pm 10 Jul 2018      

The latest version of the Armmite code includes support for a high speed frequency counter.

Using SETPIN 93,FIN or SETPIN 93,CIN, pin 93 (PG8) is configured to clock a timer as suggested in the posts above. The timer then generates an interrupt on timer-overflow (16-bits) allowing total counts up to 2^63 before counter overflow (normal Micromite integer).

I've tested the functionality up to 20MHz which is the fastest the PWM on the Armmite will run and it seems to work perfectly.

The concept could be engineered into the firmware of the MM+ and/or MMX but the PIC has far fewer timers than the STM32 so it may compromise other functionality. There is no chance of doing it on the MM2Edited by matherp 2018-07-12