Need to build circuit interfacing with COM

Posted on 2005-03-13
Medium Priority
Last Modified: 2013-11-25

I want to build a hardware/software project which will monitor the download speed of my
dialup connection. This will be a device with 6 LEDs. I have already written the software
which gauges the speed and enumerates it. Now I need to build the circuit so that this
circuit recieves the number (0-6) via COM port and lights up that many LEDs. For instance
if my application detects that the current download speed is 3.22 kbps, it will send 3 to
this circuit, which should in turn light up the first 3 LEDs to indicate that the current
download speed is around 3kbps.

I have a very basic knowledge of digital circuits. Will I need to buy one, I guess this one
will be pretty easy to do it at home with help of some ICs or something. Please do guide me
on how to proceed.

p.s. I couldnt find which category to put this question into, so I asked it here.


Question by:dosdemon
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 13530763
I've never tried this, but tyu might want to looking BASIC STAMP.   It might be overkill for what your are trying to do.
LVL 23

Accepted Solution

basicinstinct earned 1000 total points
ID: 13532159
Dude, this is quite easy, especially if you are talking about interfacing to the parallel port (aka printer port).  

In windows 98 you could write values to the parallel port easily, in XP it is restricted kernel level and not as easy, but some dude wrote an excellent DLL which you can easily harness in your software.  The DLL is called InpOut.dll and is available from here: www.logix4u.net/inpout32.htm

On the hardware side you have a few options.  

1. You can drive LEDs straight from most parallel ports (with a resistor in series in each LED).  I suggest you limit the current to about 10mA for each LED, your port puts out 5v so you will need 470 ohm resistors.
2. If you scared about hurting your computer hardware (if you do it is likely to ruin your whole motherboard!) then you can buy a second parallel port for your PC (very very very cheap) and run the hardware off that. I recommend you do this.
3. If you absolutely terrified you can opt not to drive the LEDs directly and drive them through transistors or even optocouplers if you want to go bananas - that will change the nature of your project and it will require an external power source (eg batteries).

So, you can just connect the positive sides of the six LEDs to pins 2,3,4,5,6,7 of the parallel port.  Then connect the other end of each LED to a resistor, then connect the end of each resistor to the ground pins of the port (pins 18 - 25).  Then you just send the value you want to the port and the correct LEDs will light up!

Naturally, if you send a 3 to the port it will light up the first two LEDs (cos it's in binary) so in your software you'll have to convert that and send a 7 to the port if you want the first three LEDs to light up, and so on for the other values.

Finally, if there is anything I haven't explained enough, or anything I forgot, you can check out this website:

Standard disclaimer, if you blow up your computer doing this stuff then don't come crying to me.
LVL 23

Expert Comment

ID: 13537864
By the way, Basic Stamp (or PIC) is definitely overkill for what you want to do, as SCDMETA suggests.

While I am here typing again, I thought I would point you in the right direction if you actually did choose option 3 in my post above (and isolate your hardware from the parallel port using transistors or optocouplers or something like that). Well I just looked over one of my old interface projects (sitting here blinking away on my desk right now) and in it I used a 74637 IC.  This is the cheapest bet for you if you choose to isolate it (remember, you will need a secondary power supply if you isolate).

My project does more than drive LEDs and that's why I chose to isolate.  In the past I have driven 8 LEDs direct from the parallel port constantly for months on end with no ill effects.

Using the 74637 you would connect pins 2,4,6,10,12,14 of the 74637 to pins 2,3,4,5,6,7 of the parallel port (ie, pin 2 goes to pin 2, pin 4 goes to pin 3 and so on).  The positive side of the LEDs connect to pins 3,5,7,9,11,13 of the 74637 (ie one LED to pin 3, one to pin 5 and so on) (don't forget to put a resistor in series with each LED).  Then you connect a battery with the positive side to pin 16 of the 74637. The negative side of the battery is where all of the LEDs connect to on their negative side (through the resistors).  Also, you connect pins 1,8,15 of the 74637 to the negative side of the battery, AND you connect pins 18-25 of the parallel port to the negative side of the battery.

Finally, beware of static if you use the 74637 - try not to handle to pins directly and use a static strap (or just touch something earthed before handling).  Don't solder the IC directly, use an IC socket and just plug the IC into that.

Author Comment

ID: 13575416
Thanks basicinstinct,

Some basic knowledge was all I needed. I will go for the first option. I am down with my box already :P I'll just have to go thru the basic electronic lessons again.

Yes I looked into the basic stamp, but Id like to know what I did better, since this is a purely recreational project.

Thanks again.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Starting up a Project
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question