Parallel port data input on xPC target

1 Ansicht (letzte 30 Tage)
Yanbo
Yanbo am 25 Nov. 2013
Dear Sir/Madam,
I have a problem with using Parallel Port to read data on xPC target (Matlab version 2010b and xPC target version 4.4)…
The block I chose to read in signal is ‘IO Port read’ (I used ‘Parallel Port DI’ as well, but ended up with same results), and the address for the parallel port is also right. On the D25 connector, I used pin 2 as the data input and pin 18 as GND. When I supply 5V (DC power supply) to the parallel port, I can read ‘1’ from the target scope, however, the current is 110mA…
I’ve got a comparator box which outputs 5v when the input is greater than 2v, and outputs 0 if the input is smaller than 2v; I connected the output end from this box with the parallel port, then the target scope only read ‘0’, and apparently there is not enough voltage.
It seems that the parallel port requires very large current(110mA!) to pull the voltage to 5v, which is a bit weird in the application.
Did I use the wrong pin as the input? If not, what else could be wrong?
Cheers,
Yanbo

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by