Hello friends, I hope you all are doing great. In today's tutorial, I am going to do an Arduino 74HC165 Interfacing and we will have a look at How to increase Input Pins of Arduino. 74HC165 is a shift register and works on the principal of Parallel In Serial Out. In my previous tutorial Arduino 74HC595 Interfacing: Increase Output Pins, we have seen How to increase the output pins of Arduino and today we are gonna do exact the opposite and we will increase the input pins.
74HC165 will take 8 parallel inputs from different sensors or buttons etc and will send them to serial OUT Pin, which will be connected to Arduino. So, if you are working on a project where you want to get data of 15 or 20 digital sensors then you can use this shift register and just using a single pin of Arduino you can read data of all those sensors. We can only get digital inputs, we can't get analog input through this shift register. So, let's get started with Arduino 74HC165 Interfacing:
Arduino 74HC165 Interfacing
I will design a Proteus Simulation of Arduino 74HC165 Interfacing, I have given the files for download at the end of this tutorial, but I would recommend you to design it so that you could learn.
I will connect simple Logic buttons with this shift register and will read their status on the Serial Port.
So, first of all design a simple Proteus Simulation as shown in below figure.
I have used Arduino UNO and have connected Virtual Terminal so that we could have a look at Serial data.
As you can see in the above figure that I have connected four pins between Arduino and 74HC165, which are:
Pin # 8 of Arduino ==> Shift (SH) of shift register.
Pin # 9 of Arduino ==> Clock Enable (CE) of shift register.
Pin # 11 of Arduino ==> Serial OUT (SO) of shift register.
Pin # 12 of Arduino ==> Clock (CLK) of shift register.
Now open you Arduino software and copy paste the below code in it:
You should also have a look at this video in which I have shown How to run these simulations:
So, that was all for today. In my coming tutorial, I will interface both 74HC165 and 74HC595 with Arduino UNO and will show you How to increase both input and output pins at the same time. Thanks for reading. Take care!!! :)
I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>