Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDP function for different chip size #3

Open
elrie opened this issue May 18, 2018 · 3 comments
Open

SDP function for different chip size #3

elrie opened this issue May 18, 2018 · 3 comments

Comments

@elrie
Copy link

elrie commented May 18, 2018

Hi!

For different chip size different addresses have to be used for SDP enable/disable regarding to datasheets.
Now there are hardcoded addresses only for 28C64

For example for AT28C256 code should look like:

  if (bWriteProtect)
  {
    WriteByteTo(0x5555, 0xAA);
    WriteByteTo(0x2AAA, 0x55);
    WriteByteTo(0x5555, 0xA0);
  }
  else
  {
    WriteByteTo(0x5555, 0xAA);
    WriteByteTo(0x2AAA, 0x55);
    WriteByteTo(0x5555, 0x80);
    WriteByteTo(0x5555, 0xAA);
    WriteByteTo(0x2AAA, 0x55);
    WriteByteTo(0x5555, 0x20);
  }

@JOliverasC
Copy link

Yes, these addresses work the same for smaller (less capacity) EEPROMS. They lost the most significant bits because the EEPROM have not upper address lines)
I put these changes in the branch https://github.com/JOliverasC/eeprom-writer with other changes (Chip erase by software and Page Write mode for memories supporting those features)
Also there is a clone of Windows utility for EEPROM Writer http://danceswithferrets.org/geekblog/?p=924 with source code at https://github.com/JOliverasC/-eewriter

@69K-ram
Copy link

69K-ram commented May 8, 2022

I wish I had looked here before spending hours debugging.
I can confirm, for the AT28C256-15PC, the Software Protection code is different.
WriteByteTo(0x5555, 0xAA);
WriteByteTo(0x2AAA, 0x55);
WriteByteTo(0x5555, 0x80);
WriteByteTo(0x5555, 0xAA);
WriteByteTo(0x2AAA, 0x55);
WriteByteTo(0x5555, 0x20);

@malcrom
Copy link

malcrom commented Jul 6, 2023

Thank you so much for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants