[Request] (Really portable/tiny) USB SRAM programmer

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
[Request] (Really portable/tiny) USB SRAM programmer
by on (#89861)
Hi Guys,
I need some help:
I would like to build my own (really portable/tiny) USB SRAM programmer,
which can at least program 6264 SRAMs, but I'm not talented enough (or have got any knowledge)
on how something like this is realizable.
So, I hope some of you who are familiar with this topic can help me out.
Thanks in advance^^

by on (#89866)
PIC project? You'd need a medium sized pick though. What the heck would you program them with anyway?

by on (#89867)
I made a pretty small one using an atmega8 and a 8x flipflop to test things out for the NESDEV1. It really doesn't have a limit to how big the memories can be if you just keep adding flipflops to IO extend. I just adapted this I2C programmer to work with SRAM: http://xldrx.com/xl/EE-Prog.html

Here's the schematic basically:
Image

Code is here: http://dl.dropbox.com/u/18341918/AVR%20atmega%208.zip

The code is pretty messy as I gunked it up when I was debugging, and then didn't clean things up until I adapted it to the kazzo. I did try to comment it as much as I could though. But it's a good starting point if you don't have much experience with it. Don't count on it working as is you'd have to tinker with it a bit and clean things up. You'll also have to modify the host code to support things other than 8KB I just moved A5 in the schematic around and hardcoded it to 8KB. Also reading has not been implemented.

I put a video of it in action too: http://www.youtube.com/watch?v=jYlYKQpxwA4&feature=plcp&context=C3256575UDOEgsToPDskJtYmVeTlojgob9G0KcgyfO

by on (#89870)
infiniteneslives wrote:
I made a pretty small one using an atmega8 and a 8x flipflop to test things out for the NESDEV1. It really doesn't have a limit to how big the memories can be if you just keep adding flipflops to IO extend. I just adapted this I2C programmer to work with SRAM: http://xldrx.com/xl/EE-Prog.html

Here's the schematic basically:
Image

Code is here: http://dl.dropbox.com/u/18341918/AVR%20atmega%208.zip

The code is pretty messy as I gunked it up when I was debugging, and then didn't clean things up until I adapted it to the kazzo. I did try to comment it as much as I could though. But it's a good starting point if you don't have much experience with it. Don't count on it working as is you'd have to tinker with it a bit and clean things up. You'll also have to modify the host code to support things other than 8KB I just moved A5 in the schematic around and hardcoded it to 8KB. Also reading has not been implemented.

I put a video of it in action too: http://www.youtube.com/watch?v=jYlYKQpxwA4&feature=plcp&context=C3256575UDOEgsToPDskJtYmVeTlojgob9G0KcgyfO

thx, this is exactly what i needed^^
but is it possible to get a picture of your schematic that is more clearly because it is hard to read some numbers and parts.
and is it possible to use 62256 without modification of the program or the schematic?

by on (#89885)
aliman wrote:
thx, this is exactly what i needed^^
but is it possible to get a picture of your schematic that is more clearly because it is hard to read some numbers and parts.
and is it possible to use 62256 without modification of the program or the schematic?


That's all I got... Take a look at the original schematic of the EEprog I linked to. I'll strongly caution again, this is no where close to polished... I'd like it to be as I want to make my own programmer with it for all the memories I'd like to use, but it's a low priority. Things will NOT work as I've posted, you'd have to work on some things for yourself really.

As for components the D- (white) pull up resistor should really be 2.2Kohm(even though it says 1.5K), the series usb resistors are 68ohm, and the zeners are 3.6v 500mA or less diodes. Any large power cap should do. I used a 16Mhz xtal but you could also go with 12Mhz. There should also be ~20pF caps on the two xtal pins going to ground. The flipflop is a 54HC374 8x flipflop. The design in the schematic supports up to 16KB, but I modded the schematic from what you see here and put A5 on the flipflop. That's how the code is written, as is, it ONLY works with 8KB since that's all I cared about for this proof of concept.

If you reaproriated the LED pin as A6 and shifted all the Flipflop addresses by one you could do 32KB for your chip. I only had one pin for /OE and /CE in the schematic, just hardwire is as you like was my thought. You could even ditch the /WE pin and just hardwire the SRAM's pin to gnd or put a switch in there. If you did all that you could do 64KB. To go beyond that without disabling the reset on the AVR you'd have to add a flip flop or just program one page at a time or something. Just adding another set of FFs would add support for 32Mb (4MB).

Keep in mind you not only have to fix the schematic and mcu code but also the host application because the pages sizes aren't setup for this stuff.

by on (#90770)
I've recently been experimenting with programming some EEPROMs using an Arduino and a breadboard. So something based on an AVR could definitely work. Although using a smaller MPU and a shift register is probably the better method.

by on (#90771)
I'm working on making a cleaner more finished version of this using the atmega 8515. It's a 40pin DIP and already has built in external memory interface and can address 64KB by adding a 8x Flipflop.

That and the ports aren't all hacked up and incomplete as with the atmega8 and similar parts. So the code is simpler since you can write to the data bus in one instruction vice 3-4.

Not sure how I'm going to publish the design right now but I'll make it available on here at least.

by on (#90822)
The Arduino I'm using has a ATmega2560. It also has an (optional) external memory interface. While reading the datasheet, I noticed it and figured it would make writing the memory easier than my current scheme using GPIOs. I haven't bothered to see which pins the Arduino's got it all mapped to though. Hopefully it's something usable.

Do you write your AVR code in assembler or C?

I wish the Western Design 6502 MPUs where actually available. Or something similar from someone else. If I could get a 6502 core with internal SRAM, Flash, and some GPIOs, I'd be all over it.

by on (#90830)
Karatorian wrote:
The Arduino I'm using has a ATmega2560. It also has an (optional) external memory interface. While reading the datasheet, I noticed it and figured it would make writing the memory easier than my current scheme using GPIOs. I haven't bothered to see which pins the Arduino's got it all mapped to though. Hopefully it's something usable.

Do you write your AVR code in assembler or C?

I would imagine that it is available on the arduino but you'd have to check obviously.

I write in C for the most part. I've done some projects in assembly in the past for school projects. But for personal projects there is rarely value in using assembly.


Quote:
I wish the Western Design 6502 MPUs where actually available. Or something similar from someone else. If I could get a 6502 core with internal SRAM, Flash, and some GPIOs, I'd be all over it.


How are they not available? http://www.jameco.com/webapp/wcs/stores/servlet/StoreCatalogDrillDownView?langId=-1&storeId=10001&catalogId=10001&freeText=western%20design&search_type=jamecoall

Or are you looking for some specific version Jameco doesn't carry?

by on (#90831)
infiniteneslives wrote:
How are they not available?

Sorry, I wrote MPUs when I mean MCUs. Mouser actually has some of the 65C816S based W65C265S chips. But the thing is, they're mask ROM devices. I have no idea what's in the ROM of the chips they've got for sale, but it's probably not what I'd want. Every other 65x MCU I've been able to find has either mask ROM or is OTP. Know anyone with a semi fab?

by on (#90837)
Karatorian wrote:
infiniteneslives wrote:
How are they not available?

Sorry, I wrote MPUs when I mean MCUs. Mouser actually has some of the 65C816S based W65C265S chips. But the thing is, they're mask ROM devices. I have no idea what's in the ROM of the chips they've got for sale, but it's probably not what I'd want. Every other 65x MCU I've been able to find has either mask ROM or is OTP. Know anyone with a semi fab?


According to WDC's site it is "8192 x 8 Embedded Monitor ROM". I guess that could be useful, but it sounds like external memory is needed to do anything beyond the 576 bytes of on-chip SRAM.

I don't think you need a chip fab to make a good replacement, actually that's part of one of my future projects. I would just write a 6502 interpreter/emulator for a different CPU. A few years ago I started to code one for the Propeller MCU, but I axed it because I switched over to using the (5V-compatible) PIC32 instead (and totally re-imagining the entire project, heh).

Propeller version could have been pretty funny.. it has to fit in 2kB, but then you can have 8 of them running parallel (with 32kB shared RAM among them, and a smaller amount of RAM for the individual 6502's stack and stuff). The code I have for it is just a skeleton, but looks like I was on track to use about 1024 bytes for data which would leave another 1024 for code (so 256 32-bit instructions, self-modifying code of course).

Doing it on the PIC32 sounds less exciting, but will be more useful for my purposes.