Hi All, Where it is preferable to store log/history parameters: in FLASH or in on-chip EEPROM ?
I am using AT89C51ED2 8-bit MCU from Atmel. It has 2k EEPROM on-chip and 64kB Flash. EEPROM programming features:
1) On-chip 2048 Bytes EEPROM. 2) Supports only Byte programming ( no page programming). 3) Programming of each byte 10msec-17msec(Atmel says). 4) 100K write cycles.Flash programming features:
1) 64Kb Flash, organized in 512 pages of 128 bytes. 2) Byte or Page erase and programming (10msec) 3) 100K write cycles.My code takes about 30kB in Flash.So half of Flash is empty. The parameters which should be maintained in non-volatile memory take about 30bytes.
It seems to me that using Flash for storing log data is preferable in this case than using EEPROM. The main reason is that programming 30 bytes in EEPROM takes more than 300 msec whereas programming 30 byutes in Flash takes only 10 msec! And if data grows up to 128 bytes it still remains 10 msec when using Flash.
The only disadvantage is that care must be taken when programming Flash to not erase the log area. And except this I don't see any problem using Flash.
What do you think of it?