shiftRegister
Connection to shift register on Arduino hardware
Add-On Required: This feature requires the MATLAB Support Package for Arduino Hardware add-on.
Description
A shiftRegister
object represents a connection to a shift
register on Arduino® hardware. The 74HC165, 74HC595, and 74HC164 type shift registers are supported.
Attach a shift register to the appropriate pins on the Arduino hardware. Create a shiftRegister
object using the
shiftRegister
function. You can read from and write to the shift
register in MATLAB® using the object functions. Manipulate peripheral devices attached to the shift
register, such as LEDs.
Note
MATLAB Support Package for Arduino Hardware does not support read
function for 74HC595 shift
register.
Creation
Syntax
Description
creates a connection to the register
= shiftRegister(a
,'74hc165',dataPin
,clockPin
,loadPin
,clockEnablePin
)74hc165
shift register connected to your
Arduino board using the Arduino object a
, dataPin
to input or output
data, clockPin
to signal read or write, loadPin
to
load parallel input data, and clockEnablePin
to enable or disable
clock.
Input Arguments
Properties
Object Functions
Use these object functions to read from and write to your shift register.
Examples
Version History
Introduced in R2016b