Friday, February 28, 2020

All 6 digits wired up

I finally got all 6 digits wired up.  I connected them with wire-wrap.  I just got some new colors in the mail today, so I made each 74HC595 a different color.
I spent a couple hours troubleshooting the code and figuring out how to add, subtract, multiply, and logical shift <<  >>  a byte in binary, so that the digits read from the RTC could be output to the shift registers.  I'm sure there is an easier way, but I ended up converting the time from an integer to a character, then splitting the number into each digit, then using a lookup table to select the correct binary code for each number.  Then I put it in a variable, << 4, then added the second digit. I ended up with something like this 0b11110101.  Then I shifted that out to the 74HC595 with a function.






No comments:

Post a Comment