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

problem with controller output

I have a problem with controller output. ( From controller's serial port via COM port i send data to my PC, and can recieve it on PC's Hyperterminal ).
While testing the programm into debugger ( Keil C251 uVision2 ), i recieve the string, that i was sent from the programm.
But from real controller i recieve that:

if i use code

for ( i = 0; i < strlen (MyString); i ++)
{
	TI = 0;
	SBUF = MyString[i];
	while(!TI);
}
i recieve : LMNOPQRSTUVWXYZ[\]^_'abcdefghijklmnopqrstuvwxyz{|}~ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ''""•–—˜ љ›њќћџ ЎўЈ¤Ґ¦§Ё Є«¬­ Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэю

and if i use code
for ( i = 0; i < 6; i ++)
{
	TI = 0;
	SBUF = MyString[i];
	while(!TI);
}
i recive: LMNOPQ

Into debugger i send and recieve the right string ( For example, i send and recieve the string: "ATE0\n\r") in both cases
Can you explain, please, what means this sequence of symbols, and how can i recieve the right string from real controller.
Thanks.
Gennady.

0