Reading input from ports with Delphi

Posted by zmo on June 09, 2005

I want to know how can read datas from ports (LPT, ...). It's for data acquisition. I alread think for this in (LPT ports), but i don't know it is right or not. It's in the following:

var port:array[0..65536]of byte;
bits:byte;

const data=$378;
status=data+1;
control=data+2;
begin
port[data]:=bits; {output data}
bits:=port[status]; {input data}
************************************************

I want to add reading datas to Y-axis in chart. For this need to change byte to somethings or not?

Related Articles and Replies