Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

problem with rs232 communication

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
borg

Bascom Member



Joined: 03 Mar 2005
Posts: 4

PostPosted: Thu Mar 03, 2005 5:46 pm    Post subject: problem with rs232 communication Reply with quote

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
View user's profile Yahoo Messenger
dswinscoe

Bascom Member



Joined: 09 Feb 2005
Posts: 17
Location: London, UK

uk.gif
PostPosted: Thu Mar 03, 2005 7:12 pm    Post subject: Reply with quote

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 Sad ).
Back to top
View user's profile Visit poster's website
borg

Bascom Member



Joined: 03 Mar 2005
Posts: 4

PostPosted: Thu Mar 03, 2005 9:57 pm    Post subject: Reply with quote

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
View user's profile Yahoo Messenger
Luciano

Bascom Member



Joined: 29 Nov 2004
Posts: 3149
Location: Italy

blank.gif
PostPosted: Thu Mar 03, 2005 11:16 pm    Post subject: Reply with quote

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
View user's profile
ATIU

Bascom Member



Joined: 15 Oct 2004
Posts: 534

philippines.gif
PostPosted: Fri Mar 04, 2005 12:20 am    Post subject: Reply with quote

Set fuse bit to use external xtal, most of the newer uC are factory set with internal RC osc as default.
Back to top
View user's profile
borg

Bascom Member



Joined: 03 Mar 2005
Posts: 4

PostPosted: Fri Mar 04, 2005 3:37 pm    Post subject: Reply with quote

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
View user's profile Yahoo Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum