Help needed for parallel port interfacing using matlab
hi guys,
I'm making a robot and i want it to be controlled by the computer. But the robot should be capable of travelling a long distance,(probably some ten to twenty feet). So using a wired robot doesn't seem to be a good choice. I wanna interface a rf remote control to the parallel port to control the bot. Is it possible? Can anyone tell me how to do it using matlab? If not, someother software like vc++ is also ok...
Thanks.
I'm making a robot and i want it to be controlled by the computer. But the robot should be capable of travelling a long distance,(probably some ten to twenty feet). So using a wired robot doesn't seem to be a good choice. I wanna interface a rf remote control to the parallel port to control the bot. Is it possible? Can anyone tell me how to do it using matlab? If not, someother software like vc++ is also ok...
Thanks.
Replies
-
raknahs2Hi Dude,
controlling parallel port through MATLAB is quite simple.
Check below lines of MATLAB code which I am using in my project.
dio = digitalio('parallel','LPT1')
--> create an object
data1 = addline(dio,0:7,0,'out') %Pin 2-9
data2 = addline(dio,0,2,'out') %Pin 1
data3 = addline(dio,1,2,'out') %Pin 14
--> to configure parallel port line
Following command will output "0" to data1 of parallel port
putvalue(data1,0)
Don't hesitate to ask me if you have any queries.
;-) -
jowie_510hi bro..
I also making a robot and i still confiuse about that (the discussion above)..but i think my question is still in this scope..
is it the connection between computer and the robot is without wire??..
Hope anyone can explain detail...
thanks.. -
raknahs2No. MATLAB code given above is to interface a peripheral (a device) via parallel port with the PC.
-
jowie_510ok.. thanks for your explanation..
-
Zentill.nowThis thread was of great use for me thank u........
-
ReaverHye i want to control a lift (I hav made my own mechanical structure).
Just give me a example of how to turn on/off 4-5 leds using parallel port through matlab plzzzzzzzzzzz -
gtugachi everyone
i also have this project where i only have to control 5 leds by MATLAB...
and i have to use my laptop to do it.
i have found some information about using serial-parallel ports and recently have a premade PIC circuit. but still i have so little time that i need your advices emergently...
thanks -
Himanshutimethis is done by using embeded programing and using infrared or radio wave signals and made a device to genrate perticular signals conect on 25 pin parlel port by using rs232 wier, but i want to conform you that is your robot is able to move on stayers by themself if yes please tel me how?
by -
Himanshutimethis is done by using embeded programing in c langwage and using infrared or radio wave signals and made a device to genrate perticular signals conect on 25 pin parlel port by using rs232 wier, but i want to conform you that is your robot is able to move on stayers by themself if yes please tel me how?
by -
heloitsadiCheck this out guys..
-
coolbreezeMs thesis
This is code for parallel interference cancelltion in ds cdma using matrix algebraic approach.
Please check the code and let me know if iam doin any mistake . Also I need to apply slow and fast rayleigh fading in this model.
The rcd signal is R = SAB + N
where R,S,A,B are matrices
The matlab code is given below :
close all
clear all;
clc;
warning off all
K = 27; %No. of users
Navg = 1e3; %No. of repititions
snr = 5:1:25; %SNR RANGE
Sv = (10.^(-snr/10)); %Noise variance in different SNR
A = eye(K); %input power
%Get signature sequences
load GS31;
S = GS31(1:K,;
S= S';
Lc = length(S😀,1));
Sn= S./sqrt(Lc); %Normalize energy of signature waveforms
R = Sn'*Sn; % Calculate correlation matrix
corr=(R-eye(size(R)));
h = waitbar(0,'WAIT...');
for t = 1:Navg
waitbar(t/Navg);
for j = 1:length(snr)
noise =(Sv(j))^.5*randn(Lc,1);
b=2*(randint(K,1)-0.5);
BT=Sn*A*b;
r=awgn(BT,snr(j));
% r=BT+noise;
y = Sn'*r;
ysdec = inv(R)*Sn'*r;
YMF = sign(y);
YDEC= sign(ysdec);
novector(1:K) = Sv(j);
sigma2= diag(novector);
t1=R+sigma2;
ysmmse = (inv ( t1 ))* y;
YMMSE= sign(ysmmse);
%%CPIC
yinit=zeros(K,1);
ypic1= (Sn'*r) + yinit ;
YPIC1 = sign(ypic1);
yinit2=ypic1;
ypic2=(Sn'*r) - ( corr*A*yinit2 );
YPIC2 = sign(ypic2);
yinit3=ypic2;
ypic3=(Sn'*r) - ( corr*A*yinit3 );
YPIC3 = sign(ypic3);
yinit4= ypic3;
ypic4=(Sn'*r) - ( corr*A*yinit4 );
YPIC4 = sign(ypic4);
yinit5= ypic4;
ypic5=(Sn'*r) - ( corr*A*yinit5 );
YPIC5 = sign(ypic5);
yinit6=ypic5;
ypic6=(Sn'*r) - ( corr*A*yinit6 );
YPIC6 = sign(ypic6);
yinit7=ypic6;
ypic7=(Sn'*r) - ( corr*A*yinit7 );
YPIC7 = sign(ypic7);
yinit8=ypic7;
ypic8=(Sn'*r) - ( corr*A*yinit8 );
YPIC8 = sign(ypic8);
ERMF(j)= length(find (YMF ~= b))/K;
ERDEC(j)= length(find (YDEC ~= b))/K;
ERMMSE(j)= length(find (YMMSE ~= b))/K;
ERPIC1(j)= length(find (YPIC1 ~= b))/K;
ERPIC2(j)= length(find (YPIC2 ~= b))/K;
ERPIC3(j)= length(find (YPIC3 ~= b))/K;
ERPIC4(j)= length(find (YPIC4 ~= b))/K;
ERPIC5(j)= length(find (YPIC5 ~= b))/K;
ERPIC6(j)= length(find (YPIC6 ~= b))/K;
ERPIC7(j)= length(find (YPIC7 ~= b))/K;
ERPIC8(j)= length(find (YPIC8 ~= b))/K;
end
EERMF(t,=ERMF;
EERDEC(t,=ERDEC;
EERMMSE(t,=ERMMSE;
EERPIC1(t,=ERPIC1;
EERPIC2(t,=ERPIC2;
EERPIC3(t,=ERPIC3;
EERPIC4(t,=ERPIC4;
EERPIC5(t,=ERPIC5;
EERPIC6(t,=ERPIC6;
EERPIC7(t,=ERPIC7;
EERPIC8(t,=ERPIC8;
end
BERMF = smooth(mean(EERMF,1));
BERDEC = smooth(mean(EERDEC,1));
BERMMSE = smooth(mean(EERMMSE,1));
BERPIC1 = smooth(mean(EERPIC1,1));
BERPIC2 = smooth(mean(EERPIC2,1));
BERPIC3 = smooth(mean(EERPIC3,1));
BERPIC4 = smooth(mean(EERPIC4,1));
BERPIC5 = smooth(mean(EERPIC5,1));
BERPIC6 = smooth(mean(EERPIC6,1));
BERPIC7 = smooth(mean(EERPIC7,1));
BERPIC8 = smooth(mean(EERPIC8,1));
semilogy(snr,BERMF,'k*-',snr,BERPIC1,'m^-',snr,BERPIC2,'rs-',snr,BERPIC3,'yo-',snr,BERPIC4,'k<-',snr,BERPIC5,'c^-',snr,BERPIC6,'y^-',snr,BERPIC7,'r>-',snr,BERPIC8,'bs-',snr,BERDEC,'g*-',snr,BERMMSE,'go-');
grid on
xlabel('SNR')
ylabel('Average BER')
legend('MF','Stage1','Stage2','Stage3','Stage4','Stage5','Stage6','Stage7','Stage8','DECOR','MMSE')
title('BER vs SNR--Conventional PIC-25 Users -AWGN Channel')
close(h)
Added after 1 minutes:
Dear all,
The : ) got replaced by a smiley.
I need urgent reply regarding fading
thanks in advance -
Ahsanmohyuddinraknahs2Hi Dude,
controlling parallel port through MATLAB is quite simple.
Check below lines of MATLAB code which I am using in my project.
dio = digitalio('parallel','LPT1')
--> create an object
data1 = addline(dio,0:7,0,'out') %Pin 2-9
data2 = addline(dio,0,2,'out') %Pin 1
data3 = addline(dio,1,2,'out') %Pin 14
--> to configure parallel port line
Following command will output "0" to data1 of parallel port
putvalue(data1,0)
Don't hesitate to ask me if you have any queries.
;-)
Dear
I am working on an idea, i want to control the direction of DC motor(clockwise or anticlockwise)
using GUI and parallel port. I have made a GUI on MATLAB but don't know how to program its .m file
GUI figure is attached.
I have added two options
i- clockwise
ii-anticlockwise
I redefine the problem
" select any one of the direction and press 'ok'.
if selected ' clockwise' send 0 to pin2 of parallel port
if selected ' anticlockwise' send 1 to pin2 of parallel port
I am waiting for your reply -
Kaustubh KatdarePlease upload your images to imageshack.com and then enter full URL of the image (ending in file extension) in the button on the post editor.
-
Ahsanmohyuddin
this site is not allowed in my area.... Is image i have added is not visible?The_Big_KPlease upload your images to imageshack.com and then enter full URL of the image (ending in file extension) in the button on the post editor.
You are reading an archived discussion.
Related Posts
CEans,
How about having a CE Contest with participants from all over the world? Exciting, right? Yes, there will be prize(s) 😁 . I have couple of ideas about the...
HELLO ENGINEERS
I JUST JOIN THIS COMMUNITY I am M.C.A. ii YEAR STUDENT AND HAVING PROBLEM THAT I NEED LATEST SEMINAR TOPICS .SO PLEASE HELP ME IN SEARCHING IT.
Hi CEians....
Whether it is possible to import a poser image into 3ds max?
if so pls tell me.
I don kno hw to import the image frm poser to...
Hi all,
This is a technical question regarding split airconditioner. Presently at site we have a US (American) made generator which supplies power at 110V/60Hz and 220V/60Hz. Both the supply...
hi guys,
I am doing a project on image processing...The main concentration will be on web based printing and mobile printing......but in that case i have a very little knowledge.......so...