Re: Parallel port and Visual Basic?
- From: mike <spamme0@xxxxxxxxxxxx>
- Date: Sat, 09 Apr 2005 10:44:46 -0700
Zucker wrote:
I am in the process of building a circuit that will monitor the start and finish times for pine box derby cars. I would like to be able to catch these events by feeding signals, through the parallel port, to a Visual Basic program. I was thinking of using the eight data pins from the parallel port to monitor eight lanes.
The electronics are good to go. My problem is with Visual Basic.
Does anyone know how to access and capture bit patterns from the parallel port using Visual Basic?
Steve
PS...I have asked this same question in several programming newsgroups, but I have not recieved any responses.
You have several problems. The operating system may prohibit you from accessing the parallel port. You may need a driver to enable this. Visual Basic prohibits you access to the parallel port. You may need a dll/driver/ocx etc to gain access. You need some way to time the event.
Variable program latencies.
All these layers of software mean that you can't get an accurate or even repeatable time measurement. The newer the OS, the greater the uncertainty.
Suggestion 1:
Do the sense/calculate in a microcontroller and send the answer to VB via RS232 port.
Suggestion 2:
Ditch VB. Run pure DOS. Use the hardware timer in the 8253 emulation...it's the timer that normally runs the beeper.
Program it in something compiled and determinate like assembler or C.
This should give you guraranteed sub-second repeatability.
mike
-- Return address is VALID but some sites block emails with links. Delete this sig when replying. .. Wanted, PCMCIA SCSI Card for HP m820 CDRW. FS 500MHz Tek DSOscilloscope TDS540 Make Offer Wanted, 12.1" LCD for Gateway Solo 5300. Samsung LT121SU-121 Wanted 12" LCD for Compaq Armada 7770MT. Bunch of stuff For Sale and Wanted at the link below. MAKE THE OBVIOUS CHANGES TO THE LINK ht<removethis>tp://www.geocities.com/SiliconValley/Monitor/4710/
.
- References:
- Parallel port and Visual Basic?
- From: Zucker
- Parallel port and Visual Basic?
- Prev by Date: Re: How to select the correct Analog Switch (TTL<->CMOS)
- Next by Date: Re: About 3-phase AC
- Previous by thread: Re: Parallel port and Visual Basic?
- Next by thread: Re: Parallel port and Visual Basic?
- Index(es):
Relevant Pages
|