Powered by Blogger.

Thursday, 11 September 2014

Arduino Program to Demonstrate the Working of Cascade Operation of 74595

by realfinetime  |  in Electronics at  02:26

Previous:  Circuit for Cascade Operation of Two 74595

          We have already designed the circuit for cascade operation of 74HC595/74HCT595 using arduino. Now, upload the following program to your arduino board.

int latchPin = 11;  //Pin connected to ST_CP of 1st 74595
int clockPin = 12;  //Pin connected to SH_CP of 1st 74595
int dataPin = 13;   //Pin connected to DS of 1st 74595

void setup() {
  //set pins to output so you can control the shift register
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);

void loop() {
    // take the latchPin low so the LEDs don't change while you're sending in bits:     
    digitalWrite(latchPin, LOW);
    //Send 1 1 1 1 1 1 1 1 (255) to Q7 Q6 Q5 Q4 Q3 Q2 Q1 Q0 of 2nd 74595
    shiftOut(dataPin, clockPin, MSBFIRST, 255);  
    //Send 0 0 0 0 0 0 1 1 (3) to Q7 Q6 Q5 Q4 Q3 Q2 Q1 Q0 of 1st 74595
    shiftOut(dataPin, clockPin, MSBFIRST, 3);
    // shift out the bits:    
    digitalWrite(latchPin, HIGH);

Output of the above program is shown below.

          LEDs connected to the, Q0 and Q1 pins of 1st 74595 turn on. Similarly, all the LEDs connected to the 2nd 74595 turn on. Arduino shift out decimal number 255 first. 255 will be stored in first 74595. After that, arduino will shiftout decimal number 3. During the second shift out (when 3 is shifted out), 255 will be shifted from first 74595 to second 74595 and 3 will be stored in first 74595. Second 74595 will store 255. As a result we will get the output as shown in diagram.

Next:  Second Program For Cascade Operation of 74595



All the circuits, published in this blog is only after testing and getting proper results in my private lab. When you try these circuits, you should check the supply voltage, polarity of components, presence of childrens nearby and shorts in the circuits. This website will not be responsible for any harm happened to you or your components caused by your carelessness.

For More Electronic Tips

Blog Archive

Proudly Powered by Blogger.