TomNisbet / TommyPROM

Simple Arduino-based EEPROM programmer
https://tomnisbet.github.io/TommyPROM/
143 stars 29 forks source link

Writes failing on some Atmel 28C256 chips #17

Closed TomNisbet closed 3 years ago

TomNisbet commented 3 years ago

Some Atmel AT28C256 chips are showing random write failures. This can be seen using the W command to send XModem data or just by filling a large memory area with the F command. The failures are not consistent - the chip may fail once and then write the same location correctly on the next attempt. Observed with multiple AT28C256-12PU chips with a date code of 1747 while another set of chips with date code 1636 showed no problems. Also see this reddit thread: https://www.reddit.com/r/beneater/comments/j8lvq8/cannot_get_tommyprom_to_work/?utm_source=share&utm_medium=web2x&context=3

TomNisbet commented 3 years ago

The writes are completing successfully, but the code in PromDevice28C::waitForWriteCycleEnd is timing out without reading back the correct value. The existing code is leaving the CE line enabled for the entire readback loop and pulsing only the OE line to perform a new read operation. Pulsing both OE and CE for each read fixes the problem. This is a better match to the waveforms in the datasheet.