Re: serial communication
You must do what "real" uarts do:
1. Use the timer to generate interrupts (i.e., "raw clocks") at a frequency that is a multiple your baud rate. This will enable you to sample the serial input data bits near their centers. For example, suppose your raw clock is 16 times the baud rate. When a start bit leading edge is detected you will wait 8 raw clocks and then start the "bit clock." From that point on, the bit clock has the same frequency as the baud rate, so you get a new bit clock edge every 16 sample clocks, beginning in the middle of the detected start bit.
2. Implement what is effectively a state machine in your firmware. This is responsible for detecting the leading edge of the start bit. After the start bit is detected and the bit clock is running, you must sample a new serial input data bit on every bit clock edge. When you have all 8 (or however many data bits you are using) data bits, verify you get a valid stop bit and then transfer the byte to storage. If errors are detected during byte acquisition, discard the byte and wait for the next start bit.
Hope this helps!