Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/11/09 13:02
Read: times


 
#167073 - Not a shortcut?
Responding to: ???'s previous message
Giang Ho said:
I just do a shortcut. And it works well.

It may work, but I very much doubt that it is a short-cut - from your description, it sounds rather like a "sledgehammer to crack a nut" approach...

since we use this way to set the date:

e.g. RTC_ARR[4] = 0x16; // Date = 16

Again, do you actually understand how BCD works?

In other words, do you understand why you use 0x16 to represent sixteen?

Understanding that would show you the easy way to obtain the BCD form from a "normal" number...


List of 14 messages in thread
TopicAuthorDate
Convert BCD, hex and decimal in C (DS1307 related)            01/01/70 00:00      
   Keyboard?            01/01/70 00:00      
   Another thought about that keyboard...            01/01/70 00:00      
      Re:Another thought about that keyboard...            01/01/70 00:00      
         Wrong approach?            01/01/70 00:00      
            Re: Wrong approach?            01/01/70 00:00      
               Division            01/01/70 00:00      
               Not a shortcut?            01/01/70 00:00      
                  Re: Not a shortcut?            01/01/70 00:00      
                     Basics (edited)            01/01/70 00:00      
                        addition to the above            01/01/70 00:00      
                           Look at the DS1307 datasheet            01/01/70 00:00      
   Check this            01/01/70 00:00      
      Incorrect            01/01/70 00:00      

Back to Subject List