Hi, I hope I'll get the answer here. Please tell me why do we divide by 32, when using the timer for serial communication to calculate the baud rate?

Thanks,

The baud rate in bits/sec is the timer overflow frequency divided by 32. It has to be divided by some number because the timer works faster than the standard serial port baud rates. It;s divided by 16 if SMOD is set which doubles the baud rate.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.