Parallel Port Working!

Blitz3D Forums/Blitz3D Beginners Area/Parallel Port Working!

None(Posted 2004) [#1]
Thanks to everyone for their help (especially soja). I finally got the PIO card to operate for input and output operations. WinIo was not the winner, it was PortIo. I never could figure out moving the data from the PIO board or to the PIO board with WinIo, but with PortIo it was easy After I figured out how to set up dlportio.sys. The steps are:
1. Find dlportio.sys on the net (I used Google),
2. Locate NTPORT,
3. Unzip then setup NTPORT,
4. Follow the instructions (If I can do it anyone can!),
5. Here is the .decls file to put into userlibs:

.lib "dlportio.dll"

DPortReadPortUchar%( port% )
DPortReadPortUshort%( port% )
DPortReadPortUlong%( port% )

DlPortReadPortBufferUchar( port%, buffer*, count% )
DlPortReadPortBufferUshort( port%, buffer*, count% )
DlPortReadPortBufferUlong( port%, buffer*, count% )

DlPortWritePortUchar( port%, value% )
DlPortWritePortUshort( port%, value% )
DlPortWritePortUlong( port%, value% )

DlPortWritePortBufferUchar( port%, buffer*, count% )
DlPortWritePortBufferUshort( port%, buffer*, count% )
DlPortWritePortBufferUlong( port%, buffer*, count% )

6. Place dlportio.dll in userlibs,
7. Here is the file for parallel_in.bb:

;Direct Port access from Blitz Basic: the input port.

Include "DIOLib.bb"

Graphics 800,600,16,2
SetBuffer BackBuffer()

;Set the direction bit of the device control register,
;make the port read.

Repeat

;Read from data register
Print DLPortReadPortUchar($379)

Until KeyDown(1)

End

8. Here is the file for parallel_out.bb:

;Direct Port access from Blitz Basic: the output port

Include "DIOLib.bb"

;Set the direction bit of the device control register,
;make the port write -- change the hex data value to
:change the output value.
DlPortWritePortUchar($378, $20)

End

Now that I have these very simple programs, I can do whatever I care to do!

Thanks again for all the help,


DES


Panno(Posted 2004) [#2]
cool
mfg panno


None(Posted 2004) [#3]
OOPS!

The first 3 postings under

.lib "dlportio.dll"

should be

DlPortRead

I made a mistake and got the "L" out of there! Ha, Ha!.


None


VIP3R(Posted 2004) [#4]
-