Tuesday, April 26, 2011

Learning Shift Registers (Latches)

If you need to minimize the use of the pins of your IC, you need to use additional controllers that help out in specific situations.
The 74HC595N is a Shift Register, also known as latch, and it can provide 8 different outputs needing only 3 input pins (it is also possible to daisy chain several Shift Registers to increase the number of outputs). This is done by converting serial inputs for parallel outputs.

Basically you need to fill up a buffer to release all the outputs at the same time.

This CodeProject article is very straightforward in teaching how to use it and you'll be able to do it in minutes.

Here's the final result running 'Example 2 - Single Shift Register - LED Sweep':

This is a basic usage of the 74HC595N Shift Register, and there are a number of possible situations that this could come in handy.

P.S. Only later have I realized that I forgot to connect the Vcc and GND pins of the Shift Register to the Arduino. Even still some dim lights emanate from the LEDs :P

No comments:

Post a Comment