Re: Re: RS232 Baud Rate questions
>"If you need continuous processing but not very fast then you can go
>a slow 32.768KHz crystal. You'll still be able to use the UART at say
>If I stick with my internal RC for clocking and RS232 using 32.768kHz
xtal, can I still get 19.2kbps? cos I need to achieve this >speed for my
project. My microP is only turned on in a period of time say 15mins
The UART must be run from the main crystal oscillator (I believe,
double check on the data sheet), that rules out a 32.768KHz crystal. You
will need a 1MHz crystal or greater.
If you only have to wake up once every 15minutes then you can save
serious power by using the sleep modes available. The data sheet will
explain what modes you can use. What triggers your micro into doing
something once every 15min?
>One more question, I'm thinking of using chip cap(0805) for my RS232
interface chip instead of electrolytic cap. Would there >be any issue
with my RS232?
You will need a specific RS232 that supports 0.1uF capacitors (MAX202
for instance). The standard ones need large value caps you most likely
can't get in 0805.
> The UART must be run from the main
> crystal oscillator ... that rules
> out a 32.768KHz crystal. You will
> need a 1MHz crystal or greater.
Considering this is the only thread running, it's getting pretty
fragmented and confused. Let's recap:
* We have an ATmega8535, (which is similar to an ATmega16).
* Power consumption and size are important, so we want to run from
the internal calibrated RC oscillator.
* We need to run the RS232 interface at 19.2 kbit/s.
This is the suggestion I have made (which has been ignored, so I'm
making it again with more detail):
* Go ahead and run from the internal RC oscillator.
* Connect a 32.768 kHz watch crystal to TOSC1 and TOSC2.
* Set the U2X bit, so you need a UART clock of 19.2 * 8 = 153.6 kHz.
* Using a timer running from the timer oscillator and another timer
running from the main clock, calibrate the main clock. You can aim
for either 921.6 kHz or 1075.2 kHz, whichever is easier to get to.
* Set the UART bit rate divider to 5 or 6, depending on your choice
* Recalibrate as necessary to cope with temperature-induced drift.
* See the Butterfly for details on how this can be done.
Can anyone see a problem with this?