From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Direct Port IO

Hi,

I have a Bluchip PIO-48 board which consists
of 2 8255 I/O chips I/O mapped at 0x300 (PORTA)
etc.
I have set the ports to Inputs but I'm gettting
weird results with byte = inp (PORTA) instructions.


Does anyone have any experience of using these
boards or with using the inp() functions for
direct IO ?


Cheers"
0 Kudos
Message 1 of 6
(3,093 Views)
I have not used BlueChip boards but have done direct IO using inp & outp
without any problems. This was using computerboards ISA based DIO cards
under NT 4.0. What OS you are using? Make usre address 0x300 is available on
your PC. Are input lines tied to +ve or GND?


vishi

"DerekG" wrote in message
news:506500000008000000F96A0000-1031838699000@exchange.ni.com...
> Hi,
>
> I have a Bluchip PIO-48 board which consists
> of 2 8255 I/O chips I/O mapped at 0x300 (PORTA)
> etc.
> I have set the ports to Inputs but I'm gettting
> weird results with byte = inp (PORTA) instructions.
>
>
> Does anyone have any experience of using these
> boards or with using the inp() functions for
> direct IO ?
>
>
> Cheers"
0 Kudos
Message 2 of 6
(3,092 Views)
Cheers for the reply.
I am using Win95 (I've tried Win2K too).
I know 0x300 is OK cause I wrote a DOS program to
sample the ports and this works OK in a window
under WIN95.
DG
0 Kudos
Message 3 of 6
(3,092 Views)
Try puting the port in output mode. That way when you write a bit pattern
youc an easily see with a DMM.

BTW - What kind of error you having when you use the port in input mode? I
am no hardware guy but I think for input mode, the lines need to be tied to
+ve or GND, otherwise they are floating, unless the equipment you are
connection to explicitly gives high or low.

vishi

"DerekG" wrote in message
news:5065000000050000004ABE0000-1031838699000@exchange.ni.com...
> Cheers for the reply.
> I am using Win95 (I've tried Win2K too).
> I know 0x300 is OK cause I wrote a DOS program to
> sample the ports and this works OK in a window
> under WIN95.
> DG
0 Kudos
Message 4 of 6
(3,092 Views)
Yeah, tried that no good. It's like the card isn't
there. But it works OK via my DOS program.
I'm not getting an error as such, just random data
values for port = inp(PORT) when all are tied
to either gnd or vcc.
0 Kudos
Message 5 of 6
(3,092 Views)
Possibly, Parallel Port Central at http://www.lvr.com/parport.htm might have the
answer.
0 Kudos
Message 6 of 6
(3,092 Views)