Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Software UART question

 
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
Alexander

Bascom Member



Joined: 24 Jun 2005
Posts: 18
Location: Germany

germany.gif
PostPosted: Thu Apr 03, 2008 1:51 pm    Post subject: Software UART question Reply with quote

Hello experts,

I want to send serial data via the software UART. The data to be sent consists only of a few command strings, e. g. there is no constant data flow. I've already done this with a serial LC display at 9.6kBaud. Now I need 115,2kBaud.

Is it realistic to get 115,2kBaud with the SW-UART using a Mega32 with 8 or 16MHz?

Thanks for your help.
Alexander
Back to top
View user's profile
ecoology

Bascom Member



Joined: 07 Nov 2006
Posts: 340
Location: USA - California

usa.gif
PostPosted: Thu Apr 03, 2008 4:11 pm    Post subject: Reply with quote

According to Bascom, when you select 115.2k baud rate, and 16 mHz, you get a 7.84% error rate. I would call that unacceptable and unrealistic.
Back to top
View user's profile Visit poster's website
entry2

Bascom Member



Joined: 29 Jul 2006
Posts: 51

germany.gif
PostPosted: Thu Apr 03, 2008 7:36 pm    Post subject: use other crystals as 8 or 16 MHz Reply with quote

Dear Alexander,

if you can/have, use 7,3728 / 9,8304 / 11,0592 / 12,?? / 14,7456 MHz.

Look by farnell or digikey (or segor) and buy.

If you divide the top MHz then you must have a real count without comma (ganze Zahl).

I use at moment a 7,3728 MHz crystal and it works with an ATmega168 (SW UART).

A tip: don't use long stings to send, because many interupt's can destroy the sending data.

MfG Stefan
Back to top
View user's profile Visit poster's website
Alexander

Bascom Member



Joined: 24 Jun 2005
Posts: 18
Location: Germany

germany.gif
PostPosted: Thu Apr 03, 2008 7:57 pm    Post subject: Reply with quote

Hello Stefan,

thanks for your answer. I'm totally free with the choice of the oscillator frequency, so I can also use a 14,7456 MHz crystal to get the correct baud rate.

My concern was that the Software-UART might not be fast enough for the 115,2kBaud. The strings to be sent are short, e. g. pos=5, nothing more.

Regards,
Alexander
Back to top
View user's profile
Arera

Bascom Member



Joined: 23 Sep 2007
Posts: 375
Location: Wuppertal, Germany

germany.gif
PostPosted: Fri Apr 04, 2008 9:20 am    Post subject: Reply with quote

Hi Alexander,

befor sending strings, have a look at this topic:
http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=5267
Skip the first page, the last 3 or 4 replies are the most important.

Be clever:
say NO to Strings! Join the Anti-String Coalition and do the 12 step program.
Visit www.justsayno2strings.com today (donations accepted)
Back to top
View user's profile
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