Hi,
I need to program an old 8051 board with an AT89C51CC03. I like to write my own interrupt driven serial port (UART) function without using some library function like printf() or putchar().
I get timer1 running and generating interrupts. I get the uart running and generating interrupts. But...
...one thing I don't understand: - on the one hand timer1 can be programmed somehow as a baudrate generator for the serial port? (how?) - on the other hand, the uart has it's own FUart Clock signal derived directly from XTal
I do not see where the connection lays between timer1 as a baudrate generator and the uart transceiver speed...
I searched through the uC datasheet many times and read many Internet articles but still did not found the answer.
Hope someone can help me out.
If I change the Timer1 preload value so Timer1 needs only 40 steps in stead of 80 to reload then the UART baudrate is doubled.
So Timer1 does somehow directly drive the UART clock speed.