Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Serial Port rts
#1
I need help! Its a very simple problem but I just can figure it out. I have an old Fujitsu Point 510 tablet pc. I am using it to monitor my utility usage at my home. The problem is that the tablet dosn't have any ports except the serial port. Sure there are more ports but they are for the docking station and Fujitsu won't tell me the pinouts so I can use the parallel port mixed in the molex connector. Bla...Bla...Bla... I just want a simple line of Qbasic that can read if the rts line is high or low. Please don't explan to me the function of rts, Im well aware. There is plenty of information on com port programming in qbasic but nothing on just a simple input on the rts line. I have tried setting the serial line to low and high and read it in qbasic. It works but seems very unstable. I tend to get a "data i/o" error. I just want a something simple that can detect and count pulses without external circuitry. Please help!!!!
Reply
#2
Scott

The Modem Status Register for Serial port 1 (3f8) is at 3FE addr.
or Port + 6
Following are the 8 bits at that addr
0=DCTS
1=DDSR
2=TER1
3=DDCD
4=CTS
5=DSR
6=RI
7=DCD

Simply read the address

Status = inp(&H3FE)

Then test the bit

IF (Status AND 16) = 16 THEN
'CTS is on, do what you want
END IF

Hope this helps.
t is the End result that matters, not the Tools used to get there.
Reply
#3
Hope you are not running XP. No way to access a hardware port from DOS in W2000 or XP...
Dinosaur's solution works in DOS and W9x
Antoni
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)