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
fid = fopen('com1:','w'); % send data from each slider v = round(get(sld1,'value')) fwrite(fid,v,'uint8');