Parallel port data input on xPC target
2 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Target Computer Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!