Parallelport communication.

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
chucker
Newbie
Posts: 3
Joined: Thu Aug 02, 2018 6:49 am

Parallelport communication.

Post by chucker »

Hello!

So, I am in the lucky situation that i have just revived an old IBM machine. However, the problem with the machine is, that it has only IBM MCA card expansions, the harddrive is ESDI and the only communication options it has, is a DB25 parallelport and a DB25 Serial port. And also a PS/2 port (of which its famous). My disk-drive on it, is broken..

So, I have DOS 5.2, QBasic - and a lot of potential time.

My thoughts were to make a serial or parallel-port transferring programming, in Basic, both on the P70 and on the sending machine - my 200mhz DOS-gaming machine. That way I could probably send over some smarter programs, than the one I plan to build.

So, one of the things I thought of building, and im not sure if this is possible, is a small EPROM-adapter. And arduino holds address-pin on an EEPROM, the data pins are wired to the parallelport D0-7. The arduino listens on one of the parallel pins, lets say Linefeed, when this is changes to high, the arduino increments the address lines by +1. This changes the eprom output - which can be read by the PC and saved. This will probably work, but I feel its a dumb solution.

Another way would simply be to use my 200mhz DOS gaming machine, to make a sending-program, however Im not really all that well traversed in "real parallel talk" - and especially not in qbasic.

Can anyone help?
chucker
Newbie
Posts: 3
Joined: Thu Aug 02, 2018 6:49 am

Re: Parallelport communication.

Post by chucker »

I forgot to mention; I do have an MCA modem, but no modem software - and no modem emulator at hand (if any is available - or can be coded)
chucker
Newbie
Posts: 3
Joined: Thu Aug 02, 2018 6:49 am

Re: Parallelport communication.

Post by chucker »

It just occurred to me that I can probably pull this off with the "copy filename.txt COM1" command - and without any qbasic what so ever. This saddens me. I will revive the thread if by any merry happenstance that doesnt work, and i have to code it myself.
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Re: Parallelport communication.

Post by burger2227 »

Here is my Qbasics Demo with chapter 11 on Serial and parallel ports:

https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
mikefromca
Coder
Posts: 41
Joined: Wed Oct 16, 2019 11:28 am

Re: Parallelport communication.

Post by mikefromca »

the beyondlogic.org used to host information about the PC parallel ports but they have since changed their whole site around. Luckly I found a copy of such a resource on the net still. Have a look:

http://wearcam.org/seatsale/programs/ww ... rallel.htm

Parallel port has 3 modes of operation but for greatest compatibility, you want the SPP (standard parallel port) setup. I program microcontrollers with the parallel port and I use this setup.

Next, you need to learn the I/O addresses it uses. If your PC is normal, then the address is likely 0x378 for the data lines so you can output bits to the data lines with:

out &H378,d%

where d% is the variable representing the value you want to send out to the port.
you can use inp() to get data.

Now if you really want to test the hardware to make sure data is correct, then make a simple circuit.

Connect a data line of the port to the cathode of an LED then anode of LED to 1K resistor then other end of resistor to a regulated 5V power supply. you can get away with batteries or even USB power.

Now as you run your program, play with the values for the d% variable and see which data lines light up the LED and which ones dont.

My point.... the best answer here is to experiment. But I would recommend buying an add-on board if possible instead of using your on-board parallel port because once a parallel port is damaged, it is damaged for good.
kc0nfs
Newbie
Posts: 4
Joined: Mon Oct 05, 2009 10:17 pm
Location: Tonganoxie, Kansas
Contact:

Re: Parallelport communication.

Post by kc0nfs »

I am looking for help using Qbasic with any Windows Operating system.
I have a program that I want to access the printer port, not to print but to provide binary outputs. It works sometimes and sometimes won't. I know Windows redirects the printer port or something. This would be the standard 25 pin printer port. Thanks for any help.
Last edited by kc0nfs on Thu Sep 23, 2021 8:58 pm, edited 1 time in total.
kc0nfs
Newbie
Posts: 4
Joined: Mon Oct 05, 2009 10:17 pm
Location: Tonganoxie, Kansas
Contact:

Re: Parallelport communication.

Post by kc0nfs »

I am looking for help using Qbasic with Windows
I have a program that I want to access the printer port, not to print but to provide binary outputs. It works sometimes and sometimes won't. I know Windows redirects the printer port or something. This would be the standard 25 pin printer port. Thanks for any help. kc0nfs@arrl.net
Post Reply