User Manual

162
/
223
Lesson 24 Eight LED with 74HC595
Overview
In this lesson, you will learn how to use eight large red LEDs with an MEGA2560
without needing to give up 8 output pins!
Although you could wire up eight LEDs each with a resistor to an MEGA2560 pin you
would rapidly start to run out of pins on your MEGA2560. If you don't have a lot of
stuff connected to your MEGA2560. It's OK to do so - but often times we want
buttons, sensors, servos, etc. and before you know it you've got no pins left. So,
instead of doing that, you are going to use a chip called the 74HC595 Serial to
Parallel Converter. This chip has eight outputs (perfect) and three inputs that you
use to feed data into it a bit at a time.
This chip makes it a little slower to drive the LEDs (you can only change the LEDs
about 500,000 times a second instead of 8,000,000 a second) but it's still really fast,
way faster than humans can detect, so it's worth it!
Component Required:
(1) x Elegoo Mega2560 R3
(1) x 830 tie-points breadboard
(8) x leds
(8) x 220 ohm resistors
(1) x 74hc595 IC
(14) x M-M wires (Male to Male jumper wires)
Component Introduction
74HC595 Shift Register:
The shift register is a type of chip that holds what can be thought of as eight memory
locations, each of which can either be a 1 or a 0. To set each of these values on or
off, we feed in the data using the 'Data' and 'Clock' pins of the chip.