EM just enables the external oscillator and x 4 PLL, so whatever EM you put the processor runs at 4 times the speed of the crytal fitted.Hi Nick,
What would I use for the serfreq command? something like setfreq em8 and then use this crystal,
or is there much more to it?
regards john
If your using the hardware UART, you should be able to 'fine tune' the PICs baud rate registers by a bit of pokesfr. By setting the PIC registers appropriatly you can get the baud rate fairly close.I would like to use a 19.6608MHz so that in theory the baud rates should be
closer in tolerance
You can also use my calculator to calculate the error and hsersetup value from different baud rates and frequencies if you're using hardware serial.I would like to use a 19.6608MHz so that in theory the baud rates should be
closer in tolerance.
The error is not the data error itself, it's the percentage timing error from perfect. As you say the tolerance is 6%, then anything with an error of less than 6% will work.Does the calculator take into account that UARTS' take their data reading from the centre of a bit time and not on leading edges, thereby enabling quite a wide tolerance on bit-rates before a data error starts to occur. In effect the cumulative error from the 1st bit to the 8th bit if it's a normal 8-bit data payload. My experience is the tolerance before data errors is at least 6%. A simple spreadsheet model soons provides confirmation.