Introduction: #8 Simple Demo of Binary Coded Decimal (BCD) for Real Time Clocks (such As the DS3231 and DS1307)
Sometimes a little applied theory goes a long way in allowing an Arduino developer to understand the background behind the electronics.
In this short video (only interrupted by Benny, my cat) I explain how Binary Coded Decimal (aka BCD) is stored, and, more importantly, how we can easily convert the retrieved value back into its underlying value. Once you see the video you will think "Doh! So simple". Yes, really. But necessary, too.
So if you're working with BCD in any shape or form, and with a Real Time Clock module such as the DS1307 or the DS3233 in particular, this information and knowledge will help you understand how the information is retrieved and converted.
Indeed, after the video I quizzed Benny (aka The Video Interrupter) and he correctly explained how a single character (byte) was used to store a two-digit number in a manner that could easily be retrieved for use in C++ code sketches. Purrfect, I told him.
Don't worry, I don't have many 'theory' videos but on this occasion I felt compelled to share this knowledge so that a greater understanding can be had by anyone using BCD in their Arduino projects (especially with those RTC modules!).
Enjoy (and at least give Benny a thumbs up). Another video of a more practical nature coming up next (spoiler alert: all about 7-segment LED displays).
Thanks for watching! And don't forget to share and subscribe if you find these videos interesting.
We have a be nice policy.
Please be positive and constructive.