View previous topic :: View next topic |
Author |
Message |
Alexander
Joined: 24 Jun 2005 Posts: 18 Location: Germany

|
Posted: Thu Apr 03, 2008 1:51 pm Post subject: Software UART question |
|
|
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 |
|
 |
ecoology
Joined: 07 Nov 2006 Posts: 340 Location: USA - California

|
Posted: Thu Apr 03, 2008 4:11 pm Post subject: |
|
|
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 |
|
 |
entry2
Joined: 29 Jul 2006 Posts: 54

|
Posted: Thu Apr 03, 2008 7:36 pm Post subject: use other crystals as 8 or 16 MHz |
|
|
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 |
|
 |
Alexander
Joined: 24 Jun 2005 Posts: 18 Location: Germany

|
Posted: Thu Apr 03, 2008 7:57 pm Post subject: |
|
|
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 |
|
 |
Arera
Joined: 23 Sep 2007 Posts: 386 Location: Wuppertal, Germany

|
|
Back to top |
|
 |
|