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');
What baud rate are you using ? Are both serial ports set to this baud rate ? Can you check the transmission with an oscilloscope ?
Hi I am using 4800 as my baud rate.both the sides are having the same baud rate.
mov th1,#-6 ;4800baud rate
Hi, I replied using my co-worker system and thats y his name got displayed in the thread as Krishna.... sorry.
Hi all If I want to use 19200 as my baud rate what value should i load into TH1 register?
Do I need to do any integer to ascii conversion to read the correct data?