Baud Rate Generator
Use timer 1 overflow to generate serial data clock
- serial clock is 16x oversampled, i.e. baud rate x16
- SMOD bit (PCON register)
- 0: divides baud rate by 2
Typical timer 1 setup
- auto-reload timer
- reload value determines overflow clock rate
Baud rate calculation
- Clocks between overflows = clocks
- Overflow frequency =
- Baud rate (assuming SMOD = 1)
- Baud rate =
- Max Baud rate =
- TH1 value for 9600 baud =