On 29.12.2016 23:16, Maarten Brock wrote: > > These values get you a 453 baudrate: > 24.5MHz / 8 / (256-45) / 32 = 453 > > 300 baud is really low and impossible to achieve with T1 in 8-bit > autoreload. Most USB-UARTs even have this as their lower level limit.
The 43 in the posted example was wrong. But the timer uses a prescaled sysclk giving another division by 12, thus I can do: 24.5 * 1000000 / 8 / 12 / (256-229) / 32 = 295.38 when running at 3.0625 Mhz and 24.5 * 1000000 / 12 / (256-43) / 32 = 299.54 when running at 24.5 Mhz. The former didn't work for me (it is off from 300 by 1.54%), but the latter did (off from 300 by 0.15%). Philipp ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user