• Please review our updated Terms and Rules here

Flash memory for homebrew system?

hmbrew

Experienced Member
Joined
Nov 27, 2009
Messages
98
Location
Western NY State
I'm starting to design my homebrew z80 system, and I got an interesting suggestion.

Instead of using sram for ram and eprom for my rom, it was suggested that I replace both with some sort of flash chip.

I'm not sure about replacing my ram with a flash chip, but using flash as a rom seems very tempting.

Advantages would include power savings and the ability to keep data when the power is off. Most of all, I wouldn't need to buy an eprom programmer. (Edit: or would I?)

Has anyone done something like this? Does anyone know what I would have to do to use/program flash memory? How would I program it?

I noticed that this was discussed on an N8VEM page as well, in the form of a concept for future development. What's the current status of this idea?

Edit: N8VEM page that I found is here: http://n8vem-sbc.pbworks.com/New-Builder-Ideas-for-Peripherals?SearchFor=flash+memory&sp=1
 
Last edited:
Hi! You certainly could use Flash, EEPROM, or NVSRAM for your homebrew computer but unless you have a true "front panel" capability in your system which allows "bootstrap without a ROM" manual code entry you'll still need a programmer of some sort to load the memory device.

It is a classic "chicken or the egg" situation. You have to get a boot program into the Flash, EEPROM, EPROM, or NVRAM in some fashion so that when you press reset or power up the CPU has some code to execute. A true front panel (like the PICE on the N8VEM wiki) would allow such a hard bootstrap without a ROM but you would have to manually enter the boot code into some form of semipermanent memory.

In my opinion, due to the programming algorithms involved I would choose EEPROM or NVSRAM to contain the boot block rather than Flash devices. I've considered making a PICE device available for N8VEM but haven't gotten to it yet since there hasn't been much need for true bootstrapping and there have been other higher priority projects.

With N8VEM SBC EPROM in place for bootstrap, the DSKY and ECB bus monitor perform almost all of the functions of the classic front panel like those associated with Altair and IMSAI systems. If a builder were to take on the PICE project and build a working prototype I would be willing to make a PCB which would "jumpstart" the whole board development process.

The neat thing is the PICE design is not unique to the N8VEM. It could be used in almost any Z80 based system. Building a prototype PICE is something you may to consider if you are interested in building your own system and having a true frontpanel is a priority.

Thanks and have a nice day!

Andrew Lynch
 
Okay, thanks both of you.

I'll have to do more research about "fram".

As for front panel capabilities, I don't plan to have that in my initial design but I might change my mind as I start to compare costs.

It would be really nice if I could avoid buying a special rom programmer. We'll see...
 
In my opinion, due to the programming algorithms involved I would choose EEPROM or NVSRAM to contain the boot block rather than Flash devices.

Andrew Lynch

Can you elaborate? I have a huge stock of Atmel 49F001A units here, and the programming algorithm is dirt simple. It does not require special voltages, and any RAM socket can be used to program.

hmbrew, As you guessed, FLASH won't replace SRAM, but I think FLASH is a great idea in lieu of EPROM. You can get 5V flash in JEDEC 32 PIN DIP format, or you can design a PCB to accommodate surface mount parts.

Andrew is correct that unless you have a front panel, you'd still need to key in an app to program the flash IC.

I'm not familiar with PICE, but that might be an option. Also note that cheap EPROM/FLASH programmers are $30.00 shipped anywhere in the world. A cheap EPROM programmer is not a bad tool for a homebrewer, in my opinion. However, if cost is a significant concern, I am sure there are dozens of folks on here that would program the FLASH IC for you and mail it to you.

If you go this route, I would lay out the circuit board to accept at least 1 32-pin DIP socket. That way, you can use an EPROM, FLASH, and I think there are 32 pin JEDEC compliant NVSRAM, so you'd have all the bases covered.

Jim
 
Can you elaborate? I have a huge stock of Atmel 49F001A units here, and the programming algorithm is dirt simple. It does not require special voltages, and any RAM socket can be used to program.

[snip]

Hi! Yes, the programming algorithm for the flash is probably simple but using a front panel to manually stuff the data into RAM means you'd need to execute the algorithm using the front panel alone. Putting values into SRAM, EEPROM, NVSRAM, etc does not require any programming algorithm and would be just your basic CPU READ/WRITE cycle.

Flash programming varies by device but usually is done in blocks of 128 bytes at a time in a specific time sequence or in some other fashion. In general, Flash is going to be more complex than EEPROM, SRAM, or NVSRAM to program although there may be exceptions which allow individual bytes to be programmed.

My personal preference is to use EPROM since that is clearly ROM and almost indestructable once in circuit. More than once, I've had programs go insane due to bugs and trash NVSRAM, EEPROM, SRAM, or other "semipermanent" but still writeable memories.

Thanks and have a nice day!

Andrew Lynch
 
Wow, that's alot of info. Thanks again everybody.

I'll keep reading up on this, and I'll start doing the real design work in January when I'm on break from college.

I'm sure that once I start piecing together a real design, the ideal option will become more obvious. I might have to invest in an eprom programmer eventually anyway since I plan to build more, but I'll need time to think about it.

I haven't looked into building a "front panel" system at all, but it sounds like a plausible solution.
 
Hi! I could I offer a suggestion? Build an N8VEM SBC and make a prototype PICE for it. That way you can enjoy building your own homebrew computer *and* help make a device that other builders would benefit.

I think we could help each other out here. If you'll commit to finishing the project, I'll send you an SBC PCB gratis. I would like a demonstrated working prototype PICE so I can make a PCB available. However, I am severely overbooked in terms of projects and it will be several months before I get to building a PICE prototype.

Please PM me if interested. Thanks and have a nice day!

Andrew Lynch
 
Well, I'm grateful for the offer. But I've sorta committed to this other project already. I'm aiming to finish building my own initial design before the summer break. (after that, it will be one of those "continuous improvement" type projects)

If the PICE is not completed by the time I get my own SBC working, I will certainly consider doing that and I do plan to build an N8VEM anyway. It seems like a great and versatile project to build, but I need to finish my own system first.
 
Hi! Yes, the programming algorithm for the flash is probably simple but using a front panel to manually stuff the data into RAM means you'd need to execute the algorithm using the front panel alone. Putting values into SRAM, EEPROM, NVSRAM, etc does not require any programming algorithm and would be just your basic CPU READ/WRITE cycle.
I agree I would not recommend a FLASH programmer as a toggle-in. I was thinking toggle in a small RS232 to RAM app, send the code via RS232 and then exec it. I would do that even if boot block were NVSRAM, etc.
Flash programming varies by device but usually is done in blocks of 128 bytes at a time in a specific time sequence or in some other fashion. In general, Flash is going to be more complex than EEPROM, SRAM, or NVSRAM to program although there may be exceptions which allow individual bytes to be programmed.
If you do a "full erase" on a 49F, the programming is very straightforward:

0xXX 0xXX 0xXX: erase magic bytes
0xXX 0xXX 0xXX <data>: write magic bytes and variable length data

So, it takes about 6-8 additional writes to the 49F to write data to it, but little else. I do agree older 28/29 series probably had more complex ways to do this.
My personal preference is to use EPROM since that is clearly ROM and almost indestructable once in circuit. More than once, I've had programs go insane due to bugs and trash NVSRAM, EEPROM, SRAM, or other "semipermanent" but still writeable memories.
I can't argue that point per se, but I'm finding DIP-based EPROM to be overly expensive given the size. For the same price as a regular 28 or 32 pin EPROM (new) I can build a 49F001AN SMT on a PCB with a 28 pin header, and additional lines for bank switching:

http://www.jbrain.com/vicug/gallery/ROM-el

Jim
 
Back
Top