Component: Timed Interval (Storage)
Author | Matrix TSL |
Version | 1.1 (Release) |
Category | Storage |
Contents
Timed Interval component
Allows you to setup a specific timed interval via the use of a hardware timer peripheral. Useful for regular time accurate periodic polling and sampling.
Examples
No additional examples
Downloadable macro reference
StartTimerInterval
Starts the timer interval.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
StopTimerInterval
Stops the timer interval.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Time Unit
This property is of type Fixed list of ints and can be referenced with the variable name TimeUnit.
Unit of time used for the time period.
For example you might want every 4 milliseconds or every 3 hours.
Time Period
This property is of type Unsigned integer and can be referenced with the variable name TimePeriod.
Value of time used for the time period.
For example you might want every 4 milliseconds or every 3 hours.
Estimated Best Period
This property is of type Floating point and can be referenced with the variable name EstBestPeriod.
The closest we can get to the required time period based on prescaler and postscaler settings.
Smaller scalers provide finer resolution but impose limits on the maximum delay.
Max Time Measurement
This property is of type Floating point and can be referenced with the variable name MaxTimeMeasurement.
The maximum time we can do based on the current timer and scaler settings.
Callback Macro
This property is of type Macro call and can be referenced with the variable name CallbackMacro.
User defined macro automatically called on a periodic basis.
Timer
This property is of type Fixed list of ints and can be referenced with the variable name Timer.
Timer Peripheral to use to monitor the passage of time.
Bit Depth
This property is of type Unsigned integer and can be referenced with the variable name BitDepth.
Number of bits in the timer peripheral.
8-bit timers can count from 0-255 before overflowing.
16-bit timers can count from 0 to 65535 before overflowing.
Prescaler
This property is of type Fixed list of ints and can be referenced with the variable name PrescalerFilter.
Scaler applied to the timer,
Small scalers allow for finer resolution but will limit the max time and also put more load on the microcontroller.
Recommended to use as large a setting as possible which still provides enough accuracy.
PostScaler
This property is of type Fixed list of ints and can be referenced with the variable name PostscalerFilter.
Scaler applied to the timer,
Small scalers allow for finer resolution but will limit the max time and also put more load on the microcontroller.
Recommended to use as large a setting as possible which still provides enough accuracy.
Timer Delay (ms)
This property is of type Unsigned integer and can be referenced with the variable name TimerDelay.
Number of milliseconds between timer events which increment the simulated timer counter variable.
10ms will yield the highest resolution. Values less than this will likely just increase the error and making the timer run slow.
Higher delays will yield greater accuracy.