View source for HANcoder/STM32/Blocks/Analog Input
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
Templates used on this page:
Return to HANcoder/STM32/Blocks/Analog Input.
You do not have permission to edit this page, for the following reason:
The action you have requested is limited to users in one of the groups: Administrators, Bureaucrats.
You can view and copy the source of this page.
Templates used on this page:
Return to HANcoder/STM32/Blocks/Analog Input.
Supported Targets: Olimexino, E407, P405
This blocks reads the analog value of the selected pin. The output of the block is the bit value of the conversion. When using the standard Vref of 3.3V the result of the conversion must be multiplied by 0.8mV to get the actual voltage on the pin. (The E407 has an option to enable filtering)
The 12-bit value of the voltage on the selected pin. So a value of 4095 means a voltage of 3.3V and a value of 2048 respresents a voltage of 1.65V. (3.3/4095)*output value or 0.806mV per bit. The output is of data type uint16, 16-bit unsigned integer.
Parameter | Description |
---|---|
Input pin | The input pin to be used for the digital input. Select one from the list. A warning will appear when the pin is already in use in another block. |
Sample time | Sample time of the block. The Sample time (in seconds) defines the rate at which the block is visited by the real-time scheduler of the target. The value of the Sample time has to be an integer multiple of the base sample time of the model. |