Digital Output

<< Click to Display Table of Contents >>

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

Digital Output

Previous pageReturn to chapter overviewNext page

User Interface

How this block appears in a Simulink model?

stm32f0_digital_output_block

What can be configured?

stm32f0_digital_output_mask

Configuration item

Selectable option/ Value

Description

Port

A | B | C | D | E | F

Select GPIO port for specify pins

Speed (MHz)

2 | 10 | 50

Select GPIO clock speed for specify pins

Type (Push-Pull/Open-Drain)

Push Pull | Open Drain

Pin type for specify pins

Use pin 0, ..., 15

Checked | Unchecked

Select pin number for specify GPIO port.

Sample Time (Sec)

(sampletime)

Specify block sample time.

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 == 0)

  Output pin Logic "Low"

else

  Output pin Logic "High"

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.

Demos

1.Digital Input/Output demo