Hi David, (now on-list)
> To come back to the quartz: You've used a 14.7456 MHz xtal but my=20
> distributor hasn't got it. Is a 14.318 MHz also acceptable?
The choice of xtal frequency is mostly driven by how accurate you want =
the
baud rate of any serial comms to be. The thing is that this PCB can be =
used
for several things and so it may or may not matter what xtal you use. =
For
instance I've used 7.37, 8, 11.92, 10, 12, 14.74, 16 18.432 MHz xtals =
and it
seems to work ok for LocoNet.
The main issue is how close to a 60us clock tick can be achieved for the
LocoNet bit times and what error % do you get with the UART baud rates.=20
A quick check with AvrCalc.exe show that a 14.318 MHz xtal will generate =
a
60.006 us timer tick which is great for the LocoNet bit times but any =
baud
rate above 38400 will give an error larger than 3%. So if you don't want =
to
bother with any serial comms then you be fine. You'll just have to add a
line to the sysdef.h file for this xtal and recompile the code.
Alex
|