Digital Input

<< Click to Display Table of Contents >>

Navigation:  STM32F4 Target > Block References > On-chip Peripherals > IO >

Digital Input

Previous pageReturn to chapter overviewNext page

User Interface

How this block appears in a Simulink model?

digital_input_block

What can be configured?

digital_input_configuration

When to use this block?

This block implements Digital Output Module to generate digital output logic from MCU pin.

Input port accepts any native kind of Simulink data type.

MCU will generate output from logic pins based on the following logic.

if (input port == 1)

  Output Logic 1

else

  Output Logic 0

end

Available ports and pins shown depend on selected MCU (in the Target Setup Block).

How does this block work?

The Digital Output Block is a "per port" set up block. This means each block is used to configure pins of a specified port.

You can have as many Digital Output Block  as you need in a model, to configure different pins of the same or different ports.

See Use global initialization for more information about this option.

Demos

1.Digital Input