This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Digital Write

Set logical state of digital output pin

  • Library:
  • Simulink Coder Support Package for BBC micro:bit/Basic

    Simulink Coder Support Package for STMicroelectronics Nucleo Boards/ Common

    Simulink Coder Support Package for STMicroelectronics Discovery Boards/ STM32F746G-Discovery

    Simulink Coder Support Package for STMicroelectronics Discovery Boards/ STM32F769I-Discovery

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 number to multiple blocks within your model.

See Also