Arduino Tutorial #3 - Shift Registers (74HC595)

preview_player
Показать описание
If you're curious about some of my ventures since the start of the channel, I've recently launched a newsletter with my thoughts on technology, business, entrepreneurship and more. You can check it out for free and subscribe if you're interested on my personal website:

Contribute:

In the third Arduino Tutorial I discuss one of the many ways that you can expand your outputs on the Arduino. In this case, by using a shift register, I am able to use three Arduino pins to control 8 LEDs.

Search Terms & Keywords:
Getting Started Arduino
Beginner Arduino Tutorial
Arduino
Arduino Tutorial
Arduino Getting Started
Basic Arduino
Arduino Class
Arduino Hardware
Arduino Software
Arduino Code
Arduino Example
Arduino Project
Arduino How To
Arduino LED
Arduino Push Button
Push Button
Light Emitting Diaode
Atmega
Atmega328
Tutorial
Basic Hardware
Electronics
Electrical Engineering
Electronic Circuit
Simple Arduino Projects
Pulse Width Modulation
PWM
Analog Sensor
Temperature Sensor
Temperature Reading
RGB LED
PWM Output
PWM Tutorial
PWM explained
PWM guide
Shift Registers
Shift Register Tutorial
Рекомендации по теме
Комментарии
Автор

Am I the only one that got really bothered for a really long time when he wrote (STCP_pin_HIGH)

wobblebot
Автор

12:00 with 180 ohm current limiting resistors on the LEDs, you are pulling around 28mA per output which far exceeds the maximum chip current allotment for the 74HC595 which is 70mA according to the datasheet.

Enigma
Автор

the STCP_pin and SHCP_pin in the code has to be reversed in order to make it work, but overall its a nice tutorial !

khawthongxiang
Автор

Declaring your I/O pins as int is a bad habit. You're declaring them as variables, which they aren't, but as variables they consume RAM. It's better to write

#define STCP_pin 9

stevenvanhulle
Автор

Hey I think you messed up SHCP and STCP. maybe your cables are switched.
but you have to pull storage LOW outside the loop and the clock LOW and HIGH inside the loop for every bit. 

Park
Автор

There's something wrong with your code in the video. You switched the SHCP_pin to STCP_pin in the writereg() function. And in the second for loop in the void loop sub, you wrote i++ instead of i--

iconbylvergara
Автор

Your code is buggy. Array is a zero based index and that's why your LED0 was not turning off. Moreover, you have written at location beyond the allocated memory space for the register array.

SatyajitRoy
Автор

only 5 of my LED's are working all at different brightnesses. Also they are not oscillating? could you give me any advice as to why. Thanks

alexdempster
Автор

my shift register almost set on fire -_- do not run the code befor the the vid is finished

beastbomber
Автор

i>0  is wrong      i never goes to 0 this way

siusiutoe
Автор

Cool. But have a question.

when I saw this and before I got to the fritz in schematic I was wondering where will the power come from to light the LEDs. I didn't thing a single pin could provide enough power to run 8 LEDs at once. Using a 2.2v forward voltage avg for LEDs that's 16+volts of drop.

anonymousreally
Автор

I have wondered what working with an arduino was like and your videos have shown me that is actually quite simple (programming wise) I am probably going to have to learn more about the different ICs etc though but thanks a lot.

TizzyT
Автор

the wrong is in last line . for(int i = 8; i>0; i--) not i++

transformerkv
Автор

Thank you. My own teacher explained this poorly. As a beginner I want to know exactly what is happening. You're a life saver.

kitcat
Автор

can you pls make a vid on ULN2803... great vid

narayans
Автор

Thanks for the detailed video.

I'd like to point out a couple of mistakes in it so that you can notify your viewers, the second for in the loop method has a ++ iterator when i think it was meant to be -- since you're iterating down from 8 to 0.

Another problem is that the resistors on the graphical diagram you drew do not match your actual setup, by this i mean that in the diagram the resistors were placed between the output and the + of the leds while in the actual setup you have the resistors between the - of the led and grnd.

pjnx
Автор

In the schematic the resistors are in between the chip and the (+) side of the LED. But in the actual circuit the resistors sit in between the ground and (-) side of the LED.

Metralon
Автор

the first three LEDs connected to Q0 Q1 and Q2 are not lighting up for me even though everything is connected as in the diagram, can anyone explain why?

christophergomez
Автор

Nice tutorial. Your schematic shows the resisters on the anode, but your implementation has it on the cathode

SamReidland
Автор

is the 74HC595 the same as the 74HC595N. Im a noob in ICs.

BenMDepew