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.
Hi, I'm using a Internal oscillator of 11059200 Hz and i set my desired baud rate. When i'm going to test the serial communication with the application "hyperterminal" from windows, i can't receive the information i send correctly, just strange characters, and i can send information to my uC but just funny characters too. And this only "works" when the baud rate from hyperterminal is less than the baud rate defined in my uC. How can i receive the correct information? The only guess i have is that the baud rate defined in uC isn't the baud rate 100% correct, maybe only 98%! But with the formula it should be correct. Thank you!
As Drew said, check all of your baud rate settings. A quick way is to take your code into the debugger, break after your baudrate initialization and look at the uart peripheral dialog. You can modify the settings quickly and verify your baudrate. Also, remember hyperterminal default baudrate is 2400. Check your hyperterminal properties.
Thank you all for your time! Im working with the Cygnal uC F310, and it seems that this chip as some problems with uart, i read somewhere dont remember where, that his uart doesnt follow the standard 8051, something like that! The keil simulator, doesnt work well with this chip, because the serial window doesnt show the correct baud rate values, because always shows the same value and never shows the 8bit mode just the 9 bit mode, even when in the register i set to 8bit mode! Now im using a program called comwatch, to see the values that are passing between the PC and the uC, and the baud rate in each side! With this i think i can tune my values to give the correct baud rate. There are two main problems!!! One is that maybe the keil simulator isn't reliable with my chip, the other problem is that im new to embedded systems! Sorry for any english mistakes! Its not my mother tongue.
What Version of Keil are you running? I have Version 7.08 with the uvision debugger driver S8051.dll at version 2.04c. I am working with the Cygnal 8085F330 chip. I switched to the F310 chip for the debugger and the UART peripheral driver works fine.
Hi, Yes in simulation mode, my program works fine and the serial window works fine, but when i switch to Cygnal uVision DLL and test in the hardware its not that simple! I saw a commom method of generating the baud rate, but only works with the pre-defined frequencys, like 24500000/8 /4 /2 /1, but when i choose a frequency like 22150684 close to the 22118400, the formula doesnt give the right TH1, so i had to try different values with the help of comwatch application to see if i were close! Now i have my problem resolved, but thank you anyway. By the way i use the C51 v7.07 and S8051.dll v2.4 too! Cya!