Serial port remote control

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

Post Reply
TinSoldier
Newbie
Posts:3
Joined:Thu Sep 02, 2004 12:07 am
Serial port remote control

Post by TinSoldier » Thu Sep 02, 2004 12:22 am

What i need to do is use a serial port on an old 486 computer to control a 12 line ( like the computer will be the switch) in a 5 sec on and 10 sec off  cycle.

Im hopping that i can directly connect wires to the serial port input output lines with out using external relays and timers.

The 12v line is very low current.

From here im wondering if the PC's serial port can sence a short (off) condition (04.0mv) and an on (12v) condition.

its a very basic thing, i just cant find enough info on weather the PC's serial port can do this directly.

It would be controled using QuickBasic 4.5 to cycle the line on and off.

Any ideas ?

Guest

Re: Serial port remote control

Post by Guest » Thu Sep 02, 2004 2:05 am

Well i wouldnt be able to tell you how to do that my self
but ive always wanted to access the serial port but havent figured out how to. :-/

Dr_Davenstein
QBasic God
Posts:166
Joined:Tue Mar 25, 2003 12:45 am
Location:U.S.A.
Contact:

Re: Serial port remote control

Post by Dr_Davenstein » Thu Sep 02, 2004 4:14 am

I'm sure it can be done. You would need to use INP to read the state of the port, and OUT to send a value to the port. I'd Google around for some info about the port itself before I sent any external voltage into the PC though.

Here's some help...
http://www.frontiernet.net/~fys/parallel.htm
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!

TinSoldier
Newbie
Posts:3
Joined:Thu Sep 02, 2004 12:07 am

Re: Serial port remote control

Post by TinSoldier » Sun Sep 05, 2004 10:12 am

Well thanks for the replys, as it turns out i studied the schematics and found that a jumper wire was all I needed to fix my problem, so alls well now.

@VJP(Joel),  I seem to remember that QB v4.5 includes a sample com program that would give you all the needed code to access the serial ports, in a working program to boot, iv found over the years that using a ready made program is the best way to lean how to program.  That's how I learned in years past, make changes to the program, test run it, and debug as needed till you figure it all out.

Post Reply