Main Content

MCAL DIO Port Pins Write

Write logical value to groups of pins or individual channels on a specified DIO port

Since R2026a

  • MCAL DIO Port Pins Write block

Libraries:
Embedded Coder Support Package for Renesas RH850 Microcontrollers / Microcontroller Abstraction Layer (MCAL) Blocks

Description

Use the MCAL DIO Port Pins Write block to write values to all channels of the specified Digital Input/Output (DIO) port or to write values to a specified group of channels within a Digital Input/Output (DIO) port, as defined in the Configuration Description File (CDF).

Before using this block, configure pin modes and DIO channels, select the Configuration Description File (CDF) in Simulink model configuration, and then integrate the block into your target-specific model for code generation and deployment. For information on configuring correct and portable Digital Input/Output (DIO) workflow using the MCAL DIO module in Simulink and AUTOSAR-based projects, see Getting Started With DIO Using MCAL.

Examples

Ports

Input

expand all

Provides the logical state for the first pin/channel as a scalar input. The numeric suffix (00 -15) for the channel reflects the value specified in the Pins parameter.

Dependencies

To enable this port, Separate input for each pin parameter must be selected.

Data Types: int8 | uint8 | uint32 | Boolean

Provides the logical state (high/low) for each pin in the group as a vector input.

Dependencies

To enable this port, Separate input for each pin parameter must be cleared.

Data Types: int8 | uint8 | uint32 | Boolean

Parameters

expand all

Specify the unique identifier for the DIO port. This links the block to a specific DIO hardware instance or configuration. Click Get dio ports to view and select from the list of port names configured in the given CDF.

Programmatic Use

Block Parameter: Port

Select this parameter to specify a group of pins or channels to write to.

Programmatic Use

Block Parameter: IndividualPinsWrite

Specify the pin or channel index (0–15) to write to. The specified value is appended as a numeric suffix to the Channel00 input port. For example, specifying 1, results in the input port name Channel01.

Programmatic Use

Block Parameter: PinNumbers

Select this parameter to add a separate input port for each specified pin/channel. When disabled, a single vector input port is used for all pins.

Programmatic Use

Block Parameter: EachPinAsInput

Select the data type of the output signal for the port values read from the specified DIO port. This parameter determines the format in which the logical states of the selected group of pins/channels are output from the block.

Dependencies

To enable the Port data type parameter, clear either the Select group of pins/channels parameter or Separate input for each pin.

Programmatic Use

Block Parameter: PortDataType

Version History

Introduced in R2026a