The tcDspPulseIntegrator class is used to integrate the duration an input signal remains high following one (or up to 256) output pulse signals. The output pulse may be generated internally, or provided externally.
Up to 4 integrators are provided which are each individually enabled and configured to use the internal or external output pulse, repeat for 1-256 output pulses, and interrupt upon measurement completion.
The output pulse may be configured to provide any measurement period and overall pulse duration, based on the MityDSP's EMIF clock. Some round off may occur between desired values and actual values. The actual values may be obtained if this roundoff is a concern to the application.
The application may register a routine to be run in ISR context to provide specific functionality when any measurement is completed.
There is no limit to the number of instances of tcDspPulseIntegrator that may be created.
An instance of the tcDspPulseIntegrator class is created by specifying the firmware base address of the firmware core and the interrupt level used. This core supports specifying a level of gnAutoLevel, which automatically installs a vectored interrupt.
This is a simple example of tcDspPulseIntegrator creation and usage: