Saturday, September 5, 2009

Parallel Port Monitoring Using MATLAB

MATLAB [!!Video Tutorial!!]


Hello friends , here is a small video tutorial on how to communicate to devices connected to our PCs parallel port using MATLAB programming. A large number of applications can be thought of using MATLAB as a platform in robotics. The digital bit data obtained at the parallel port can be utilized for driving DC motors or Stepper motors or other actuators.

%Code to transmit bits to the Parallel Port.
%The output1 & output2 matrix bits are transmitted sequentially.

parlport = digitalio('parallel', 'LPT1');
line = addline(parlport, 0:3, 'out');
output1 = [0 0 0 1; 0 0 1 1; 0 1 1 1; 1 1 1 1; 0 0 0 0];
output2 = [1 0 0 0; 1 1 0 0; 1 1 1 0; 1 1 1 1; 0 0 0 0];
for m=1:5
for x = 1:5
pval1 = output1(x,:);
putvalue (parlport, pval1);
pause(0.3);
end
for y = 1:5
pval2 = output2(y,:);
putvalue (parlport, pval2);
pause(0.3);
end
end

"Feel free to post your queries and doubts in the tutorial, I will try to upload some more video tutorials exploring MATLAB as a useful tool in Robotics".