Board index » delphi » Output thru parallel port

Output thru parallel port

I'm trying to output some data thru the parallel port.
But i can only output using the DATA ports and not the CONTROL ports..
Do i need to initialise the CONTROL ports before i can as them as output?

I'm using the command 'outportb'.

Thanks.

 

Re:Output thru parallel port


They should work. How do you know the stuff you are sending the the
data outputs is working also?

Don't forget that there's one input control control address (nominally
at 0x379) and one output control address (nominally at 0x37a) for a
standard parallel port with data output at address 0x378.

While it shouldn't affect you, remember that for machines that have
bidirectional ports (whether configured as an ECP, EPP or SPP),
setting bit 5 of 0x37a will switch off the output drivers at address
0x378.

Cheers
Glenn

Quote
"James" <james...@hotmail.com> wrote:

>I'm trying to output some data thru the parallel port.
>But i can only output using the DATA ports and not the CONTROL ports..
>Do i need to initialise the CONTROL ports before i can as them as output?

>I'm using the command 'outportb'.

>Thanks.

Re:Output thru parallel port


i try sending continuous '0's and '1' throught the data port(0x3BC). Using a oscillascope, i can see a square wave. But i try doing that to the control port(0x3BE), i can only see a high output.

Or is there any other way in which i can test these ports?

Quote
Glenn.Pure*delete_this_for_rep...@pcug.org.au (Glenn Pure) wrote:
>They should work. How do you know the stuff you are sending the the
>data outputs is working also?

>Don't forget that there's one input control control address (nominally
>at 0x379) and one output control address (nominally at 0x37a) for a
>standard parallel port with data output at address 0x378.

>While it shouldn't affect you, remember that for machines that have
>bidirectional ports (whether configured as an ECP, EPP or SPP),
>setting bit 5 of 0x37a will switch off the output drivers at address
>0x378.

>Cheers
>Glenn

>"James" <james...@hotmail.com> wrote:

>>I'm trying to output some data thru the parallel port.
>>But i can only output using the DATA ports and not the CONTROL ports..
>>Do i need to initialise the CONTROL ports before i can as them as output?

>>I'm using the command 'outportb'.

>>Thanks.

Re:Output thru parallel port


Quote
"James" <james...@hotmail.com> wrote:

>i try sending continuous '0's and '1' throught the data port(0x3BC). Using a oscillascope, i can see a square wave. But i try doing that to the control port(0x3BE), i can only see a high output.

>Or is there any other way in which i can test these ports?

The simplest way to test them is to write a short program to set or
reset each bit at the address you want to test and then simply measure
the logic level with a logic probe or multimeter. That's how I do it.

I presume you know the pin assignments on the parallel port and how
they relate to the various PC I/O addresses:

DB25 pin allocation
        data outputs    port_in         port_control
bit 0      pin 2                                pin 1 (inverted)
bit 1   pin 3                           pin 14 (inverted)
bit 2   pin 4                           pin 16
bit 3   pin 5           pin 15          pin 17 (inverted)
bit 4   pin 6           pin 13
bit 5    pin 7          pin 12
bit 6   pin 8           pin 10
bit 7   pin 9           pin 11 (inverted)

Addresses: port_in = data output address + 1
        port_control = data output address + 2

Cheers
Glenn

Other Threads