EVADC
Libraries:
Embedded Coder Support Package for Infineon AURIX TC3x Microcontrollers /
AURIX TC3x
Description
Measure the voltage of an analog input pin.
The Enhanced Versatile Analog to Digital Converter (EVADC) block outputs the voltage of
the input signal as a 12-bit value in an N-by-1
array, where N is
defined based on the number of channels selected.
Note
If you add the same pin in multiple channels of single EVADC block, then some channels fail to capture the converted result in external mode and Synopsys Virtualizer Studio.
Ports
Input
trigger — Trigger the conversion
scalar
Triggers the EVADC input pin for conversion via software trigger.
Dependencies
To enable this port, set the Mode parameter to
ADC trigger
.
Data Types: double
| int8
| int16
| int32
| uint8
| uint16
| uint32
| Boolean
sig — Simulink based simulation signal
scalar | vector
The simulation-only Simulink® signal input port acts as a pass-through for the output of the EVADC block during simulation.
Dependencies
To enable this port, select the Enable simulation port parameter.
Output
result — Voltage as 12-bit value
scalar | vector
The block outputs the input voltage as a 12-bit value in an
N-by-1
array, where N is defined based on the number of
channels specified in the Number of channels
parameter.
Data Types: uint16
status — Status of read operation
scalar
The block outputs the status of read operation at this port as one of these values:
0 —
Conversion result is not available1 —
Conversion result is available
Dependencies
To enable this port, set the Mode parameter to
Read results only
and select the
Enable status port parameter.
Data Types: double
Parameters
Mode — Operation mode of the EVADC block
ADC read
(default) |
ADC Trigger
Select one of these operation modes:
ADC read —
Select this option for the block to read the result at the selected channel. This option enables the output port result. Selection of this mode enables options in the Input # tab and Group select tab in the EVADC Peripheral Configuration.ADC trigger —
Select this option to trigger the selected channel via a software trigger. This option enables the input port trigger. Selection of this mode enables options Group select tab in the EVADC Peripheral Configuration.Note
As the block does not show the conversion results in this mode, you must use another EVADC block with the Mode parameter set to
ADC read
to display the conversion results.
Number of channels — Select number of channels
1
(default) |
2
|
3
|
...
Select the required number of channels ranging between 1
through 16
.
Status — Option to enable status port
off
(default) |
on
When you select this parameter, the block configures the status output port to output the status of the conversion result.
Dependencies
To enable this port, set the Mode parameter to
ADC read
.
Sample time — Frequency at which block reads input analog pin(s)
-1
(default) | scalar | vector
Specify in seconds how often the block must read the analog pin(s).
When you set this parameter to -1
, Simulink determines the best sample time for the block based on the block
context within the model.
Dependencies
To enable the Sample time parameter, set the
Mode parameter to ADC
read
.
Enable simulation port — Option to enable peripheral simulation ports in the block
off
(default) |
on
Select this parameter to enable the peripheral simulation capability.
Note
If you do not have a SoC Blockset™ license, you cannot enable the Enable simulation port parameter.
Version History
Introduced in R2024a
See Also
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)