Skip to content

adc_config

Xiaosheng An edited this page Jul 17, 2025 · 1 revision

This component configures the ADC unit either from parameters or JSON string input.

name type description default min. max.
device_id integer The ADC Device number to be configured. For internal ADCs, this is the unit. For external ADCs, this is the address enumeration. 0 0 9
f_s_hz integer Total sampling frequency in Hz. With n channels enabled, the sampling frequency of each channel is f_s_hz/n Hz. 1000 100 1000000000
mode boolean The ADC conversion mode. False for Single-shot. True for Continuous. 0 0 1
channel_[0..15] integer Pin mapping for individual channels of this ADC instance/unit. For fixed-mapped ADC, any non-negative number means enabled channel. -1 -1 999
In Ev. Description
init Initialise the ADC unit with the configuration defined in either the parameters or the JSON input port.
Data In Description
JSON Alternative definition to the parameters to override. The format of it is:

{"id": 0 ,"fs": 1000 ,"m": 0 ,"c0": -1 ,"c1": 123 ,"c2": -1 ,"c3": 0 , ... ,"c15": -1 }

Data Out Description
Out Ev. Description
-- Triggerred when the configuration is completed without any error
error Triggerred when:
  1. the same unit is already initialised
  2. the parameters are invalid
  3. the JSON port gives invalid format
State Machine None
Toolbox Core Version v1.0.
Licence Type LGPLv3 Component Supplier inx ltd.{target="_blank"}
Minumum DCC A0000 Profiles All.

Clone this wiki locally