Need help with building 28c256 programmer with an arduino

For discussing the 65xx hardware itself or electronics projects.
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Need help with building 28c256 programmer with an arduin

Post by 8BIT »

FYI, I'm coming in a little late, but I dug up my EEPROM unlock code and mine matches what you were doing.

Code: Select all

 writeByte(0xAA,0x5555);
  writeByte(0x55,0x2AAA);
  writeByte(0x80,0x5555);
  writeByte(0xAA,0x5555);
  writeByte(0x55,0x2AAA);
  writeByte(0x20,0x5555);
One thing though, I recall you saying you were not using A14 and that you had tied it to Vcc. If that is the case, you unlock code was actually writing to 0x6AAA vs. 0x2AAA, and it would have not worked. New EEPROM's typically come unprotected. I had several EEPROMs that were pulled from an old Telephone PBX and those actually had the software protection enabled. I too pulled my hair out over why my writes were not working until I tried the unlock code. Worked fine after that.

I'm glad you have worked out the problem. Good luck with your projects!

Daryl
Please visit my website -> https://sbc.rictor.org/
backspace119
Posts: 346
Joined: 25 Jan 2019
Location: Knoxville, TN

Re: Need help with building 28c256 programmer with an arduin

Post by backspace119 »

8BIT wrote:
FYI, I'm coming in a little late, but I dug up my EEPROM unlock code and mine matches what you were doing.

Code: Select all

 writeByte(0xAA,0x5555);
  writeByte(0x55,0x2AAA);
  writeByte(0x80,0x5555);
  writeByte(0xAA,0x5555);
  writeByte(0x55,0x2AAA);
  writeByte(0x20,0x5555);
One thing though, I recall you saying you were not using A14 and that you had tied it to Vcc. If that is the case, you unlock code was actually writing to 0x6AAA vs. 0x2AAA, and it would have not worked. New EEPROM's typically come unprotected. I had several EEPROMs that were pulled from an old Telephone PBX and those actually had the software protection enabled. I too pulled my hair out over why my writes were not working until I tried the unlock code. Worked fine after that.

I'm glad you have worked out the problem. Good luck with your projects!

Daryl
Thanks for confirming this. I actually tied A14 to the next free pin I had just so I could try the unlock sequence, if you look at the defined variables up top, you'll see A13 is pin 35 and then A14 is pin 47.

As it turns out it may have been *because* I was attempting to write this string of values to it as soon as I got the arduino up that caused me this trouble in the first place. I moved it below a bunch of reads and everything started working.
backspace119
Posts: 346
Joined: 25 Jan 2019
Location: Knoxville, TN

Re: Need help with building 28c256 programmer with an arduin

Post by backspace119 »

It would actually seem I'm back to it not writing today, although at this point I'm pretty confident I can get it to write again, I'm just not sure what's causing the inconsistency....

When I figure out why it wrote last night but not today I'll report back here.
backspace119
Posts: 346
Joined: 25 Jan 2019
Location: Knoxville, TN

Re: Need help with building 28c256 programmer with an arduin

Post by backspace119 »

Ok, this chip is definitely gaslighting me. It worked last night, the last thing I did was power cycle the arduino to check and make sure values were presisting, which they were. I then unplugged the arduino and went to bed, got up today, plugged it back in, have power cycled it a bunch of times since then, burned new code, done tons of stuff, but for some reason it refuses to write again.
backspace119
Posts: 346
Joined: 25 Jan 2019
Location: Knoxville, TN

Re: Need help with building 28c256 programmer with an arduin

Post by backspace119 »

And it writes again!

So, I think I might know the issue now, or at least partially know it.

I got it to write again by unplugging the arduino, removing the chip from the breadboard, plugging the arduino back in, letting it do its bootup sequence, then dropping the chip on, calling my new "Read All" command, and then writing (without having to do SDP unlock).

This leads me to believe the arduino bootup sequence is sometimes putting the chip into some invalid state that is messing with the internal timers for writing. Bottom line, I need a ZIF socket and a PCB for this.
backspace119
Posts: 346
Joined: 25 Jan 2019
Location: Knoxville, TN

Re: Need help with building 28c256 programmer with an arduin

Post by backspace119 »

Ok, now I think I've got a NOP generator tied on, it is effectively this:

EEPROM starts at 0xC000 on my machine

Startup vector: 0x00 0xC0

EEPROM addresses (so 0x00 == 0xC000 on my machine)
0x00: 0xEA (NOP)
0x01: 0x4C (JMP #add (absolute))
0x02: 0x00 (low byte of address)
0x03: 0xC0 (high byte of address)

Does this look good? If so, when I get the clock generation chip in today I'm plopping this bad boy on and taking it out for a spin.

EDIT: to clarify, I've written these addresses starting at 0x4000 on the EEPROM, since I'm only using half of it, and that's the upper half (my machine ties A14 high)
backspace119
Posts: 346
Joined: 25 Jan 2019
Location: Knoxville, TN

Re: Need help with building 28c256 programmer with an arduin

Post by backspace119 »

I can probably get the emulation mode LED to toggle if I put a bunch of NOP then invert the emulation bit, then loop back to the beginning too. This is the fun part I've been waiting for all this time! I should probably hop back on my original thread for talking about programming, or even start a new one though.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Need help with building 28c256 programmer with an arduin

Post by BigEd »

New thread's a good idea.
backspace119
Posts: 346
Joined: 25 Jan 2019
Location: Knoxville, TN

Re: Need help with building 28c256 programmer with an arduin

Post by backspace119 »

BigEd wrote:
New thread's a good idea.
New thread it is then.

EDIT: new thread is here
Post Reply