View previous topic :: View next topic |
Author |
Message |
borg
Joined: 03 Mar 2005 Posts: 4
|
Posted: Thu Mar 03, 2005 5:46 pm Post subject: problem with rs232 communication |
|
|
Hi
Can anybody help me??
I have set the property baudrate on 9600 for the Atmega8535, but i can't get the right sended data on the Pc. On the Oszi i checked the bitrate and I recognized that it was approxmitally 1300.
How can i manage this problem
thanks and sorry for the bad english but i'm from germany
Uwe |
|
Back to top |
|
|
dswinscoe
Joined: 09 Feb 2005 Posts: 17 Location: London, UK
|
Posted: Thu Mar 03, 2005 7:12 pm Post subject: |
|
|
Check that the speed on your crystal matches the crystal setting for the compiler. I spent ages trying to sort out a problem with serial communication about a month ago only to find that the crystal on the board was 8MHz and the frequency I had set in the compiler was 4MHz. (I cannot read component values without a magnifier these days ). |
|
Back to top |
|
|
borg
Joined: 03 Mar 2005 Posts: 4
|
Posted: Thu Mar 03, 2005 9:57 pm Post subject: |
|
|
No thats not the problem!!
I checked all the speeds. if I use the same configuration for a At90S8535 it works, but when I chose the m8535 and programm the other chip it doesn't work! and the oszi shows another bautrate! |
|
Back to top |
|
|
Luciano
Joined: 29 Nov 2004 Posts: 3149 Location: Italy
|
Posted: Thu Mar 03, 2005 11:16 pm Post subject: |
|
|
Hi,
Our crystal balls are covered with white frost!
Post your code and tell us the quartz oscillator frequency.
If you have set the baudrate to 9600 and you get 1300, then
you are using the internal oscillator at 1 MHz instead of your
external quartz oscillator running at 7.3728 MHz.
Best regards,
Luciano |
|
Back to top |
|
|
ATIU
Joined: 15 Oct 2004 Posts: 534
|
Posted: Fri Mar 04, 2005 12:20 am Post subject: |
|
|
Set fuse bit to use external xtal, most of the newer uC are factory set with internal RC osc as default. |
|
Back to top |
|
|
borg
Joined: 03 Mar 2005 Posts: 4
|
Posted: Fri Mar 04, 2005 3:37 pm Post subject: |
|
|
Hi
Thanks a lot! We solved the problems, it was the fusebit and the atmel used the internal frequency of 1MHz
Bye Uwe |
|
Back to top |
|
|
|