Component: Math (DSP)
Author | Matrix Ltd |
Version | 1.2 |
Category | DSP |
Contents
Math component
Component to combine together two DSP buffers into one an index at a time. Functions include: Add, Average, Difference, Max, Min, Subtract
Detailed description
No detailed description exists yet for this component
Examples
Here is a example file which generates a sine wave and a triangle wave and then uses the DSP sum component to merge together the two signals.
DSPSum
Here is the kind of waveform you can expect to see using the scope window when adding the two signals together.
Here is the kind of waveform you can expect to see using the scope window when subtracting the two readings.
Here is the kind of waveform you can expect to see using the scope window when taking the maximum of the two signals.
Here is the kind of waveform you can expect to see using the scope window when taking the minimum of the two signals.
Here is the kind of waveform you can expect to see using the scope window when taking the average between the two signals.
Here is the kind of waveform you can expect to see using the scope window when taking the difference between the two signals.
Downloadable macro reference
![]() |
Calculate |
Performs a single calculation on the two input buffers and provides a result into the output buffer | |
![]() |
Return |
![]() |
CalculateArray |
Performs a single calculation on the two input buffers and provides a result into the output buffer | |
![]() |
Return |
![]() |
ReadPeakArray |
Returns the highest value from the last "Decay" number of buffers. | |
![]() |
Return |
![]() |
ReadAverageArray |
Returns the average from the last "Decay" number of buffers. | |
![]() |
Return |
![]() |
ReadPeak |
Returns the highest value from the last "Decay" number of index locations. | |
[[File:]] - | Return |
![]() |
ResetRecords |
Allows the peak and trough to be reset back to default values. | |
[[File:]] - | ResetPeak |
[[File:]] - | ResetTrough |
![]() |
Return |
![]() |
ReceiveString |
Gets a string from the receive buffer | |
![]() |
MaxChars |
![]() |
Timeout |
Time in milliseconds to wait for data | |
![]() |
Return |
![]() |
Initialise |
Initialises the UART component pins ready to send and receive data | |
![]() |
Return |
![]() |
Start |
Startup routine required by the hardware device. Automatically clears the display after initialising. | |
![]() |
Return |
![]() |
SetLEDState |
Sets the state of a single LED | |
![]() |
Port |
0 = PortA, 1 = PortB | |
![]() |
LED |
0 = LED0, 7 = LED7 | |
![]() |
State |
![]() |
Return |
![]() |
GetRxIdent |
Gets the Rx ID as a Integer Standard and Extended IDs. | |
![]() |
Buffer |
![]() |
Return |
![]() |
Initialise |
Must be called before any other CAN component macros to enable and initialise the CAN peripheral. | |
![]() |
Return |