Forum Discussion
Altera_Forum
Honored Contributor
15 years agoProblem with the baud rate
I'm studying NiosII these days, and I'm confused with the baud rate of the UART. In the Altera's user guide, the relation among baud rate, frequency and divisor is given by divisor=int(frequency...
EClose
New Contributor
5 years agoI used an oscilloscope to settle this. Equation (2) is correct, but equation (1) should be:
divisor=int((frequency/baud rate)-0.5)
As others noted, typically this won't make much of a difference unless your divisor is small (ie. less than 40). Note that NIOS SOPC builder incorrectly uses equation (1) with the + 0.5 so that your baud rate will be slower than ideal. I'm not sure if this has been corrected in later versions.