6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Sep 21, 2024 2:45 pm

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: EEPROM Programmer
PostPosted: Wed Oct 16, 2019 11:22 pm 
Offline

Joined: Wed Oct 16, 2019 11:17 pm
Posts: 34
Hello everyone. I'm quite new to the 6502. I was inspired by Ben Eater's great YouTube video, and I'm having a lot of fun.

One thing I noticed right away was that I needed a way to easily program the AT28C256 in my design. I came up with a programmer based on the ESP32 that allows you to program it by putting your hex dump into a web page and sending to the EEPROM.

You can find my designs here: https://easyeda.com/rick_9005/eeprom-programmer_copy

It's still a work in progress, and things might change, but if you're interested in the code, let me know. I'd be happy to share it (I'm not a great programmer, and some decision were made because the design changed, but it does work--most of the time).

Rick


Top
 Profile  
Reply with quote  
 Post subject: Re: EEPROM Programmer
PostPosted: Thu Oct 17, 2019 6:23 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
Welcome! Good idea to use the ESP32 (cheap, and easy to program, I think.) And the bootstrapping problem - how to program your first EPROM - is always with us.

Please do share your code - ideally, put it up on github or gitlab, and ideally attach one or other of the usual licenses to it.


Top
 Profile  
Reply with quote  
 Post subject: Re: EEPROM Programmer
PostPosted: Fri Oct 18, 2019 12:28 am 
Offline

Joined: Wed Oct 16, 2019 11:17 pm
Posts: 34
Thanks, BigEd!

I'm not at the computer with the code on it "write" now (see what I did there?), so I'll post it later, but I will post it.

One thing I want to say is that I know the AT28C256 is 5V chip and the ESP32 is a 3v3 chip. The data sheet for the AT28C256 says 5v +- 10%, which is still more than 3v3. I figured, it couldn't hurt to try. The worst that would happen is that it wouldn't work. If it were the other way around, it would be a different story, but since I'm supplying less voltage, it would be OK. And it was.


Top
 Profile  
Reply with quote  
 Post subject: Re: EEPROM Programmer
PostPosted: Fri Oct 18, 2019 7:39 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
Oh, that's quite surprising, if you can program a 5V EPROM using a 3V3 system. It's possible the result will not be reliable, if it was unable to raise its internal voltage high enough. Might be worth programming the same contents two or three times. Or, just program it the once, but be on the lookout for decay of the memory contents. It would be bad to spend a long time trying to figure out a bug later, if the cause was that the ROM had lost a few bits.


Top
 Profile  
Reply with quote  
 Post subject: Re: EEPROM Programmer
PostPosted: Fri Oct 18, 2019 9:29 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
From the datasheet, MCP32S17 and MCP32S08 can operate at 5V.
ESP32 power supply is specified 3.6V max.

An option would be buffering the ESP32 SPI interface by placing 74LVC245 chips between the 3.3V powered ESP32 and the 5V powered MCP32S17\MCP32S08.
74LVC245 doesn't mind which side is 5V, so one could tie the DIR pin to GND or 3.3V when creatively arranging the 3.3V and 5V signals.

Example:

Attachment:
lvc245_example.png
lvc245_example.png [ 17.26 KiB | Viewed 1331 times ]

Edit: the 74LVC245 has to be 3.3V powered, of course.


Top
 Profile  
Reply with quote  
 Post subject: Re: EEPROM Programmer
PostPosted: Tue Dec 03, 2019 2:15 am 
Offline

Joined: Wed Oct 16, 2019 11:17 pm
Posts: 34
This is an old post, but I ended up giving up on the idea because when I tried to load a large program into the rom through the web interface, it failed to even load the web page. 32k is just too much to submit to the ESP32 over a simple web interface.


Top
 Profile  
Reply with quote  
 Post subject: Re: EEPROM Programmer
PostPosted: Tue Dec 03, 2019 1:06 pm 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 727
Location: Tokyo, Japan
BigEd wrote:
Oh, that's quite surprising, if you can program a 5V EPROM using a 3V3 system. It's possible the result will not be reliable, if it was unable to raise its internal voltage high enough. Might be worth programming the same contents two or three times. Or, just program it the once, but be on the lookout for decay of the memory contents. It would be bad to spend a long time trying to figure out a bug later, if the cause was that the ROM had lost a few bits.

It's always good to read back the ROM after it's programmed and verify that the contents match what you programmed.

_________________
Curt J. Sampson - github.com/0cjs


Top
 Profile  
Reply with quote  
 Post subject: Re: EEPROM Programmer
PostPosted: Tue Dec 03, 2019 2:59 pm 
Offline

Joined: Wed Oct 16, 2019 11:17 pm
Posts: 34
cjs wrote:
It's always good to read back the ROM after it's programmed and verify that the contents match what you programmed.


I agree. My code was setup to write data to the ROM and then read it back to verify it was done correctly.

I had another programmer I made with an ATMEGA328 and some SPI GPIO chips, but it was slow, and I've abandoned that, too.


Top
 Profile  
Reply with quote  
 Post subject: Re: EEPROM Programmer
PostPosted: Tue Dec 03, 2019 7:11 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8510
Location: Southern California
I think what Ed's getting at is that if it's on the raggedy edge of working, reading it back might give the right result and yet it may not be dependable later when for example temperature changes or a few months or a year or two go by.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: EEPROM Programmer
PostPosted: Tue Dec 03, 2019 7:26 pm 
Offline

Joined: Wed Oct 16, 2019 11:17 pm
Posts: 34
GARTHWILSON wrote:
I think what Ed's getting at is that if it's on the raggedy edge of working, reading it back might give the right result and yet it may not be dependable later when for example temperature changes or a few months or a year or two go by.


That could absolutely be true. For right now, I'm in it for the short haul. And I mean the 5 minutes it takes to run what's there, and then debug and reprogram to try and fix what didn't work.

But, like I said, I abandoned this programmer, and the other programmer I built, and bought a commercial one (T866II). It works much better than what I built, and, as you point out, it's probably much more reliable.

Rick


Top
 Profile  
Reply with quote  
 Post subject: Re: EEPROM Programmer
PostPosted: Tue Dec 17, 2019 8:21 pm 
Offline

Joined: Tue Jun 08, 2004 11:51 pm
Posts: 213
On my KIM-1 6530 replacement circuit, I needed to be able to do either 6530-002 and 6530-003 chips. So, I programmed the EEPROM right on my adapter with code on my debug monitor board. I just do it in place, on the KIM-1. You'd want to have a separate memory location for your programmer code though. It wasn't two hard to do. Most EEPROMs have software locks to protect from accidental over writing but I just used a jumper wire that can be cut.
Dwight


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: