シフト レジスタ
シフト レジスタは、Arduino ボードに入力または出力をさらに追加するために使用します。シリアルイン/パラレルアウト シフト レジスタを使用して複数の出力を制御するか、パラレルイン/シリアルアウト シフト レジスタを使用して Arduino ボード上の 1 つのピンによって複数の入力を収集できます。たとえば、Arduino ボード上の単一のピンを使用して複数の LED ライトを制御できます。シフト レジスタ関数を使用してシリアル データの読み取りまたは書き込みを行うことができます。次のシフト レジスタがサポートされます。
メモ
MATLAB® Support Package for Arduino Hardware は、74HC595 シフト レジスタ用の read
関数をサポートしていません。
シフト レジスタ関数を使用する前に、arduino
を使用して Arduino オブジェクトを作成します。詳細については、Connect to Arduino Hardwareを参照してください。
関数
shiftRegister | Connection to shift register on Arduino hardware |
read | Read data from shift register |
write | Write data to shift register |
reset | Clear all outputs of shift register |
トピック
- Push Button Control with 74HC165 Shift Register
This example shows how to use the MATLAB® Support Package for Arduino® Hardware to collect large number of push button states with a 74HC165 8-bit parallel-in-serial-out shift register. This example uses four push buttons.
- Control 7-Segment Display with 74HC595 Shift Register
This example shows how to use the MATLAB® Support Package for Arduino® Hardware to control a 1-Digit 7-Segment display with a 74HC595 8-bit serial-in-parallel-out shift register.
- Control LEDs with 74HC595 Shift Register
This example shows how to use the MATLAB® Support Package for Arduino® Hardware to control multiple LEDs with two 74HC595 8-bit serial-in-parallel-out shift registers.