2012-10-28 11:25 PM
hello,
please can someone one help me with a uart problem on the stm8s i use a crystal of 14.7456 Mhz , also i do the change of the clock system, see the atached program. the uart1 is initialised as, pa4 and pa5, also i use a second computer with the DOCKLIGHT program to analyze the communication. the uart is set for 9600 baud, 1 stop , 7 data even parity also the docklight program is set for that . if i send one character from the stm8s to the other computer i see that character correct. even with different characters no if i send a character from the docklight program on the other computeri also see that character correct in the stm8s data ram but if i will send a string of characters ,for example 81 82 83 84 85 from the docklight program,i receive in the stm8s data ram 81 82 03 84 05 i have tryed with other characters, and it seems then the 7 bit is always set to 1, some characters are correct please , is there any idea what i do wrong in the program see atached assembly program file many thanks marc debruyne2012-10-30 05:21 AM
Hi Marc,
I can suggest a solution before thinking on it deeply, that is ANDing the received data by 0x7F. It may fix your problem. Good luck,Kadir2012-10-30 07:32 AM
Since you've configured your terminal program for 7 bits Even parity you can only use the lower 7 bits for data. Bit 7 will be adjusted to provide even parity in the transmitted data. Unless you REALLY need parity checking you will be much better off if you config BOTH ENDS for 8 bit no parity.
jdf2012-10-30 10:48 AM
hello
thank you for the information, i have tryed it , and its working many thanks marc debruyne