Introduction: Extend the Ports of Arduino Using IC 74HC595N
Many of us face problem when try to connect more sensors and output devices in arduino. Because there is no enough ports to connect.To overcome this some may go to arduino Mega.We need not go to Arduino Mega to have extended ports.Here is a solution to extend the ports of Arduino Uno. We extend the ports of arduino using IC 74HC595N which is ashift Register for Serial in and Parallel out.This register IC takes 3 pin input and gives output at 8 Pins. Thus this extends 3 pins to 8 pins.The extended pins are used only as output port to connect output devices such as LED,LCD,Bar Graph Display,Piezo Buzzer etc.
Step 1: Components Required
- Arduino Uno
- LED --------------------- 8
- Resistor 100ohm ---- 8
- IC 74HC595N Shift Register
Step 2: Operation of IC74HC595N
How does it extends ports?
Arduino combines the data to be sent to output devices in serial format and transmit the serial data to IC 74HC595N.The IC shifts the serial data and make its available at the parallel output pins of IC 74HC595N.The serial formatting of data to various output device is done by shiftwrite function given in the coading.
10101100 these numbers represents 8 bit data.Each number in 8 bit represents the status of eight LED'S.
One(1) indicates LED is ON.
Zero(0) inducates LED is OFF.
So there are 8 LED'S connected to the output data pins of IC74HC595N.So each bit in 8 bit data has to be available at the output pins of IC74HC595N.To get the 8 bit data available at output pins.The 8 bit data has to be shifted 8 times so that each bit will be available at 8 output pins of IC74HC595N.So eight clock pulses are required to shift 8 bit.In order to get data without error the shifting has to be done in nano Seconds(ns).So high frequency clock is requied.This clock is generated by arduino code itself.The communication between electronic devices is called as Digital Communication.Arduino is also a digital device because it deals with digital data that is Zeros and Ones.So in digital communication every data has to be sent in frame format.So this 8 bit data is to be sent in frame format.This is also done by arduino code itself.So with the proper coading you can connect output devices at the parallel pins of IC74HC595N.The diagram explanation is given above.I have also attached diagram explanation in zip format.
Step 3: Schematic Diagram
The Schematic uses three arduino pin
Serial data is sent through this DataPin.
It generates clock pulse that is needed to shift data
This pin is used to toggle so that shift register shows 8 bit data on output.
Step 4: Programming
Every command of the following programme is explained Here
This function is same as digitalWrite function. It makes Pin HIGH/LOW. Usage is as same as the digitalWrite function.
This function is designed for LED array on shift register, LED starts glowing from LED 0 to LED 7 and as all gets ON these starts getting OFF from LED 7 to LED 0.
This function is similar to above mention increment() function but the difference is that in this function only one LED glows at a time. So in this function LED starts glowing from LED 0 to LED 7 and in the reverse order too.
This function makes all output pins HIGH.
This function makes all output pins LOW.
This function repeats HighAll() and LowAll() function 10 times with an interval of 100ms between two steps.
Step 5: Program Code:
I have attached Coding in RaR format Download and open it in arduino IDE
I have also attached in txt format
Because the program is slightly large.
Step 6: Video
We have a be nice policy.
Please be positive and constructive.