#8 Simple Demo of Binary Coded Decimal (BCD) for Real Time Clocks (such as the DS3231 and DS1307)

preview_player
Показать описание
A very quick explanation of Binary Coded Decimal (BCD) as used in the Real Time Clock modules DS3231 and DS1307 often used in Arduino projects.

Also a 60-second trick to convert any decimal number to binary.

You don't have to know this to work with those clock modules but it can help you understand what's going on in some of the C++ code.

It's painless and easy once you understand the concept.

And my channel is here:
How can I remember this? Memory tip: "See" Ralph Bacon, geddit?
Рекомендации по теме
Комментарии
Автор

Hi, as I am old enough to see through the mist of time, my opinion is that the reason BCD rather than integers are being "stored" is that a most of the programming was previously done in assembly language or at best FORTRAN. So hardware and software were very closely connected i.e. you had to be aware on how the information was moved and used by the processors registers to program the device. This is still the case if you are "interfacing" a generic hardware chip to a specific microcontroller without the advantage of higher level languages, like C++ or Python, which have "libraries" that isolate you from need to deal with data on a bit level. This is meant as adding content as your post is very good as an example of using the bit level value of a register to drive hardware outputs. Thank you for the effort. Bye

duncanmarks
Автор

hi only just watched your video going through them all.
a type of digit has been lost in the mists of time but has been resurrected in the RTC and I'm sure a few others it's called the nibble and is 1 hex digit, as if we have an integer(2 bytes) less than 255 it can be converted into a byte saving space and if you only have an on stored as 1 or off stored as 0 so you can reduce it to a bit saving a lot of space the space saver that has been lost is converting to the nibble (one hex digit) if the number to be store is between 0 and 15 decimal or 0 and f hex, you will still find them used in simple password encryption programs.
kendrick

kendrickapps
Автор

Thanks for such an excellent explanation - it makes all sense.now :-)

RobotmakerEu
Автор

Cats can sense work. Whenever there are pieces of paper on the table my cat tries its best to get up and sit on it.

seamonkeysy
Автор

Is writing on big pieces of paper with a permanent marker as a lecture just a really common thing in the UK or what? It seems like everyone on the Computerphile channel seems to do it too. It does make the lesson very clear I must say, it's just a little unusual to me as someone grown up in the US. Everyone here seems to just use dry erase boards or a ballpoint pen instead.

RoyNBarlow