Arduino Playground is read-only starting December 31st, 2018. For more info please look at this Forum Post

ShiftRegister Library for Arduino
Author:  Alexander Brevig
Contact: alexanderbrevig@gmail.com


Navigation


Current version

1.0 2009-04-13: Initial Release


History

1.0 2009-04-13: Initial Release


Description

ShiftRegister is an interface for ShiftRegisters on the Arduino.

It is created to help Hardware Abstraction, and readability of code. It declres the functionalities a ShiftRegister has to provide for complete abstraction of the bit shifting.

ShiftRegister library is part of the Hardware Abstraction libraries.


Download, install and import

Download here: Attach:ShiftRegister.zip


Creation

You do not create instances of an interface.


Functions

These functions will need to be overridden in a ShiftRegister library

virtual void buffer(byte out)=0;

Provide a way to buffer a byte, prepare it to get shifted.

virtual void write()=0;

Provide a way to write the contents of the current buffer to the ShiftRegister

virtual void write(byte out)=0;

Provide a way to write the byte 'out' to the ShiftRegister


Example

See an example implementation for the 595 ShiftRegister.


FAQ

//Contact me if you have any questions, I will answer ASAP. (I'll post an answer here as well.)


Information about this page

Part of AlphaBeta Libraries.
Last Modified: May 09, 2009, at 05:14 AM
By: AlphaBeta