주요 콘텐츠

MCAL DIO Port Pins Read

Read logical value from group of pins/channels on a specified port

Since R2026a

  • MCAL DIO Port Pins Read block

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

Description

Use the MCAL DIO Port Pins Read block to read the logical value of all channels of the specified Digital Input/Output (DIO) port or to read the logical value from a specified group of channels within a Digital Input/Output (DIO) port as defined in the CDF (Configuration Description File).

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

Output

expand all

Logical state for the first pin/channel of the specified DIO port. The numeric suffix (00 -15) for the channel reflects the value specified in the Pins parameter.

Dependencies

To enable this port, Separate output for each channel parameter must be selected.

Data Types: int8 | uint8 | uint32 | Boolean

Logical state (high or low) of the selected pins/channels on the specified DIO port.

Dependencies

To enable this port, Separate output for each channel parameter must be cleared.

Data Types: uint8 | uint16 | 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 read from within the selected port.

Programmatic Use

Block Parameter: IndividualPinsRead

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

Programmatic Use

Block Parameter: PinNumbers

Select this parameter to output multiple port pin values.

Programmatic Use

Block Parameter: EachPinAsOutput

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

Specify in seconds how often this block reads the pin value.

When you specify this parameter as -1, Simulink® determines the best sample time for the block based on the block context within the model.

Programmatic Use

Block Parameter: SampleTime

Version History

Introduced in R2026a