The purpose of this project is to demonstrate the use of a MAX232 with a Dual USART ATmega, specifically an ATmega644, but the concept applies to all AVR's that have dual USARTS. The MAX232 provides two RS232 transmitters and two RS232 receivers.
With a 20 MHz crystal you get more bang for the buck, but if you need the highest baud rates, you will need to slow it down by using a 14.7456 MHz or 18.4320 MHz. The following table lists baud rates and divisors with different crystal frequencies. (Assumes U2X = 1)
| Baud Rate | 14.7456 MHz | 18.4320 MHz |
|---|---|---|
| 9600 | 191 | 239 |
| 19200 | 95 | 119 |
| 38400 | 47 | 59 |
| 57600 | 31 | 39 |
| 76800 | 23 | 29 |
| 115.2k | 15 | 19 |
| 230.4k | 7 | 9 |
| 460.8k | 3 | - |
| 921.6k | 1 | - |
| 2.304M | - | 1 |
If you can live with non-standard baud rates, like when you are talking to another device of your own making, and don't have to worry about the outside world, you can get up to 2.5 MBaud with a 20 MHz crystal.