Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use proper formula to calculate baud rate, use doublespeed mode if needed #7

Merged
merged 1 commit into from Apr 20, 2012

Conversation

pfalcon
Copy link

@pfalcon pfalcon commented Apr 19, 2012

Formula as given on page 174 of atmega168 datasheet (doc2545) of course
assumes real numbers and proper rounding. Using integers and truncation
makes 57600 the last working speed for Arduino Duemilanove, while proper
formula allows to work with 230400 (can't get higher due to Linux ft232
driver limitation).

Also, on higher baud rates, switch to double-speed mode to improve match
between atmega baud rate and standard baud rate values (see page 198),
otherwise 230400 doesn't really work due to high error.

Finally, allow to override baud rate from command line/*.mk file.

…eded.

Formula as given on page 174 of atmega168 datasheet (doc2545) of course
assumes real numbers and proper rounding. Using integers and truncation
makes 57600 the last working speed for Arduino Duemilanove, while proper
formula allows to work with 230400 (can't get higher due to Linux ft232
driver limitation).

Also, on higher baud rates, switch to double-speed mode to improve match
between atmega baud rate and standard baud rate values (see page 198),
otherwise 230400 doesn't really work due to high error.

Finally, allow to override baud rate from command line/*.mk file.
tobyjaffey added a commit that referenced this pull request Apr 20, 2012
Use proper formula to calculate baud rate, use doublespeed mode if needed
@tobyjaffey tobyjaffey merged commit 2afc45c into tobyjaffey:master Apr 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants