I'm about to make a new revision of our hardware and the programmer wants a general way of detecting which hardware version his software is running on. This would enable him to have a unique code that runs on all different H/W versions. Are there any smart solutions to this? If I can get a full byte (256 combinations) that’s good, but at least 64.
Here are some options:
* Each H/W ver has a unique value on AD0.
* Clock in a value from PA0-PA2 using a mux.
* Always use PA0-PA7 to read a value. (Takes a lot of pins.)
* Store the H/W ver in EEPROM. (Not good solutions since it requires different hex files for each H/W version, what we are trying to avoid.)
Please, what is the standard way of doing this? Any suggestions are welcome.'