Write the HC595, use 2 pulses - first loads the data into the output shift registers. You could combine a 74HC595 and 74HC165, use 4 pins on each, with SPI.transfer() to write & read the data very quickly. So, having 8 inputs does not really get the job done. The mechanical button press lasts quite a while. Bring all Rows high, and quickly scan the buttons to see which one is closed. When any button is pressed, a low PCINT is created. Hold all rows low, have pullup resistors on the column inputs (can be the internal resistor). This can be automated by having PCINT for each column pin. The row is returned high, the next row is turned low, and the process is repeated. If a column reads low, the intersecting button is the one that was pressed. One row is driven low - the columns are read one at a time. The 4 rows are driven high from output pins, the 4 columns are on 4 input pins. The way a multiplexed keypad works is like this usually: I am setting up digital inputs and outputs on my system, and I want to make sure that I have enough current to drive the correct digital level.How do I know whether to use the sinking or sourcing digital I/O? Can my data acquisition (DAQ) device that. I found this resource knowledge.ni.com Sinking and Sourcing with NI DAQ C Series Hardware - NI how does that work ? how do you source current from an input pin ? So i was wondering if there was some other possibility - reading from the above, that the '165 can sink or source current. That would then defeat the purpose of saving on pins ! Would that mean i'd have to supply the 5V through 4 different Arduino output pins, which would be "multiplexed(?)" along with the check of each row (to the top half of the '165) ? The first thing that hit me was - one side of the '165 is always going to read "high" ! I saw a picture that 'injected' the 5V into the keypad wiring and thought i'd try to work along those lines, i got this Sketching out the circuit, i realised - where does the current come in ?! I initally imagined i'd connect the 8 pins of the keypad to the 8 inputs of the '165 and then simply read the 2 pins (or '165 register) that read '1' and would then be able to pinpoint which key was pressed. Most of the threads or circuits using the 4x4 keypad uses 8 Arduino pins which i thought was rather wasteful but perhaps an essential work-through to understand how it works, there were a few setups using resistor ladders so that one only needs a single analog pin but i thought i'd try and use the SPI bus using a shift register. OKAY, this post is getting long - will post the continuation in the next one. 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 ? Is the contributor mistaken in calling "CE" clock enable, and so the code might actually be erroneous ? I'd also seen this tutorial on the Arduino Playground Arduino Playground - ShiftRegSN74HC165N 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.Īm i correct to assume that I CC 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. While from the 74LS165A which is what i actually have ICC | VCC = MAX, See Note 4 | 18 (typical) 30 (maximum) | mAįor completion sake NOTE 4. Reading the datasheet of the 74HC165 - i can get Continuous current through VCC or GND ±50 mA I'd been following Nick Gammon's tutorial Gammon Forum : Electronics : Microprocessors : Using a 74HC165 input shift register 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. Out the '595 pins and down to GND = sinking. Through Vcc and out the '595 pins = sourcing, while = SOURCE ?Īm i correct in understanding that current through Vcc is sinking, and through GND would be sourcing (with respect to the chip itself) ? Or 150ma sink ("current out of Vss pin")īut with this while the SN74HC595 allowsħ0ma ("continuous current through Vcc = SINK ? 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 :Ī total 125ma current source ("current into Vdd pin") 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.įirst some "housekeeping" (or dust-clearing?) if i may - regarding the chip itself and reading datasheets Probably not a "project" rather than an "is this possible exercise".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |