Difference between revisions of "Component: Waveform Generator (DSP Inputs)"
(Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix Ltd |- | width="20%" style="color:gray;" | Version | 1.2 |- | width="20%" style="color:gray...") |
|||
Line 20: | Line 20: | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 36: | Line 38: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 72: | Line 76: | ||
[[File:FreqGenMulti.jpg]] | [[File:FreqGenMulti.jpg]] | ||
− | == | + | ==Macro reference== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
Revision as of 14:10, 20 January 2023
Author | Matrix Ltd |
Version | 1.2 |
Category | DSP Inputs |
Contents
Waveform Generator component
A waveform generator component designed to plug into the DSP system component and allow several discreet waveforms to be generated. Functions available include: Sine, Cosine, Square, Pulse, Triangle, Sawtooth, Noise, Custom
Component Source Code
Please click here for the component source code: FC_Comp_Source_DSP_Wave_Gen.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Basic Sine Wave Generator
FreqGen
The frequency is controlled by adjusting the potentiometer on the panel.
The frequency generator period is controlled using the Period Offset property and/or the SetOffset component macro. The Offset value is the LUT index multiplier so a offset of 3.0 will only read every 3 values of the waveform to provide 1/3 of the period and generate 3 x the frequency. As the waveform period is being reduced there is potential for the signal to start to become less defined and more stepped.
Multi Wave Signal Generator
Switch-able mode frequency generator example file generating different waveforms depending on the value on pins RB0 and RB1.
0 = Sine, 1 = Square, 2 = Triangle, 3 = SawTooth
The frequency is controlled by adjusting the potentiometer on the panel, the waveform is controlled by adjusting the switches on the panel.
Macro reference
![]() |
ModifyFrequency |
Sets the frequency output rate by altering the period offset to a new value. | |
![]() |
OffsetRate |
0.2=F/5 0.5=F/2 1.0=F 1.5=F*1.5 2.0=F*2 | |
![]() |
Return |
![]() |
SetOffset |
![]() |
Offset |
![]() |
Return |
![]() |
GetOffset |
![]() |
Return |