probably not a "project" rather than an "is this possible exercise".
i've used the 74HC595 and decided to "try the other side" - i saw a 4x4 keypad with 8 pins (4x4 matrix) and thought, let's rig that up to a '165 - now realising it's not exactly the same as 8 switches.
first some "housekeeping" (or dust-clearing?) if i may - regarding the chip itself and reading datasheets;
Q-0.1
i'd previously got a good reply Shift Registers vs i2c - #11 by Chagrin - General Electronics - Arduino Forum re reading datasheets for current but would appreciate a bit more clarification with the following :
this one is clear;
the MCP23008 allows
a total 125ma current [color=blue][b]source[/b][/color] ("current [u]into [/u]Vdd pin")
or 150ma [b][color=blue]sink [/color][/b]("current [u]out [/u]of Vss pin")
but with this;
while the SN74HC595 allows
70ma ("continuous current [u]through [/u]Vcc = [color=blue]SINK [/color]?
or GND"). = [color=blue]SOURCE [/color]??
am i correct in understanding that current through Vcc is sinking, and through GND would be sourcing (with respect to the chip itself) ?
or wait... :-/
through Vcc and out the '595 pins = sourcing, while
out the '595 pins and down to GND = sinking... i think that makes more sense...
Q-0.2
i'd been following Nick Gammon's tutorial http://www.gammon.com.au/forum/?id=11979 and i think i can say that if the '595 is sourcing current, driving LEDs, for example; then the '165 is sinking current - reading inputs, ie. switches connecting to 5V.
reading the datasheet of the 74HC165 - i can get;
Continuous current through VCC or GND ±50 mA
clear enough - but more on that later.
while from the 74LS165A which is what i actually have;
ICC | VCC = MAX, See Note 4 | 18 (typical) 30 (maximum) | mA
For completion sake; NOTE 4. With the outputs open, CLK INH and CLK at 4.5 V, and a clock pulse applied to SH/LD, ICC is measured first with the parallel inputs at 4.5 V, then with the parallel inputs grounded.
am i correct to assume that ICC stands for continous current and is therefore the corresponding spec to be compared with the 74HC165 above - meaning the "LS" is not as robust as the "HC" and one must be more careful in giving it current.
Q-0.3
i'd also seen this tutorial on the Arduino Playground Arduino Playground - ShiftRegSN74HC165N
is the contributor mistaken in calling "CE" clock enable, and so the code might actually be erroneous ?
Nick's code doesn't use the chip enable so i was wondering if this Playground code has "something extra" - unnecessary or different code methodology ?
OKAY, this post is getting long - will post the continuation in the next one....
