: register = shiftRegister (ar, shifttype, dataPin, clockPin ...)
: register = shiftRegister (ar,'74hc164', dataPin, clockPin, resetPin)
: register = shiftRegister (ar,'74hc165', dataPin, clockPin, loadPin, clockEnablePin)
: register = shiftRegister(ar,'74hc595', dataPin, clockPin, latchPin , resetPin)

Create shift register of a given type, controlled by the input pins.

Inputs

Common function parameter definition:

ar - connected arduino object.

shifttype - string name of the shift register type.

dataPin - pin used for data in/out of the device.

clockPin - pin used for clocking data on the shiftRegister.

Other variables are dependent on the shift register type:

’74hc164’

Additional inputs:

resetPin - optional pin for resetting the shift register.

’74hc165’

Additional inputs:

loadPin - load pin to the shift register. clockEnablePin - clock enable pin.

’74hc595’

Additional inputs:

latchPin - latching data to the shift register. resetPin - optional pin for resetting the shift register.

Outputs

register - register object

Properties

The shiftRegister object has the following public properties:

parent

The parent (arduino) for this device

pins

pins used by this object

model

model set for object

See also: arduino.

Package: arduino