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 have the problem. I want to program the UART interface. When I simulate my program it works but if I flash it into the memory I alwase reseive the wrong datas. (the baudrate are always 9600 PC-µC)
When I simulate my program it works but if I flash it into the memory I alwase reseive the wrong datas. This is very little information to diagnose the problem. Could you, for example, post excerpts of the source code ?
"the baudrate are always 9600 PC-µC" Have you actually verified that on your hardware; eg, using an oscilloscope? Are all the other parameters (parity, flow control, etc) correctly set on the PC? Is the hardware working correctly (RS232 transceivers, cables, etc)? - check this with loopbacks. "I alwase reseive the wrong datas" Is it the PC or the 8051 that's receiving "wrong" data? Or both?
another possibility would be that you believe in the urban legend that you do not need a MAX232(equivalent) to connect the UART to a PC. Erik