1,105,226 Community Members

8051: Why do we divide by 32, when using the timer for serial communication?

Member Avatar
Samran
Newbie Poster
21 posts since Mar 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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,

Member Avatar
Colin Mac
Posting Whiz
327 posts since Sep 2006
Reputation Points: 53 [?]
Q&As Helped to Solve: 22 [?]
Skill Endorsements: 0 [?]
 
0
 

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.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article