Jump to content
Mariano DM

Building a 6502 breadboard computer, question about EEPROM

Recommended Posts

Hello.

I'm starting to follow ben eater's project of a minimal 6502 computer.

 

For the EEPROM part, I'm thinking on using SPI flash memory and figure out if there is an adapter to emulate those chips.

Have you ever emulate eeprom with flash? is that even possible ?

 

there is an eeprom emulator, but it uses a full arduino nano, maybe it is the next option.

 

Cheers.

M.

 

Share this post


Link to post
Share on other sites

It's certainly possible, but not easy.  SPI flash memory is serial, first of all, while the 6502 is parallel.  In addition, SPI flash memory uses memory access commands.  You don't just send an address and then data.  So a single, non-contiguous read consists of a read command (8 bits) followed by an address (some expected address length depending on chip size, possibly 20 bits at least).  Then you have to give a certain number of clocks to process the command, and finally you can read the 8 bits.  There are commands that allow for sending up to 4 bits at a time, and if you're new enough, you can even send them on both up and down transitions of the clock (DDR mode) to send/receive up to 8 bits per clock cycle.  But that still means you need memory access glue logic that is many times faster than the 6502, and also a bit complex.

 

Modern embedded processors have that memory access circuitry built in--just program the required commands, bit sizes, transfer sizes, bit sex, etc, and then memory access becomes completely transparent to the software.

Share this post


Link to post
Share on other sites
6 hours ago, ChildOfCv said:

Modern embedded processors have that memory access circuitry built in--just program the required commands, bit sizes, transfer sizes, bit sex, etc, and then memory access becomes completely transparent to the software.

Say what now? Do you mean 'parity'?

  • Haha 3

Share this post


Link to post
Share on other sites
16 hours ago, Mariano DM said:

For the EEPROM part, I'm thinking on using SPI flash memory

Here’s the fundamental question: why? Ordinary parallel EEPROMs are cheap, readily available, and easy to program. 

  • Like 1

Share this post


Link to post
Share on other sites

Agreed, parallel eeproms are cheap and easy to use. If you want to use SPI flash, you’ll need to use SPI65 which is going to require some extra hardware and the code to manage this hardware. Simplest option would be to use SST39F010, it’s DIP package, flash so you can easily reflash each time you need to change something. I would also strongly recommend the excellent 6502 Primer by Garth WILSON:http://wilsonminesco.com/6502primer/

 

Edited by ojanhk
  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, danwinslow said:

Say what now? Do you mean 'parity'?

Nope, direction.  Big endian vs little endian.  In serial transmission, it matters both at the bit level and at byte boundaries.

Share this post


Link to post
Share on other sites
5 hours ago, ChildOfCv said:

Nope, direction.  Big endian vs little endian.  In serial transmission, it matters both at the bit level and at byte boundaries.

hah, ok. Never heard it called that.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...