74HC595 Shift Register

Arduino Shift Register

    Advanced Shift Register

 

This project is a simple LED control using an Arduino uno, 74HC595 shift register IC.This project can be use as decorative light for decoration of rooms, night clubs and public places.
The project consist of 8 x 5 mm LED’s that is connected using an arduino board to produce a very bright colourful effects.

Materials required:

    Arduino Nano
    74HC595 shift register
    5 mm LED X 8
    Connecting wires
    5 volts supply
    A breadboard

 

74HC595 IC

74Hc595 is an 8 bit serial to parallel shift register . It is a logic gate IC with 8 output pins,its a High−Performance Silicon−Gate CMOS. The IC is an 8−bit D−type latch with three−state parallel outputs. The shift register can be able to accepts serial data and provides a serial output. The shift register also provides parallel data to the 8−bit latch. The shift register and latch have independent clock inputs.

This device also has an asynchronous reset for the shift register. The shift register can be directly interfaced with the SPI serial data port on CMOS MPUs and MCUs that is microprocessors and micro controllers.

Arduino code here



Arduino code

/*
Shift Register
Date: 23/10/2018
Author: Okolo Anthony
WWW.Hertzelectroz.com

*/

int ds_pin =11;
int stcp_pin=10;
int shcp_pin=12;

void setup() {
pinMode(ds_pin,OUTPUT);
pinMode(stcp_pin,OUTPUT);
pinMode(shcp_pin,OUTPUT);
writereg();
}
boolean registers[8];

void writereg()
{
digitalWrite(shcp_pin,LOW);
for(int i=0;i<8;i++)
{
digitalWrite(stcp_pin,LOW);
digitalWrite(ds_pin,registers[i]);
digitalWrite(stcp_pin,HIGH);
}
digitalWrite(shcp_pin,HIGH);
}

void loop() {
for(int a=0;a<9;a++)
{
registers[a]=HIGH;
delay(200);
writereg();
}
for(int j=8;j!=0;j--)
{
registers[j]=LOW;
delay(200);
writereg();
}
}

1 Response

  1. admin says:

    nice project

Leave a Reply

Your email address will not be published. Required fields are marked *