This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

serial transmission

hi all,
I wrote a program in Matlab to transmit data through COM port.I am sending the data in integer format.
I have connected MCBx51 board to the system COM port to receive it.
The assembly program to read the data from the COM port is as below,

org 0000h
mov p1,#0aah
mov tmod,#20h
mov scon,#50h
mov th1,#-6
setb tr1
l1:jnb ri,l1
mov a,sbuf
mov p1,a
clr ri
sjmp l1
end

a part of the Matlab program is below

fid = fopen('com1:','w');

% send data from each slider
v = round(get(sld1,'value'))
fwrite(fid,v,'uint8');
Whenever i send some data from PC with the help of the Matlab program I can see some data being displayed in the PORT1 in the MCBx51 board.But I am not receiveing the data I am sending.
could anyone help me get rid of this problem?
Looking for your help.

0