Main Content

Digital Write

Set logical state of digital output pin

  • Digital Write block

Libraries:
Embedded Coder Support Package for STMicroelectronics STM32 Processors / STM32F746G-Discovery
Embedded Coder Support Package for STMicroelectronics STM32 Processors / STM32F769I-Discovery
Embedded Coder Support Package for STMicroelectronics STM32 Processors / STM32L475VG-Discovery (B-L475E-IOT01A)
Simulink Coder Support Package for STMicroelectronics Nucleo Boards / Common

Description

The Digital Write block sets the logical state of the specified digital pin on the board.

During the external mode simulation, the block sets the value to the pin that you specify in the Pin parameter.

During simulation in all other modes, the block does nothing.

Ports

Input

expand all

The block sets this value to the digital output pin that you specify in the Pin parameter.

Parameters

expand all

Specify the digital pin.

To open the pin mapping table, click View pin map.

Make sure not to assign the same pin name to multiple blocks within your model.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

See Also