Difference between revisions of "HANcoder/STM32/Blocks/Digital Output"
From OpenMBD
(Created page with "{{HANcoder/block| info= A 'Digital Output' block sets the output level of the selected pin. If the input is '1' the output is high, if the input is '0' the output is low. |...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
DigitalOutputMask.png | DigitalOutputMask.png | ||
+ | }} | ||
+ | |||
+ | == Block inputs (inports) == | ||
+ | The value of the output, 1 means the output will be high, 0 means it will be low. | ||
+ | |||
+ | == Block parameters == | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! style="width:150px" | Parameter | ||
+ | ! Description | ||
+ | |- | ||
+ | | Output pin | ||
+ | | The output pin to be used for the digital output. Select one from the list. A warning will appear when the pin is already in use in another block. | ||
+ | |- | ||
+ | | Configuration | ||
+ | | The configuration to be used. There are two options:<br/> | ||
+ | - Open drain, the pin can only switch to ground not to 3.3V<br/> | ||
+ | - Push pull, the pin will switch to ground when the input of the block is 0 and to 3.3V when the input is 1. | ||
+ | |- | ||
+ | | 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. | ||
+ | |} | ||
+ | |||
+ | == Examples == | ||
+ | See the template model for an example how to toggle the LED with this block. | ||
+ | |||
+ | {{HANcoder/BlockFooter| | ||
+ | |SeeAlso = [[HANcoder/STM32/Blocks/Digital_Input|Digital Input]] {{!}} [[HANcoder/STM32/Blocks/Analog_Output|Analog output]] | ||
}} | }} |
Latest revision as of 10:07, 5 May 2017
Supported Targets: Olimexino, E407, P405
Contents
General information about Digital Output
A 'Digital Output' block sets the output level of the selected pin. If the input is '1' the output is high, if the input is '0' the output is low.
Block
Mask
Block inputs (inports)
The value of the output, 1 means the output will be high, 0 means it will be low.
Block parameters
Parameter | Description |
---|---|
Output pin | The output pin to be used for the digital output. Select one from the list. A warning will appear when the pin is already in use in another block. |
Configuration | The configuration to be used. There are two options: - Open drain, the pin can only switch to ground not to 3.3V |
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. |
Examples
See the template model for an example how to toggle the LED with this block.