DAC Block
Note: This block is only available on STM32 processors.
The Dac Block uses an STM32 Digital to Analog Converter (DAC) to output a single sample per tick of the model from the DAC and pins selected. Different STM32 processors have different quantizations, so consult individual reference manuals for more information. For example, the STM32G474 has a 12-bit DAC (0 to 4095 values) that outputs between 0 to 3.3V, so it is important to scale and bias floating point numbers correctly before sending them to the DAC.
The input to the DAC block needs to be a 1x2 array (rows by columns), where the 1st column is Dac Pin 1 and the 2nd column is Dac Pin 2. DAC block currently only supports 1x2 arrays (1 sample for 2 channels) per tick of the model.
Parameters
- Dac The DAC peripheral to output on.
- Dac Pin 1 The 1st pin that the DAC will output to.
- Dac Pin 2 The 2nd pin that the DAC will output to.