element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
CodeBug
  • Learn
  • Learning Center
  • STEM Academy
  • CodeBug
  • More
  • Cancel
CodeBug
Blog CodeBug Project: Clock!
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join CodeBug to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: shabaz
  • Date Created: 17 Oct 2015 10:48 PM Date Created
  • Views 1461 views
  • Likes 5 likes
  • Comments 3 comments
  • educational
  • clock
  • codebug
  • codebug_intermediate
Related
Recommended

CodeBug Project: Clock!

shabaz
shabaz
17 Oct 2015

With its 5x5 LED matrix, a binary coded decimal (BCD) clock is easy to create.

 

BCD is pretty easy - each column represents a digit, with the individual LEDs equating to 1, 2, 4 and 8.

If the first two LEDs in a column are lit then that means the digit is 3 (the sum of 1+2).

 

Here is a BCD example from wikipedia that represents the time 10:37 in BCD:

image

With the codebug I decided to build a 12-hour clock and to use the center LED to indicate the seconds:

image

 

When powered up, the default time is 1:00. To tweak the accuracy you may need to adjust the delay in the code.

To try it out or to modify and adapt to your taste,  click here for the BCD Clock.

Here is an example photo - excuse the quality!

image

  • Sign in to reply

Top Comments

  • mcb1
    mcb1 over 9 years ago +4
    knowing you that would be 0339 ... just when you finished playing with it. Well done. mark
  • jc2048
    jc2048 over 9 years ago +1
    That's nice - I like binary/BCD clocks. Have you thought of doing a stopwatch? Tens of seconds, seconds, tenths, and hundreths? One button to start the other to stop? Would be fun to play with. Could also…
  • shabaz
    shabaz over 9 years ago in reply to jc2048 +1
    Hi Jon, Interesting ideas! A stopwatch is a great idea. Speed measurement would be neat too. I need a few-minute timer for a coffee stove type thing, so connecting up a little buzzer to it would be cool…
Parents
  • jc2048
    jc2048 over 9 years ago

    That's nice - I like binary/BCD clocks.

     

    Have you thought of doing a stopwatch? Tens of seconds, seconds, tenths, and hundreths? One button to start the other to stop?

     

    Would be fun to play with.

     

    Could also be adapted to time signals on the inputs. Light beams and photodetectors would give the means to time a pendulum or work out the speed of a Scalextric car.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 9 years ago in reply to jc2048

    Hi Jon,

     

    Interesting ideas! A stopwatch is a great idea. Speed measurement would be neat too.

    I need a few-minute timer for a coffee stove type thing, so connecting up a little buzzer to it would be cool.

    Also a simple button-press (or input-triggered) up/down counter could have uses.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • shabaz
    shabaz over 9 years ago in reply to jc2048

    Hi Jon,

     

    Interesting ideas! A stopwatch is a great idea. Speed measurement would be neat too.

    I need a few-minute timer for a coffee stove type thing, so connecting up a little buzzer to it would be cool.

    Also a simple button-press (or input-triggered) up/down counter could have uses.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube