r/ArduinoProjects • u/noobsie_boi • Aug 10 '22
8 bit binary counter
Hey there! I'm new to this subreddit and I've just started to work with my Arduino UNO R3. I've created an 8bit binary counter(inspired by another fellow Arduino user).
Here's the repository link:- https://github.com/Noobsiecoder/arduino-projects/tree/main/src%2F8bit-manipulator
153
Upvotes
6
u/planeturban Aug 10 '22 edited Aug 10 '22
Jokes about 8/4 bit aside. This is a nice way to learn about port manipulation. If you were to connect your leds to A0-3 and do something like this, you'd end up with a smaller program:
It's called port manipulation if you want to read more about it.
(Disclaimer, I did this from memory so I might have mixed my registers up, but it looks ok. If someone sees an error, please correct. :) )Happy coding!
Edit: checked the code, seems to work.