Summary of How to use a 74HC595 Shift Register with a AVR ATtiny13
This instructable explains using a 74HC595 8-bit serial-to-parallel shift register with an AVR ATtiny13 to drive LEDs. It covers required parts, describes how serial data is clocked into the shift register, and explains the latch feature that transfers shifted data to outputs so new data can be loaded without flicker. Links to further tutorials and the 74HC595 datasheet are provided.
Parts used in the 74HC595 with ATtiny13 Project:
- Breadboard
- 5V power source (eg. 7805 regulator)
- ATtiny13 microcontroller
- Programmer (eg. AVRISP mkII with AVRStudio/WinAVR)
- 74HC595 shift register
- 100uF capacitor
- 0.1uF capacitor
- 10K resistor
- 8 LEDs
- 8 470 ohm resistors
- Hookup wires (~15)
Intro:
How to use a 74HC595 Shift Register with a AVR ATtiny13
If you have been playing with microcontrollers and electronics then you have likely seen LED dot matrix displays and other projects that use shift registers like 7-segment displays and more. This instructable goes over a quick intro to the 74HC595 8-Bit Serail to Parallel Shift Register with Latch and how to interface it to an AVR ATtiny13 to flash some LEDs.
What you need:
1 – Breadboard
1 – Power Source – 7805 or some other 5v source
1 – ATtiny13 and a way to program it ( I’m using the AVRISP mkII with AVRStudio 4.17 w/ WinAVR)
1 – 74HC595 Shift Register
1 – 100uF cap
1 – 0.1uF cap
1 – 10K resistor
8 – LEDs
8 – 470ohm resistors
~15 – hookup wires
What is a Shift Register?
Serial to Parallel Shift Registers are ICs that allow “serial” data to be clocked in on 1 pin and stack up in a register which is output on 8 parallel pins (in the case of a 8-bit shift register). As data is clocked in, it shifts all the other bits over one position with the end one falling off. Common shift registers are 74HC164 and 74HC595.
There’s a couple of good online tutorials about these with animations.
www.eelab.usyd.edu.au/digital_tutorial/part2/register01.html
The 595 has another feature which is cool. It’s called a latch. It allows the outputs to show the current bits which have been latched in the Latch Register while new data is shifted into the Shift Register. Then toggle the latch pin and the new data is copied into the Latch Register.
Here’s a link to the 74HC595 Datasheet:
www.onsemi.com/pub_link/Collateral/MC74HC595A-D.PDF
Check Out a Youtube Video of the Circuit in Action
Step 1:
Get Familiar with the 595
The 74HC595 is a pretty cool little package. We are going to hook it up to shift in a pattern of leds
The pin out goes like this:
Pin 1 – Output B – source for LED (+)
Pin 2 – Output C – source for LED (+)
Pin 3 – Output D – source for LED (+)
Pin 4 – Output E – source for LED (+)
Pin 5 – Output F – source for LED (+)
Pin 6 – Output G – source for LED (+)
Pin 7 – Output H – source for LED (+)
For more detail: How to use a 74HC595 Shift Register with a AVR ATtiny13
- What is the role of the 74HC595 in this project?
The 74HC595 is an 8-bit serial-to-parallel shift register used to clock serial data into a shift register and present it on eight parallel outputs to drive LEDs. - How does the latch feature of the 74HC595 work?
The latch allows the current bits in the shift register to be copied into the latch register so outputs show stable data while new data is shifted in, then toggling the latch updates outputs. - What microcontroller is used to drive the 74HC595 in the article?
The ATtiny13 microcontroller is used to interface with and drive the 74HC595. - What programming hardware and software are mentioned for the ATtiny13?
The AVRISP mkII programmer with AVRStudio 4.17 and WinAVR is mentioned for programming the ATtiny13. - What power supply is recommended for the circuit?
A 5V power source such as a 7805 regulator is recommended. - How many LEDs and resistors are used in the example?
The example uses eight LEDs each with a 470 ohm resistor. - Which capacitors are included in the parts list and why are they present?
The parts list includes a 100uF capacitor and a 0.1uF capacitor, typically used for power supply decoupling and stability for the 5V regulator and IC. - Can multiple tutorials and datasheets be referenced for more detail?
Yes, the article links to online tutorials and the 74HC595 datasheet for more detail.
