Monday, July 8, 2019

0000 0000 0000 0011

74HC595 Shift Register


My little friend the Attiny13 can count well, and the following code will output the numbers 0..255 
for (byte mynumber = 0; mynumber < 256; mynumber++) {
    displaynumber(mynumber);
    }
The problem with the output is that if we want to display the numbers using LEDs (well, who wouldn't), then we have a pin problem as a byte is 8 bits so 8 lights are needed. The Attiny13 has only 5 pins handy.


11 was a racehorse, 22 was 12, 1111 race 1 day and 22112

I'm definitely going to do some charlieplexing for that one in a future blog, but the vault reveals a 74HC595 shift register IC which happens to be great for extending the pins available.

There are thousands of tutorials on this chip out there on the interwebs, but I used this one when constructing the circuit and stealing writing the code.





No comments:

Post a Comment