Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Digital clock

Status
Not open for further replies.

amsung2

New Member
now i know this query must have been posted a million times not only in this forum, but in all the other forums that have anything to do with electronics.

here goes: HOW TO BUILD A DAMN DIGITAL CLOCk?!!

why not be the first in history of the internet to answer it?
yep! i have serched all the possible sites, no simple answer anywhere. this is my last hope.

ok guys, pls answer. i am not an electronics student, but an IT student. So I hope you understand my problem.

i know how to build a clock using a 555 timer with a counter. but it aint accurate enough, or so it seems.

i don't need any fancy mechanism to set the time, alarm etc etc..., just a simple clock that runs on DC power. i repeat, 'DC'. it may start from 00:00 no problem.

preferably a microcontroller without using a crystal ocsillator.
or just tell me how to get a pulse for half a sec, so that it can be fed to a counter and 7 segment display and stuff. and don't forget to explain how it works, only the clock generator part, i'll manage the remaining counter and 7 seg display part.

pls excuse me for a long post, but pls try to answer.
 
If you use a micro-controller, then that's all you need - no counters or anything else.

If you check the MicroChip website there are old application notes for just such devices.

It's really a VERY common simple project for a micro-controller.
 
i know how to build a clock using a 555 timer with a counter. but it aint accurate enough, or so it seems..............preferably a microcontroller without using a crystal ocsillator.
Well if you don't want to use a crystal that begs the question, how accurate is "accurate enough"?

Mike
 
If you're interested, I hope to post a single chip Charlieplexed Clock based on the experiment below in the Projects sub-forum this weekend.

The first installment is just the Clock portion of the experiment below and the source is written using the free/lite version of BoostC. Features include;

<> run and set modes (a display 'group' flashes at 2 Hz in set mode)
<> switch debouce (press and release states)
<> switch press beep feedback

Subsequent installments will include the Calendar, Alarm, and (appliance) Timer functions using the same base hardware (PIC, six digit display, four switches, etc.) as I finish moving the code over from assembly language to C.

Please note that the drawing is misleading in that the displays are wired in a Charlieplexed matrix even though the drawing suggests they're wired as a standard multiplexed matrix. I'm working on a new drawing.

Regards, Mike
 

Attachments

  • Charlie Clock 1.JPG
    Charlie Clock 1.JPG
    327.8 KB · Views: 311
  • Charlie Clock 2.JPG
    Charlie Clock 2.JPG
    308.3 KB · Views: 254
  • Clock 2v1 (small).JPG
    Clock 2v1 (small).JPG
    107.8 KB · Views: 266
Last edited:
now i know this query must have been posted a million times not only in this forum, but in all the other forums that have anything to do with electronics.

here goes: HOW TO BUILD A DAMN DIGITAL CLOCk?!!
Here's some links to simple clocks I've built. Might give you some ideas.

**broken link removed**
**broken link removed**
**broken link removed**
 
If you use a micro-controller, then that's all you need - no counters or anything else.

If you check the MicroChip website there are old application notes for just such devices.

It's really a VERY common simple project for a micro-controller.

okay, so can you name one micro controller reliable & cheap enough to use?
 
Well if you don't want to use a crystal that begs the question, how accurate is "accurate enough"?

Mike

well mike, i need it to work as long as the batteries last without any significant error, 555 delivers about 15 min error every day, astronomical!
 
If you're interested, I hope to post a single chip Charlieplexed Clock based on the experiment below in the Projects sub-forum this weekend.

The first installment is just the Clock portion of the experiment below and the source is written using the free/lite version of BoostC. Features include;

<> run and set modes (a display 'group' flashes at 2 Hz in set mode)
<> switch debouce (press and release states)
<> switch press beep feedback

Subsequent installments will include the Calendar, Alarm, and (appliance) Timer functions using the same base hardware (PIC, six digit display, four switches, etc.) as I finish moving the code over from assembly language to C.

Please note that the drawing is misleading in that the displays are wired in a Charlieplexed matrix even though the drawing suggests they're wired as a standard multiplexed matrix. I'm working on a new drawing.

Regards, Mike
hey mike, can u pls explain the workin of this clock?
**broken link removed**

is that the one thats misleading?? finally, looks like a simple enough clock to build, eagerly awaiting a reply..
 
hey mike, can u pls explain the workin of this clock?

is that the one thats misleading?? finally, looks like a simple enough clock to build, eagerly awaiting a reply..

It's the Charlieplexed display wiring that's misleading in that schematic. I've attached a display wiring detail (below). A Charlieplexed matrix uses a "floating" segment line which means you can't use standard multiplexed 2-digit, 3-digit, or 4-digit displays. I used non-multiplexed 2-digit displays in this project which means there's a lot more wiring to be done.

A clock is a clock, is a clock, is a clock (grin). They all work the same. I'll attach working BoostC code if you want to take a peek at the program but I still have to add repeat capability for the up and down arrow keys. Again, I hope to post a better schematic and final code for a plain vanilla Clock in the Projects forum this coming weekend.

Regards, Mike
 

Attachments

  • Charlie Detail.PNG
    Charlie Detail.PNG
    39.2 KB · Views: 231
  • LED Clock.c.txt
    12.1 KB · Views: 276
Last edited:
I forgot to tell you that I tried running the clock off of the internal 8 MHz oscillator yesterday afternoon.

The internal oscillator drifts up and down a bit with temperature so I wasn't too surprised to see the time drift by tens of seconds per hour.

The crystal and caps' are definately worth the extra $1 (usd) in parts.

Mike
 
Last edited:
well mike, i need it to work as long as the batteries last without any significant error, 555 delivers about 15 min error every day, astronomical!

Batteries? On a 7 segment LED clock? Well unless it's on a big honkin' lantern battery you should probably forget it (grin).

Mike
 
alright, my mistake. anyway, i have no choice but to abandon this project.
just returned from the outlet of the top IC vendor in the state.
no freakin IC programer kit is available where I live. no wonder this country is laging behind. all the potential and will in the world, but no resources to support. Bloody morons, had all the microcontrolers and all sorts of ICs available, you name it. not a single programing kit, I wornder what do people do with their 8051s and 2951s after buying them. Probably program them by hatching i belive...
 
Too small a market segment and too many programmers to choose from for that supplier to justify stocking programmers.

Purchase a PicKit2 from Microchip (about $35) or a PicKit2 compatible like Bill's (blueroom) JuneBug kit.

OR..... do us the courtesy of adding location info' in your profile and perhaps one of us PIC guys nearby will be nice enough to program the PIC for you.

Mike
 
Last edited:
i live in Goa in India, remember that once beautiful hippie place?
it's still beautiful, only filled with too many morons. I still don't understand why the vendor kept 8951s in stock? whats the use of them without the programmer kits?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top