DIP Switch

Connect signals attached to DIP switches on hardware board

  • Library:
  • SoC Blockset / Hardware Logic I/O

Description

The DIP Switch block controls the hardware logic. The hardware logic signals connected to a DIP Switch block are equivalent to the signals connected to the Dual Inline Package (DIP) switches on the hardware board.

Note

Intel® hardware boards operate with active low signals. When you select an Intel hardware board, the DIP Switch block accepts or outputs active low inputs and it represents the port names prefixed with letter "n". For example, nDS1.

Ports

Input

expand all

Input signal to control the hardware logic. Using this port, you can dynamically control the hardware logic during simulation at run time. There is a port for each DIP switch, named DSIn1 to DSInx, where x is Number of DIP switches.

Note

When you select an Intel hardware board, you must provide inputs in active low mode.

Dependencies

To enable this port, set the Specify DIP switches via parameter to InputPort.

Data Types: Boolean

Output

expand all

Output signal that returns the state of the switch. There is a port for each DIP switch, named DS1to DSx, where x is Number of DIP switches.

Data Types: Boolean

Parameters

expand all

This parameter is read-only. To choose a hardware board and configure board parameters, see Hardware Implementation Pane.

To view a diagram with the location of the DIP switches on the selected hardware board, click the View DIP switches location button.

To control the hardware logic by using the block parameters, select Dialog. To control the hardware logic from the input port, select InputPort.

To specify the required number of DIP switch ports, select a value from the Number of DIP switches list. n represents the number of available DIP switches on the specified hardware board.

For example, if you select 3 from the list, the block shows three DIP switch ports.

DIP switches

To enable the nth DIP switch port, select On for the DSn parameter. n represents the number of available DIP switches on the specified hardware board.

Dependencies

To enable this parameter, set the Specify DIP switches via parameter to Dialog.

Specify the time interval a DIP switch toggles between On and Off.

Extended Capabilities

Fixed-Point Conversion
Convert floating-point algorithms to fixed point using Fixed-Point Designer™.

See Also

|

Introduced in R2019a