How to send a signal from a decade counter to pc using the serial port

Thread Starter

piyush.singhvi

Joined Apr 6, 2007
1
Hi frnds
I am working on a project that will determine the time a vehicle which it takes to cross a particular distance so that the velocity of that vehicle can be measured easily.

I want to then send this time signal to the pc so that i can activate the camera when the vehicle crosses the distance with a velocity greater then the limit.

for this I need to transmit the signal from the decade counter to the pc through a serial port.

please help me how to do this.

Thanks
 

beenthere

Joined Apr 20, 2004
15,819
Is there some reason why the timing can't be done by the computer more directly? Sending the counter data into the serial port will require an RS-232 chip like the MAX232, as well as some means of transferring the data in an automated fashion.

There are many articles on the use of the parallel (printer) port for various things. I suggest you look into these, and perhaps make your project somewhat simpler.
 

daddy

Joined Apr 5, 2007
3
If the signal is just a simple indication that an event has happened you could probably wire it to a port on the PC and have it raise an interrupt.

That is, automatically activate a software routine based on one pin of the port becoming active.

This link may help http://www.beyondlogic.org/serial/serial1.htm There is a description of the serial port and some information on how to write an interrupt handler.

But the serial port may not be the easiest thing to drive. You might also look at plugging into the parallel printer port or even the keyboard or mouse ports. It woudl depend on the output you have conveniently available from the speed measurement device.

For example, you could maybe sacrifice a mouse and wire one sensor to the left button and the another to the right button. Then write a program to measure the time difference between a left button press and a right button press and to fire the camera if it was below a threshold. That way it would be easy to test the software at least.

Good luck
 
Top