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/(baud rate)+0.5)...................(1) baud rate=frequency/(divisor+1)...........................(2) but according to (2), divisor=frequency/(baud rate)-1, why is +0.5 in (1)? Besides, int the simulation settings, there is an "accelerated" item, in the user guide, it's described as "accelerated (use divisor = 2)—TXD emits one bit per 2 clock cycles in simulation." But according to (2), TXD emits one bit per 3 clock cycles, what's the problem?