| ??? 10/24/08 20:09 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#159320 - Different micros Responding to: ???'s previous message |
"I also use the upper limit of the flash for a little bit of "EEPROM" but this upper limit changes dependant on the processor type."
How about do a write then a read of the highest location, and then, depending on the result, identify the chip? Something like:
UpperAddr = HIGH_FLASH_ADDR;
*UpperAddr = Info;
Pause(); /* If needed for FLASH to program itself */
if(*UpperAddr == Info)
{
Micro = TypeA;
}else{
UpperAddr = LOW_FLASH_ADDR;
*UpperAddr = Info;
Micro = TypeB;
}
--Rich |
| Topic | Author | Date |
| Detecting MCU Model in code | 01/01/70 00:00 | |
| you can't get it, what I do is | 01/01/70 00:00 | |
| Another Way.... | 01/01/70 00:00 | |
| Different micros | 01/01/70 00:00 | |
| That's a good idea. | 01/01/70 00:00 | |
| Reading Flash doesn't work | 01/01/70 00:00 | |
| Definitely not reliable! | 01/01/70 00:00 | |
| do not know, but guess that ... | 01/01/70 00:00 | |
| Detecting MCU | 01/01/70 00:00 | |
| Why need to identify? | 01/01/70 00:00 | |
ADC noise | 01/01/70 00:00 |



