I was thinking, there are a lot of these new serial memories and other devices out there. A number of people talk here on designing processors, maybe a 6502 type processor that runs with the modern serial memories would be a nice device for small circuits.
Or -
Adding a Serial bus to a 6502.
Serial 6502
-
daniel_bingamon
- Posts: 5
- Joined: 22 Jan 2003
- Location: Kings Mills, OH
- Contact:
- GARTHWILSON
- Forum Moderator
- Posts: 8774
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
8BIT (Daryl) on this forum has available a 65-bus compatible SPI port in programmable logic, but of course the processor still has to get the instructions to run it and read and store data on its parallel buses though.
The serial memories are are great for mass storage and replacing mechanical media like floppy disc, hard disc, or tape, but are not suitable for replacing the RAM and ROM in a processor system, for a few reasons.
They're not really random access. If you want to read just one byte of a table for example, you have to send several bytes of address and instruction to get there. Usually then you can keep reading subsequent bytes in order of ascending address without further overhead. That doesn't have much value though if the processor reads only a few bytes max in sequencial order then has to get or store data at other addresses, or branch, etc..
The maximum speed SPI memories will go is usually 50mb/s (a little over 6MB/s) and probably 2/3 of those bits will have to be be address bits if the processor is to use the serial memory like it normally does RAM and ROM. The speed would be a big limiter for a 6502 system.
Another problem with the serial memories is that writes take a long time (like a millisecond or more), and you usually write an entire page at once, whether 1024 bytes or some other similar length.
I²C is nearly 50 times as slow as SPI but the flash memories that write entire pages at once are usually SPI, and I²C serial memories are usually EEPROM that let you write a single byte at a time if you want to. The I²C EEPROMs' slower speed dictates that their maximum densities are only around 128KB, because it would just be too slow to justify trying to store and access more data. SPI ones, if you cound the SPI mode of the little flash cards digital cameras use, get up into the gigabytes.
The serial memories definitely have their strengths and their place, but a processor bus is not the place for them. It's nice to be able to get loads of non-volatile storage using very few wires. The next one I'll probably get is the Atmel AT25DF641 8Mx8 SPI flash in an 8-pin SOIC. I've used some of the 24c256 32Kx8 I²C EEPROMs in 8-pin DIP and fiddled with some others, some smaller and some up to 8Mx8 but in a 28-pin SOIC. I've always gone through a 65c22 VIA to interface them.
The serial memories are are great for mass storage and replacing mechanical media like floppy disc, hard disc, or tape, but are not suitable for replacing the RAM and ROM in a processor system, for a few reasons.
They're not really random access. If you want to read just one byte of a table for example, you have to send several bytes of address and instruction to get there. Usually then you can keep reading subsequent bytes in order of ascending address without further overhead. That doesn't have much value though if the processor reads only a few bytes max in sequencial order then has to get or store data at other addresses, or branch, etc..
The maximum speed SPI memories will go is usually 50mb/s (a little over 6MB/s) and probably 2/3 of those bits will have to be be address bits if the processor is to use the serial memory like it normally does RAM and ROM. The speed would be a big limiter for a 6502 system.
Another problem with the serial memories is that writes take a long time (like a millisecond or more), and you usually write an entire page at once, whether 1024 bytes or some other similar length.
I²C is nearly 50 times as slow as SPI but the flash memories that write entire pages at once are usually SPI, and I²C serial memories are usually EEPROM that let you write a single byte at a time if you want to. The I²C EEPROMs' slower speed dictates that their maximum densities are only around 128KB, because it would just be too slow to justify trying to store and access more data. SPI ones, if you cound the SPI mode of the little flash cards digital cameras use, get up into the gigabytes.
The serial memories definitely have their strengths and their place, but a processor bus is not the place for them. It's nice to be able to get loads of non-volatile storage using very few wires. The next one I'll probably get is the Atmel AT25DF641 8Mx8 SPI flash in an 8-pin SOIC. I've used some of the 24c256 32Kx8 I²C EEPROMs in 8-pin DIP and fiddled with some others, some smaller and some up to 8Mx8 but in a 28-pin SOIC. I've always gone through a 65c22 VIA to interface them.
-
Nightmaretony
- In Memoriam
- Posts: 618
- Joined: 27 Jun 2003
- Location: Meadowbrook
- Contact:
- GARTHWILSON
- Forum Moderator
- Posts: 8774
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Quote:
So it is fairly easy to interface an I2C through a 65C22 then?
Code: Select all
INIT_I²C
I²C_CLK_UP
I²C_CLK_DN
I²C_DATA_UP
I²C_DATA_DN
I²C_DATA_IN ; for data direction
I²C_DATA_OUT ; for data direction
I²C_START ; to produce the I²C "start" condition
I²C_STOP ; to produce the I²C "stop" condition
I²C_ACK ; to produce the "acknowledge" bit at the end of a frame
I²C_NAK ; to produce the "not-acknowledge" bit at the end of a frame
I²C_ACK? ; to check the ACK bit sent by a slave device
RD_I²C_BIT
SEND_I²C_BIT
RCV_I²C_BYTE
SEND_I²C_BYTECode: Select all
POLL_EEPROM
WAIT_TIL_EEPROM_RDY
SEND_EEPROM_ADR
WR_EEPROM_BYTE
WR_EEPROM_ADR
WR_EEPROM_PAGE
RD_EEPROM_BYTE
RD_EEPROM_STREAM
-
Nightmaretony
- In Memoriam
- Posts: 618
- Joined: 27 Jun 2003
- Location: Meadowbrook
- Contact:
Kewlsome. Reason I asked, when I am done with the pinball, am thinking of a more generic pinball computer, except that it goes to multiple processors, giving out orders via I2C lines. I saw a game once that used an I2C center, givint out orders to seperate boards so I thought it would be a good idea. For pinball playfields especially, you can save a giant labor intensive wiring bundle, just a set of huge power wires and some I2C busses to lights, switch and solonoid controllers....
Yup, am still in the pinball madness. Last night was a milestone, finishing up display attract and selft test of that region. Now is the time to get to the playfield light matrix and gert that puppy going, then the switches.... I had revamped my software to use libraries and a tight event loop.....
Yup, am still in the pinball madness. Last night was a milestone, finishing up display attract and selft test of that region. Now is the time to get to the playfield light matrix and gert that puppy going, then the switches.... I had revamped my software to use libraries and a tight event loop.....
"My biggest dream in life? Building black plywood Habitrails"
- GARTHWILSON
- Forum Moderator
- Posts: 8774
- Joined: 30 Aug 2002
- Location: Southern California
- Contact: