Digital Output

From OpenMBD
< HANcoder‎ | STM32‎ | Blocks
Jump to: navigation, search
Supported Targets: Olimexino, E407, P405

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

DigitalOutput.png

Mask

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

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
- 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.

See Also

Digital Input | Analog output