...what is wrong here?
...i write 902 =>/=> i see "x"
902 MOD ( 258 ) = 134
134dec = 86hex
86hex = 'x'ascii
Hey can you send your proteus file.I m working on similar project but i am using 8051. Need to send serial data from PC(matlab) to microcontroller.After uc receives data.It shud perform some task!
I have similar problems like you had.IF i send data 11 through matlab.There will be some different characters displayed in the virtual terminal..what may be problem
#include<reg51.h>
void Tx_Char(unsigned char);
void main(void)
{
unsigned char z;
TMOD=0x20;
TH1=0xFD;
SCON=0x50;
TR1=1;
while(1)
{ while(RI==0)
z=SBUF;
Tx_Char(z);
RI=0;
}
}
void Tx_Char(unsigned char c)
{SBUF=c;
while(TI==0);
TI=0;
}
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?