如题,求高手指点。对datasheet中关于波特率设置的部分有些疑问,其中round是指?
Low-Frequency Baud Rate Mode Setting In the low-frequency mode, the integer portion of the divisor is realized by the prescaler:
UCBRx = INT(N)
and the fractional portion is realized by the modulator with the following nominal formula:
UCBRSx = round( ( N – INT(N) ) ´ 8 )
Incrementing or decrementing the UCBRSx setting by one count may give a lower maximum bit error for any given bit. To determine if this is the case, a detailed error calculation must be performed for each bit for each UCBRSx setting.
Oversampling Baud Rate Mode Setting In the oversampling mode the prescaler is set to:
UCBRx = INT(N/16)
and the first stage modulator is set to: UCBRFx = round( ( (N/16) – INT(N/16) ) ´ 16 )
When greater accuracy is required, the UCBRSx modulator can also be implemented with values from 0 to 7. To find the setting that gives the lowest maximum bit error rate for any given bit, a detailed error calculation must be performed for all settings of UCBRSx from 0 to 7 with the initial UCBRFx setting and with the UCBRFx setting incremented and decremented by one.
Leon Yan:
你好:
这个round的意思是对括号里面的数进行四舍五入运算。
谢谢。