Main Content
DIP Switch
Read the state of a DIP switch
Add-On Required: This feature requires the Simulink Coder Support Package for NXP FRDM-KL25Z Board add-on.
Library
Simulink Coder Support Package for NXP FRDM-KL25Z Board/ FRDM-TFC Shield
Description
Read the four individual switch statuses. Each block output emits 0 when the corresponding switch state is Off and emits 1 when the switch state is On.
During simulations without the hardware, this block emits zeroes.
Parameters
- Sample time
Specify how often this block reads the dip switch states.