(Please use a subject line! Please don't send HTML mails.) "Gary Taylor" <[EMAIL PROTECTED]> wrote:
> Does anyone have a way (in firmware) to determine what crystal is > connect= ed to a ATmega128 ? I have 2 x different versions of > product in the field with 2 x different = crystal values, and need > to main the same code in both versions. You need some reference in order to do this. If you've got a 32 kHz async crystal attached, that would of course be the easiest way. If both clocks differ very much, you could perhaps try to use the EEPROM write timing as a reference. The EEPROM is specified to use 8448 cycles of the 1 MHz RC oscillator for a write operation. Finally, there's the obvious thing to do: if you've got two differen hardware revisions, use two different hardware IDs (like through pin strapping, or through some kind of serial number). -- J"org Wunsch Unix support engineer [EMAIL PROTECTED] http://www.interface-systems.de/~j/ _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list