Hi,
Why not use a pin in the Atmel, connected to your Serial port, and pulse this pin at a known frequency. In your PC app see how fast/slow the pin pulses and send a correction Byte that you save in the eeprom and use in your main app. I've done something like this and it actually worked quite well. The thugs in the work shop could program the Chips without my help after a short Training.
Another solution would be to just scan through various osccal values looking at the Serial port waiting for a "known" character sequence. Find the lowest/highest values that work for the required frequency and choice an average value.
Regards
Ian Dobson
↧