From: Gary Tait
Subject: Re: Help with senior project: PC synchronized digital clock
X-Newsreader: Forte Free Agent 1.92/32.572
Date: Fri, 27 Sep 2002 11:09:12 -0400
NNTP-Posting-Date: Fri, 27 Sep 2002 11:05:48 EDT
Organization: WorldCom Canada Ltd. News Reader Service
On 25 Sep 2002 11:20:51 -0700, firstname.lastname@example.org (John Campbell) wrote:
>I'm a fifth year undergraduate, ECET major at Cal Poly Pomona in CA.
>For my senior project, I want to build a digital clock that I can
>synchronize using a PC's clock using either a PCs serial or parallel
>port. To send the data about the clock, I want to use C++.
>However I have some concerns about trying to complete this project and
>wanted to get some opinions before I really dive into it.
>First off, I'm not sure exactly how I can send a series or set of ones
>and zeroes using a parallel or serial port. This can be done right?
>Anyone know a good reference that explains how to do this? And also,
>maybe a website or book that has info on how to access these ports
>using C++ in Dos or Windows?
One word, shift register. A better solution would be to use a
microcontroller with an RTC chip. I don't know if this is doable, you
could use a paralell in/out RTC chip (like was used on PC XT 6in1
cards), and directly multiplex that to a display, and work it so it
can be programmed from the parallel port.
>Once I've got this done, I still have to figure out how I'm going to
>design the clock to recieve this information and use it to synchronize
>itself, which I know is just going to be a majorly huge pain in the
>Also, and this is my major handicap, I'm getting into Assembly
>language a little late (next quarter), and won't be learning
>microprocessors until the spring! So I was going to design the clock
>using only logic gates and counters and other obvious things.
You can get started in C or Basic.. Most chips have C compilers
available, some have Basic compilers as well, some even have on chip
>So what do you guys think? Is this project too insane or should I run
>with it? Is this a dumb thing to try without knowledge of
>microprocessors or memory?
Not really. As a learning project, you can get to know how logic
works, and how to bit bang serial (if you go the shift register route)
>I'd love to hear some of your opinions because I'm really excited
>about the project, just not sure if I can pull it off.
Quick lesson on bit banging:
Set device enable line low.
set clock high
set data bit (high or low)
set clock low
set clock high
set next data bit,
and so on.