matlab
MATLAB has an adaptor to access the parallel port (similar to adaptor for image
acquisition). To access the parallel port in MATLAB,
define an object
>> parport= digitalio('parallel','LPT1');
You may obtain the port address using,
>> get(parport,'PortAddress')
>>daqhwinfo('parallel'); %To get data acquisition hardware information
You have to define the pins 2-9 as output pins, by using addline function
>> addline(parport, 0:7, 'out')
Now put the data which you want to output to the parallel port into a matrix; e.g.
>> dataout = logical([1 0 1 0 1 0 1 1]);
Now to output these values, use the putvalue function
>> putvalue(parport,dataout);
Alternatively, you can write the decimal equivalent of the binary data and output it.
>> data = 23;
>> putvalue(parport,data);