74HC595 & 74HC165 Shift Registers with Arduino

preview_player
Показать описание
Expand your Arduino with shift registers! Today I will show you how to use the 74HC595 and 74HC165 to increase your Arduino's inputs and outputs so we can flash a bunch of LEDs.

Shift registers are sequential logic circuits that can be used to convert between serial and parallel data. Really exciting stuff, right?

Well although these fundamental building blocks may not seem that thrilling, they can be really useful in expanding the number of digital outputs and inputs on Arduino and other microcontrollers.

Today we will work with two common 8-bit shift registers, the 74HC595 and 74HC165.

We will use the 74HC595 to drive eight LEDs with just a few connections. By cascading these chips we can drive a lot more LEDs. We will also use the 74HC595 to drive a 7-segment LED display.

After that we will hook up eight push buttons to a 74HC165, reading them all using just a few I/O lines on our Arduino.

And finally, we’ll put both chips together and build a really fun LED light sequencer with eight different flashing patterns.

Here is a breakdown of this extensive coverage of shift registers with the Arduino:

00:00 - Introduction
03:03- How Shift Registers Work
07:32 - More outputs with the 74HC595
15:22 - Driving a 7-Segment Display
21:49- Extra inputs with the 74HC165
29:46 - 74HC595 & 74HC165 Together
34:30 - Custom Light Sequencer

If you’d like to get the code I used to make all this magic happen just visit the DroneBot Workshop website where you'll find a full article to accompany this video.

Рекомендации по теме
Комментарии
Автор

this gentleman is so generous in giving knowledge, I wish him the best in all (health, long life, fortune, good wife, and more important to stay progressed) >>>> big hug to you from Iraq 🌹

manofmesopotamia
Автор

I just want to say that I began my electrical career as a electrical technician by starting out with tinkering with microcontrollers, namely Arduinos. I learned the basics from Drone Bot Workshop and carried the knowledge I learned from it to other fields and through these events impressed my current employer to land a job straight out of community college. Thank you so much for all you do. I will be donating to show my gratitude and appreciation :) I encourage anyone else who understands how valuable and rare it is to find material like the one DBW provides.

anthonyschroeder
Автор

You, Sir, have opened the doors to my better understanding of Arduino and bitwise logic, and I thank you sincerely. I'm 62-years-old and discovered the Arduino playground in early January of 2020, and I'm hooked (it's my new hobby). After using the 74HC595 in an early LED display project, I began to study the nuts-and-bolts of the unit, and I find this all fascinating. For those interested in the logic-level workings of the 74HC595 (or any other chips, for that matter), here are a few references that I've discovered along the way that can be used by both beginners and advanced coders alike.


For those who aren't familiar with bitwise operations and boolean algebra, don't let the big words fool you; it's as simple as yes or no, on or off, zero or one...just forget about the world of 0s and 9s, and shift into the world of 0x0 through 0xf (hex numbers), and 0b0 through 0b1 (binary numbers (all two of them)). Once I started coding with hex and binary numbers back in 1990, I never looked back. Mentally converting hex numbers into binary numbers and vice versa is simple, once you learn the trick.


I've C & Ped a copy of comments I wrote for a 74HC595 bit-shifting LED project I wrote. I'll share the code on the DroneBot Workshop as soon as I can. When I code, I comment a lot; I comment on the comments if need be.


// Forward: The 74HC595 is a SIPO (Serial In, Parallel Out) shift register used to store eight bits of serial data,
// and to produce eight bits of parallel outputs. There are two data registers inside the 74HC595:
//
// 1) the SHIFT register, used to store the serial data inputs ([shift: 1] shifted-in by the shift clock, via the data pin)
// 2) the STORAGE register, which stores the parallel output data shifted-in from the SHIFT register ([shift: 2] by the latch clock, internal).
//
// In review: the "shift clock" shifts data into the SHIFT register, and after eight bits are shifted into the
// SHIFT register, the "latch clock" shifts the data stored FROM the SHIFT register INTO the STORAGE register,
// which produces the eight bits of outputs. (lol I'm not screaming; just making a point.)
//
// The 74HC595 is mainly utilized to reduce the amount of output pins needed to use from the microcontroller board
// (the Arduino UNO board, in this case). Using three pins from the microcontroller board, the 74HC595 provides
// eight output pins in a state of either on or off at 5vDC or 0vDC (and no, you can't PWM through the 74HC595).
//
// The 74HC595 contains 8-sets of master/slave flip-flop logic circuits running on an operating voltage range of 2vDC
// to 6vDC (the logic runs at the data-input voltage level), 80μA (maximum draw), and is the coolest little gadget to
// entertain one's self with. The more I learn, the more I realize how simple this device really is. When I begin
// programming FPGAs (soon), one of my first goals is to create an operational bit shifter. I'm lovin' it!
//
// There are three states that the parallel output can be set to: ON, OFF, and high impedance. High impedance
// blocks any data shifts (and is toggled by the OE (with a bar above the OE) pin). If you want inputs/outputs
// turned off? Simply set the OE pin HIGH, otherwise, it defaults to LOW. The shift register can also be directly
// overridden and cleared by setting the SRCLR (with a bar above the SRCLR) pin LOW, otherwise, it defaults to HIGH.
//
// They do a great job of explaining the internal operations of the 74HC595 shift register in simple terms.

casemotube
Автор

Thank you! I've seen multiple videos saying "this is what a shift register does" but never showed how to actually use it

jimlthor
Автор

Bill *ALWAYS* has a way of presenting video's in a very logical way. And he presents a wide range of projects!

tubeDude
Автор

I have found the Bob Ross of Electronics. Subscribed.

nickrobitsch
Автор

You are amazing!
For me, you are the Andrew Huberman of electronics.
There is nobody out there that conveys the information needed to create your own schematics more concisely than you.

jmspaceR
Автор

Thank you for the time you give people like myself who are looking to improve their skills with Arduino projects. Your an amazing teacher and I wish you the best in all aspects of life. I love how you explain everything in a normal calm voice unlike others who speak so fast or don't explain in the detail you do. Thanks again

stevetobias
Автор

Thank you Bill!

Just what I was looking for. I was lurking around on your forum site and found this in a topic discussion.
Your forum website is great!
Keep up with the good work.

eebaker
Автор

Another incredible tutorial video. The level of detail and explanation you provide in these tutorials is amazing. Thanks so much

BryanByTheSea
Автор

Hey Bill! I needed a good tutorial for my daughter (she's learning digital electronics) and this was my go-to for shift registers. Great video and thank you for presenting this subject in such a way that it is easy to understand for complete beginners!

YippeePlopFork
Автор

I am an amateur electronics enthusiast, i'm a Noob, i will have to re-watch this a few times, great video by the way.

AXP
Автор

A video that illustrates in a great way some articles on the Net I had to read when I had to deal with shift registers for my project. I wish you had published this before : clear, informative and now, 74H* are not magic to me anymore! Great examples too!!

ricouxstephane
Автор

Fabulous video and detailed explanation. Not only explaining what shift registers are and their benefits, but also a practical example of how they can be used in the real world (or workshop). Thank you very much.

janet-txcj
Автор

Great video! Simple and straight forward. I feel I have a better grasp on these than I have ever had.

scruffymogwai
Автор

I'm from Iraq .. your videos are very excellent. And very useful. Thank you very very much.. I wish for you the best 🌹❤

atfchannel
Автор

I really don't get why this guy hasn't more subs. Your one of the best content creators on YouTube!

chrisfoot
Автор

Excellent! I needed to read the states of several pir and magnetic switch sensors while also controlling lights. Shift registers fit this problem like a glove.

ronaldronald
Автор

Thanks so much for another excellent video. I'm one of the people who asked for this subject and thrilled to see you listen to us - thanks!

johnbuckley
Автор

Purchased on Amazon and tested (Worked Great) these Jameco Valuepro 4116R-1-331LF. Bussed Resistor Network, 16 Pin, 125 mWatt, 330 Ohm, 2% Tolerance ... Great Video!!

charlesmarlin
join shbcf.ru