Main Content

I decided I wanted to play with shift registers, and the classic circuit for that is running a bunch more LED’s from a chip than the chip has pins, so I decided on an 8 pin ATtiny85 running 16 LED’s as a Larson scanner (Knight Rider or Cylon effect).

I started out on breadboard which was a terrible mistake as I ended up needing two breadboards to provide enough space to run 16 LED’s via resistors all with a shared GND. Should have gone straight to perfboard (I think veroboard would have the same problem as breadboard due to solid tracks instead of pads).

The shiftOut() function takes a bit of getting used to, especially when using two 74HC595 shift registers so need to output 16 bits instead of an 8-bit byte (and when it takes an hour of playing with code to realise one of the chip’s output pins it busted!) and for some reason when moving from breadboard to perfboard I had to change the code to use MSBFIRST instead of LSBFIRST or it would run the LED sequence on each chip instead of across the two…..?!”

Link to article