Hello all,
A further question concerning the arbiter -
Does anyone know if the counter continues to count (from zero) once the overflow bit AROVFL bit is set? If it does, this would effectively give a 10-bit counter, and could be very useful for lower baud rates.
An observation re measurement of bit period. If the ACLK=1 mode (pulse width measurement) is used, for any received character with an odd ASCII value, and assuming the arbiter counter is cleared during the previous receive ISR, the arbiter should measure the period of the start bit. For the ACLK=0 mode (negative edge to negative edge), the number of bit periods measured will have more variation, depending on the received character, and would always be at least two bit periods, including the start bit - not quite as useful.
However, for tha ACLK=1 mode, the nominal count per bit period will depend on the baud divisor (BD) value, but will be independent of the FD prescaler setting. Since the nominal count value would be 16*BD (assuming BPD=1), the value of BD should not be less than 4 in order to reduce the baud measurement uncertainty to better than plus/minus 1 percent.
For automatic adjustment to allow for internal oscillator drift, I believe a simple strategy would be to increment or decrement the SCPSC prescale register value, to maintain a measured bit period value of 16*BD.
Regards,
Mac
Message Edited by bigmac on 2006-09-18 03:15 PM