Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to acquire pulse signal (TTL 0 ,+5v) using parallel port (SPP 25 pins) on pin 12.

The state register adress is 379h. When I run continuously this VI, the value diplays 78 and 58 periodycally.

I think that 0 correponds to 58 and +5v correponds 78. Is this correct ?

So my questions are:

1) How can I do to read only pin 12.

2) How can I do to display graph of a pulse signal (TTL 0 +5v) from value.

I attached the I am using.

Thank you in advance.
0 Kudos
Message 1 of 4
(3,927 Views)
Here is some info, that was posted preveously on Exchange.
In port and Out port will allow you to talk and listen to the parallel port. With these vi's (located under port I/O sub-palette of the advanced palette) you give a byte value and an address. Here is a little info that was just in a similar question :
When we say that the parallel port is at base address 0x378, we mean that the byte registers at 0x378, 0x379, and 0x37A are the D, S, and C registers of the parallel port (S = D + 1; C = D + 2). When you read and write to these via the inport and outport vis you bypass a handshaking layer that the function calls to serial port write must use.
Using inport and outport doesn't require that you modify .labviewrc and visaconf.ini files, nor does it require grou
nding of certain pins.
The pinouts for the D, S, and C registers are as follows:
(- sign means that the logic is inverted)
01: -C0
02: D0
03: D1
04: D2
05: D3
06: D4
07: D5
08: D6
09: D7
10: S6
11: -S7
12: S5
13: S4
14: -C1
15: S3
16: C2
17: -C3
18 to 25 are Ground


And lastly, a site about the EPP (encanced parallel port) if you need this info.
http://www.fapo.com/eppmode.htm


Therefore you can use InPort.vi to read in the 8-bit value, then, from this value you can figure whether or not bit 12 of the port is high or low. From the above information, if you read in the S register of the parallel port, bit 5 will be the 12th bit of the port.
You can easlily test this out by applying a high and low signal to the port and seeing if you get the correct results.

Let me know if this does not work.

Brian
0 Kudos
Message 2 of 4
(3,927 Views)
Hi Brian,

It does work, and bit 12 of the port is high or low
When I run continuously In port.vi I get periodically a value of 120 and 88. So 120 corresponds to "001'1'1100" and 88 corresponds to "001'0'1100".

Now I want to plot a graph on labview of the pulse signal (low(0V), high(+5v)) that I am applying to the port.

How can I do that?
I attached a file that I am using.
Thank you very much for your help.
Regards,
0 Kudos
Message 3 of 4
(3,927 Views)
Hi Brian,

I have a similar issue, but with a serial port (com1)

I am trying to read the logic value from a 1pps signal that rides on the #1 pin of the serial port. I have tried to use InPort.vi and asign the register address the first value in the address range. But it gives me an error message saying that the vi was stoped at some address in the PCI Bus range. Not sure what to do. Please advise. Thanks
Joel
0 Kudos
Message 4 of 4
(3,927 Views)