I have an application where I need to measure frequencies on multiple input lines. To be specific I am working with an array of 8 - 16 light to frequency sensors. These sensors convert light intensity into a CMOS compatible frequency output. The frequency range is 0 Hz - 1 MHz from total dark to full exposure.
I have used Paul's FreqCount template, which employs the Low Power Timer (LPTMR) of the Teensy 3.1 processor. This works well, but in order to measure all 8 or 16 channels with this method I need to use an external multiplexer, and - in order to get some precision - the total integration time to capture all channels is rather high (1.6 seconds if I use 100 ms as a base for the counter, not considering switching times on the MUX).
According to the datasheet for the MK20DX256 the processor has 3 flexible timer modules (FTM0 - FTM2). The FreqMeasure program actually uses this module. Is there a chance that I can use these modules or are they too slow for the frequency range I am looking at? If they can be used how many inputs would I be able to count simultaneously?
I am still new to the hardware programming of the micro controllers, so any help is greatly appreciated.
Thanks,
Wolfgang
I have used Paul's FreqCount template, which employs the Low Power Timer (LPTMR) of the Teensy 3.1 processor. This works well, but in order to measure all 8 or 16 channels with this method I need to use an external multiplexer, and - in order to get some precision - the total integration time to capture all channels is rather high (1.6 seconds if I use 100 ms as a base for the counter, not considering switching times on the MUX).
According to the datasheet for the MK20DX256 the processor has 3 flexible timer modules (FTM0 - FTM2). The FreqMeasure program actually uses this module. Is there a chance that I can use these modules or are they too slow for the frequency range I am looking at? If they can be used how many inputs would I be able to count simultaneously?
I am still new to the hardware programming of the micro controllers, so any help is greatly appreciated.
Thanks,
Wolfgang