A super simple example of using an 8-bit shift register with an ATTiny85.
This program simply pushes 8 bits to a serial-in/parallel-out shift register. The output pins of the shift register are connected to LEDs. The program then makes a little dance with the LEDs, but mostly I made this just to learn how to use a shift register.
- ATTiny85
- SN74HC595 8-bit Shift Register
- Some LEDs & Resistors
NOTE: The makefile uses avr-gcc
and avrdude
to compile and upload. It also assumes you're using a usbtiny
programmer, like the Sparkfun Pocket AVR Programmer.
-
Connect your programmer
-
Compile and upload
$ make upload
- PIN 10 (SRCLR') on the shift register needs to go to VCC.
- PIN 13 (OE') on the shift register needs to go to GND.