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 2
(3,262 Views)
pin 12 is bit 5(32 decimal) of the byte you read from port 379h. So actually 58 is +5V and 78 is 0V.

in C:
if(32 & data){
/* pin 12 is high (+5V) */
} else {
/* pin 12 is low (0V) */
}

graphing depends on your programming language and tools available.
If your signal is slow enough, and you don't need very good accuarcy, use a software timer and get a measurement every x mS
0 Kudos
Message 2 of 2
(3,262 Views)