ADC Block

Adc Block

Note: This block is only available on STM32 processors.

The Adc Block uses an STM32 Analog to Digital Convertor (ADC) to acquire a single sample per tick of the model from the ADC and pin selected. Different STM32 processors have different resolutions and sampling times, so consult individual reference manuals for more information. Input voltage is typically from 0 to 3.3V and quantized by the resolution of the ADC.

Parameters

  • Adc The ADC peripheral to use for sampling.
  • Adc Pin The pin that the ADC will sample from.
  • Resolution The resolution of the ADC in bits.
  • Sample Time The time in clock cycles that the ADC will sample for. This varies depending on the STM32 processor, but generally the higher the sample time, the more accurate and longer the reading.

Examples

ADC example