This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Analog Input

Measure the voltage of an analog input pin


Simulink Coder Support Package for NXP FRDM-KL25Z Board/ FRDM-KL25Z


Measure the voltage of the selected analog input pin A0-A5. The block output emits a value in the range 0.0 to 1.0 with 16 bit resolution. The maximum voltage is determined by the input reference voltage, VREFH, which defaults to a 3.3 Volt source.

During simulations without the hardware, this block emits zeroes.


Analog pin

Select the analog pin from A0-A5 to measure the voltage. Make sure not to select the same pin number for multiple blocks in your model.

Sample time

Specify how often this block reads the pin value, in seconds.

View pin map

Click on this button to open a snapshot of the board with a reference to the GPIO pins.