We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I m using MSC1210. It receives data on UART0. SCON=0x50--> Serial mode 1(Asynchronous full-duplex). However, in simulation, only RI(receive interrupt) happens, TI never gets set. As per the code TI should get set:
SBUF='@'; //These 3 lines are not setting TI bit SBUF=0x0D; SBUF=0x0A; //copying the string into array for(z=1;z<=4;z++) { while(SCON0==0x50){} init_arr[z]=SBUF; SCON0=0x50; } P0=0x00; //comparing the string if (init_arr[1]=='I' && init_arr[2]=='4' && init_arr[3]==' ' && init_arr[4]=='A') P0=0x0F9; else P0=0x0C0;
Please tell me if i m wrong and why it wouldnt work as intended.
hi your code is right, me too at a loss why it is not working,
Wonder what our experts (Andy Neil) has got to say,