Teen Programmers Unite  
 

 

Return to forum top

Turing question - Please help!!!

Posted by Jordan [send private reply] at January 15, 2003, 10:37:08 AM

for my computer engineering class, I need to create a 5 digit stopwatch program in turing (minunte:second seconds: millisecond millisecond)

The program is already created, but now I need to hook it up to a breadboard via the parallel port (8 outputs from computer) and have it display the clock on 7 segment displays....

my dilemma is this: 7 segment displays require 4 inputs, and there are 5 7 segment displays. so 5 X 4 = 20 inputs required. A parallel port only supports 8 outputs, meaning I am short 12 inputs... how do I get around this problem? I have been told about adders, but Im not sure how to hook them up or how they work

any help would be great
tia

Posted by taubz [send private reply] at January 15, 2003, 01:54:26 PM

I'm not sure, but I think the suggestion about adders means this: what you've done is put the entire program in the computer and everything outside of the computer just displays a number. (As a result, you need 20 bits.) Instead, move part of the stopwatch outside of the computer and into your breadboard. Now you need just two bits. (But I won't say what for.)

- taubz

Posted by RedX [send private reply] at January 15, 2003, 03:11:45 PM

Another approach is using a 2-to-4 demultiplexer and 5 tri-state buffers. 4 outputs of the port are connected to the inputs of the buffers (as a databus) and each buffer is connected to a 7 segment display. Use the demultiplexer to activate one buffer at a time.
Get a book about digitale electronics, you find a more in-depth explanation about (de)multiplexers and buffers there.

Posted by gian [send private reply] at January 16, 2003, 03:18:12 AM

Or if you are really crude, make it run in serial mode!

Posted by RedX [send private reply] at January 16, 2003, 01:12:03 PM

hmm, serial-in-parallel-out registers. That could work.

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.