modelADC

Extends from Modelica.Blocks.Interfaces.SO.

Information

ADC

The AVR ADC (analog-to-digital converter) takes as parameters a selection of which voltage reference input to use (voltageReferenceSelect), what voltage this reference voltage has (voltageReference), the analogPort (which analog input to convert to a digital value) and which prescaler to use (prescaler, might be automatically chosen if the used AVR platform had known constants for this). The output is continuously read (at each time step), producing a voltage between 0 and voltageReference.

Parameters

TypeNameDefaultDescription
General › Constants
Types.AnalogPrescalerprescalerFunctions.Utilities.getAnalogPrescaler(mcu.cpuFrequency, mcu.minADCFrequency, mcu.maxADCFrequency)
SIunits.VoltagevoltageReferenceThe voltage of the reference voltage
Types.VRefSelectvoltageReferenceSelect
Types.AnalogPortanalogPort

Components

TypeNameDefaultDescription
Microcontrollermcu