Search found 2 matches
- Sat Dec 08, 2007 10:42 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Serial Port Input
- Replies: 3
- Views: 9940
It works!!
Thanks to Burger2227 and Codemss. Your suggestions were essential. I re-wrote the code and it works: DO IF -((INP(&3HFE) AND 128) = 128 THEN CT=CT+1 DO LOOP UNTIL -((INP(&H3FE) AND 128) = 0 END IF LOOP UNTIL CT = L My project is a wire cutting machine. A DC motor with an optical encoder outp...
- Thu Dec 06, 2007 9:20 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Serial Port Input
- Replies: 3
- Views: 9940
Serial Port Input
Hi, I am new to this board and I am not a very experienced Basic programmer. I am trying to read and count a pulse train from the serial port. The code looks like this: INPUT "ENTER PULSE COUNT"; P% PIN = &H3F8: REM COM1 PORT ADDRESS DO IN1=-((INP(PIN + 6) AND 128) = 128): REM READ INP...