Decimal Time Clocks In Under 1 KB

Humans historically have worked well with decimal numbering systems. This is probably due to the fact most of us have ten fingers, which make counting in base ten easy. Yet humanity seems to doggedly stick to the odd duodecimal/sexagesimal time system. [Danjovic] is bringing a bit of sanity into the mix with a decimal clock he calls DC-10. He’s entered his clock into our 1 kB Challenge.

DC-10 builds upon C10, the decimal time display system created by [KnivD] on Hackaday.io.

Here’s how it works:

  • 1 year = 365.25 days (we can’t change this anyway)
  • 1 day = 100 intervals (the equivalent of ‘hours’)
  • 1 interval = 100 centivals (equivalent of ‘minutes’)
  • 1 centival = 100 ticks (equivalent of ‘seconds’)
  • 1 tick = 0.0864 current seconds.

1kb-thumb[Danjovic’s] implantation displays intervals and centivals, exactly what you would need to know the current time of day. He used a Microchip PIC16F628 running from a 4 MHz clock. time is displayed on seven segment LEDs. The PIC is programmed in C, using the classic version of Microchip’s own IDE: MPLAB 8.92. The code uses 297 program words. Since the ‘628 uses 14-bit instructions, that equates to just under 520 bytes. Perfect for the 1 kB challenge!

If you have a cool project in mind, there is still plenty of time to enter the 1 kB Challenge! Deadline is January 5, so check it out and fire up your assemblers!

47 thoughts on “Decimal Time Clocks In Under 1 KB

      1. Ten lacks sufficient submultiples to make a really useful counting base to begin with it would likely be one of the last numbers considered if we were designing a counting system from scratch. That is probably the one of the biggest reasons decimalized time has never caught on.

          1. You will note though that while the Romans left us with a base ten counting system, it was the Babylonian system of time measurement that survived. At any rate the Romans themselves added months to their calendar to give us the twelve we now have and adopted the seven day week. Which underlines the point I was making: ten is not a very intuitive base for measuring time. That is why it has never been widely used.

          2. The Calendar of Romulus had ten months with the spring equinox as the first day and consisted of 304 days ending in December on the Winter solstice. The remaining days of the solar year not being assigned to months at all. The Calendar of Numa, a later reform added two more months to complete the full year.

      2. Lothar, lets just round Pi while we’re at it ;)
        DV82XL: I absolutely agree, I think that’s also why it’s been tough to get rid of imperial / fractional measurements. It’s so much easier to visually estimate a half, a half of half, etc… than it is to think about splitting something into tenths.

        1. The USA. Myanmar and Nigeria are the only countries in the world that still use derivatives of the imperial system; even the Brits have abandoned it. It’s not a testament to its ease of use, as much as one of your stubbornness.

          If you had been raised and trained your whole life with the metric system, you would find the fractions way harder to grasp than a decimal number. I, for one, can’t tell right away if 5/8 is greater or less than 21/32, I have to think about it. But hey, if you really want to lead a complicated life, be my guest.

          However, I defy you to find a reasonable way to explain why there are 12 inches in a foot, 3 feet in a yard, 220 yards in a furlong, 16 ounces in a pound, but 14 pounds in a stone, and why you have short tons and long tons.

          This system is utterly archaic and should be shot on sight.

          1. That is rubbish. I grew up with the imperial system, lived through the conversion to metric, and worked in an industry that used measurements based on American measurements (aviation) – I’m comfortable in all these systems. Furthermore during my forty years in the sector I saw many, many kids hired that knew nothing but metric adapt without much of a problem. It just wasn’t an issue.

          2. you would find the fractions way harder to grasp than a decimal number. I, for one, can’t tell right away if 5/8 is greater or less than 21/32

            5/8=10/16=20/32

            Or, 5/8=.625 and
            21/32=.65625

            Just means the majority of educated citizens of the United States are better at fractions than most of the rest of the world. :P

          3. Oh don’t get me started on weights and volumes… I’ve worked in and on 120 year old theaters and equipment, and brand new spaces in Europe and Asia, so I’ve become accustomed to working, thinking, and designing in both. Took some getting used to, but I’d hardly call it a complicated life.
            Is it stubborn and maybe a bit nationalist? Yeah – but there’s a tremendous infrastructure built around it, and it’s probably not going anywhere, at least in the architectural world.
            At least we don’t use it for things like space vehicles (any more!)

          1. It’s an English forum – the authority of L’ Académie does not run here. The phrase is used as such by Anglophones and I respect that – just like I bite my tongue when they butcher the pronunciation of terms like ‘trompe-l’œil’ and resist the urge to correct them.

  1. We really do need to work on slowing down or speeding up the earth’s rotation to fix the 365.25 problem. Is it better to speed up or slow down? 100? Or would people accept 300 days? Seems kind of a waste of effort not to make things true powers of 10.
    Would we need to change the orbit too to make it more practical? if so, it’ll take a bit of work to keep everyone from boiling or freezing but it would make for a good Hackaday.io project.
    Oh and if you can tune things and keep things tweeked to solve the leap day/second thing, that would be a great bonus!

    1. You joke but why are hours in 12/24’s and minutes in 60’s exactly in your mind? Why do we have to be married to that? If I look at Wikipedia it seems all pretty arbitrary based on silly things.and yet in many cultures they used 12/24 divisions.
      It would make sense to have some sort of logic to base a defense on ancient systems on rather than just random dedication to pointless snarkiness.

        1. I don’t see what’s so great about that when used in the context of time.
          100 is just as usable divisible, in fact it’s more easily used since it is decimal IMHO. Think about it, what do we divide an hour in and why? We divide it in 2 or 4 mostly, which you can do with 100, and maybe in ten minutes, but using decimal we’d just use 10 or 15 units for that.
          The one issue is that science uses seconds as a base, so using decimal time would be a pain in the ass when doing any kind of science since you would need to use a whole new base system or do constant conversions, with the inevitable rounding errors.

          1. Protagoras of Abdera (c. 490 – c.420 BCE) is most famous for his claim that “Of all things the measure is Man,” which in the context of metrology is a statement of the fact that units of measurements are a tool that supposed to serve the user in a practical way, not reflect some silly anal-retentive esthetic. Arguments centered around the ease of computation have long been superceded by the availability of ubiquitous calculating devices and thus units of measurement can be selected based on the utility of scale and convenience for the application at hand and little concern for anything else.

          2. “I don’t see what’s so great about that when used in the context of time.”

            Seriously? Think about all the things you split up into thirds. Hell, most people’s *days* are split roughly into thirds, with work, home, and sleep, each 8 hours. Splitting 100 into thirds sucks. “Dave, you get to work from 33.3 to 66.6”. Geh.

            The only argument for base 10 being useful is that people have 10 fingers, and considering most people stop counting on their fingers in grade school, that’s a pretty poor reason.

  2. I’d like to enter.

    I wrote the world’s biggest text adventure in basic… About 256 Bytes…

    10 Print “You are in a vast wide open plane, North, South, East or West?”
    20 Input A$
    30 CLS
    40 Goto 10

    My cousin played it for four hours before giving up

        1. 10 Print “You are in a vast wide open plane, North, South, East or West?”
          20 Input A$
          24 Print “Procedurally generating your destination… Please wait.”
          25 For A=0 to 5000
          26 Next A;
          30 CLS
          40 Goto 10

          “Algorythmically generated text dungeon” — Done!

  3. Pff, I could make a good clock with just TTL. Use a transformer and rectifier to get 5 V pulses at 60 Hz, then divide that to make a pulse every second. I have most of the rest on a breadboard, just kicking around.

    1. We’ve seen dozens of mains-powered and mains-clocked digital, discrete, or vacuum-tube-based clocks here before.

      The interesting part, then, isn’t dividing the 5,184,000 60Hz AC cycles per day to hours, minutes, and seconds, but rather: How do you divide 5184000 by one million to get the decimal time that this project wants? Without a microcontroller, of course. That’d be too easy.

  4. I think I would be tempted to use 200 intervals for a day to separate might and day. But would that just be silly adherence to the old? Maybe a division into the period of what we now call 8 working hours and the rest would be an idea so you would get 300 units in a day, but then how about lunch? Lunch would break the clean division (for jobs that give a lunch break).

Leave a Reply to DainBramageCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.