PWM Write

Send pulse width modulation (OWM) signal configuration to PWM Interface block

  • Library:
  • SoC Blockset / Processor I/O

  • Block icon for PWM Write

Description

The PWM Write block sets the duty cycle for a PWM peripheral. In simulation, the block passes through the duty cycle input to drive the PWM Interface block that simulates the PWM switching signals produced by the hardware. When deployed to hardware, the PWM Write block writes to the appropriate PWM drivers on the hardware.

Ports

Input

expand all

Specify the duty cycle value of the PWM waveform. This input must be a numeric scalar from 0 to 1.

Data Types: single | double

Output

expand all

This message port sends duty cycle values as messages to a connected PWM Interface block. For more information on messages, see Messages.

Note

This output is used only during simulation and is ignored in code generation and external mode simulation.

Data Types: SoCData

Introduced in R2020b