I require additional digital input pins for 5 PIR sensors. Can I use the shift register (74HC165) to read these input? And will I be able obtain real time values from all the 5 sensors?
-
Did you know you can use the Ax (A0, A1, A2, etc.) pins as digital inputs also? Or have you already used all of them?– per1234Commented Dec 15, 2017 at 6:49
-
Yes I have used all if them– 0x000005ACommented Dec 15, 2017 at 6:49
-
1Yes, a shift register will work fine if "real time" is on the milli-seconds level. Calculate the time to access the shift register input.– Mikael PatelCommented Dec 15, 2017 at 9:02
-
1If you don't care about which sensor triggered, you could use an OR-gate.– GerbenCommented Dec 15, 2017 at 14:57
Add a comment
|
1 Answer
You could use a GPIO expander (MCP23017 or similar) which could give you 14 extra pins (16-2 for I2C bus), but this is putting extra load on the microprocessor. (you haven't said which one by the way).
Or another option might be to revisit you design and see if you can split it out to multiple processors. This is effectively the same as a GPIO Expander, just using an Uno or ESP8266 as the expander.
-
-
I am using an arduino uno by the way. Sorry didn't mention it. Thank you:) Commented Dec 15, 2017 at 8:35