whats the best way to add external ram?
vampyre
Posts: 146
I've always wanted to build my own computer. I've now got some free time
ahead of me, so i'm looking at options. The prop seems to be the logical choice
since it has video support built in. Then i stumbled on PropDos. too cool, thats
just what i wanted to do. My real desire is to write my own OS. Sadly, I'm a
bit of a noob when it comes to logic electronics.
I have used basic stamps for a while, and even programmed a PIC or two in my
time, but this project is all together more complex.
My basic design idea is to use the propeller, the datalogger for long term file
storage, and some SRAM for temp data storage.
I hope someone can help point me in the right direction before i invest money
in the wrong stuff.. here are my questions
1. is SRAM the best way to go? I want something that can handle lots of write
cycles, and SRAM seems simpler to use than DRAM, and certainly better than
flash for repeated writes. Am i right in my assumptions ?
2. I have found this chip on jamecos site that looks really nifty.
www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=157358
-would it be a really hard task to use this chip with the propeller?
-Am I right in thinking that I could dedicate one of the propellers cogs to reading and writing to this chip?
-would it eat up all my program space on the propeller trying to implement this?
nebulous question: Does anyone know where I can go to learn 'how' to hook this or
any other external ram to a micro controller? Maybe a link to a project that does this
so i can see how its done in code and hardware? That'd be just nifty.
thanks in advance for any help, pointers or responses
ahead of me, so i'm looking at options. The prop seems to be the logical choice
since it has video support built in. Then i stumbled on PropDos. too cool, thats
just what i wanted to do. My real desire is to write my own OS. Sadly, I'm a
bit of a noob when it comes to logic electronics.
I have used basic stamps for a while, and even programmed a PIC or two in my
time, but this project is all together more complex.
My basic design idea is to use the propeller, the datalogger for long term file
storage, and some SRAM for temp data storage.
I hope someone can help point me in the right direction before i invest money
in the wrong stuff.. here are my questions
1. is SRAM the best way to go? I want something that can handle lots of write
cycles, and SRAM seems simpler to use than DRAM, and certainly better than
flash for repeated writes. Am i right in my assumptions ?
2. I have found this chip on jamecos site that looks really nifty.
www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=157358
-would it be a really hard task to use this chip with the propeller?
-Am I right in thinking that I could dedicate one of the propellers cogs to reading and writing to this chip?
-would it eat up all my program space on the propeller trying to implement this?
nebulous question: Does anyone know where I can go to learn 'how' to hook this or
any other external ram to a micro controller? Maybe a link to a project that does this
so i can see how its done in code and hardware? That'd be just nifty.
thanks in advance for any help, pointers or responses
Comments
For mass storage you can use an SD card. This is easy to hook up to the prop using just a few resistors.
1. If you need more memory space for variables then SRAM or a different micro is the way to go.
2. That chip will be a bit hard to use with the propeller because it requires the use of 30 pins.
If you want to play around with some SRAM you could get a this card www.parallax.com/Store/Microcontrollers/PropellerTools/tabid/143/CategoryID/20/List/0/SortField/0/Level/a/ProductID/444/Default.aspx. Its more expensive but should be a lot easier to use and other people on the forum have it and could be able to help you.
The Hydra has a slot that you can use it with, however, you won't be able to use it with an SD card. So you could get a Hybrid which you can use the SD card and SRAM card with.
The propeller wiki propeller.wikispaces.com/Dev+Board+Differences and ignite automation www.igniteautomation.com/ have some info on both boards.
I had looked at the xtreme 512k but its just not in my budget goals. I'd like for the entire computer to cost $100 or less
You say that the chip will be hard to use for needing so many pins.
What about using a second MCU as a dedicated controller for the SRAM?
I had also considered SD for data storage due to its lower cost. I still havn't decided for sure, but if i'm not mistaken,
currently the only object available to use SD cards supports only the root directory.
The solution on the xTreme 512K card takes is to use a CPLD (complex programmable logic device) to act as the interface between the prop and the sram chip so that only 10 pins are needed on the prop.
I guess the real question is do you really need the extra space? Some of the games that have been developed are quite impressive. If there isn't enough space could you store some things on the SD card? Another option would be to just get another prop to do the things that eat a lot of memory like video.
If you want less than $100 I would probably get a proto board with the addon pack for VGA, kb and mouse. Its pretty easy to add sound, SD and tv to the proto board as well.
The current SD card drivers only do the root directory. However, Mike Green is working on a new version that will be able to access directories but he's having problems with it corrupting files and things at the moment. Again, if you want to use the datalogger its going to be hard to keep the price below $100.
on an I2C Slave RAM using just a Propeller which will give 32Kx8 RAM ( plus
~24Kx8 Eeprom ).
There are also FRAM devices which are I2C Eeprom but AIUI don't have the
same limited number of write/erase cycles.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley
Traffic is slow at times, but Parallax orders·always get here fast 8)
Post Edited (jazzed) : 4/20/2008 2:49:32 AM GMT
That is real and works for me (but just with one latch).
Another possibility, similar in "spareness" is to use a DRAM., well a 256kx8 found in old SIMMs (72 pin or 30) spares also loads of pins because addresses are already multiplexed, and you sure spare 2 latches, but it is DRAM, it needs refresh, these DRAMs are simple to refresh, just get a 44C256 datasheet. The timings can be achieved, just do not expect to access them at 70 ns.
Other serial possibilities exists as was mentioned before, but they are dog slow compared to any of these two. Anyways some sort of memory management will have to be implemented, and the refresh can be implemented there.
I forgot about the old 8088 "ALE" Address Latch Enable method. I have some 74LS374 chips. Double access time for address setup and latch for all accesses relative to one-to-one address/data connections, but simpler from a code perspective and faster accross boundaries (with no attention required for where the data is) than solutions I described before. Twice as much soldering but that's ok. .... Think I'll build a prototype [noparse]:)[/noparse]
DRAM is a more complicated and requires a COG or a piece of one for refresh but is of course doable. It will take longer to get right and won't save as many pins as the address latch method, but is less power hungry. Any older hobbyist will certainly have lots of DRAM somewhere [noparse]:)[/noparse] Not sure if older DRAM type DIMMs are widely available in production now like DDR & SDRAM.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley
Traffic is slow at times, but Parallax orders·always get here fast 8)
Its definately gonna give me plenty to play with for a while. I like the latch idea, i think im gonna explore that. Thanks again for all the help
The DIMM fits neatly on the protoboard but don't have room for the socket ... fingers crossed [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley
Traffic is slow at times, but Parallax orders·always get here fast 8)
from propeller.warrantyvoid.us
You should be able to build a working setup for well under $100.
Also, you might take a look at what Brian has at www.ucontroller.com
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
A Living Propeller FAQ - The Propeller Wiki
(Got the Knowledge? Got a Moment? Add something today!)
OBC: got it bookmarked. thanks! I'm sure i'll be drawing lots of inspiration from(blatantly stealing ideas from) your work in the near future.
hinv: I do want two props I think, if for no other reason than to be able to say I built a 16 processor computer
I am thinking one for video/audio/keyboard/data device, one for processing and ram access
hippy: i hadn't heard of FRAM till you mentioned it, fascinating stuff. unfortunately i have constant hand tremors that
make soldering a *real* pain in the neck, and i don't think its available in a DIP package. any thing with smaller pins is out of
my realm of usability. Thats gonna be a problem in the not-to-far future I'm afraid
Can't you get SRAM with an SPI interface? That should be reasonably quick and only use 4 pins (only 1 if you shared some of the pins with the SD card).
Edit: Here's one but its in a SMT package www.endrich.com/en/site.php/30723
Edit2: That chip is only 32kBytes and I can't find any others.
Post Edited (stevenmess2004) : 4/20/2008 8:43:28 AM GMT
till then using latches seems to be my best route.
I looked at a video over on sparkfun about hot-air smt soldering, and yeah there's no way i could manage that. so once i finally decide to get into it , which will probably be the project after this one, i'll start working on my "evil machine building evil machine".
I want to finish this one first though, because I want to use this project as the brains for the robot arms.
Most of the larger SRAM's (64k or bigger) are of parallel interface. (Address bus + Data bus + W/R + CE)
I have used some Cypress Async SRAM's before with FPGA's. They worked wonders and are 3.3 volts. [noparse]:)[/noparse]
Thanks everyone!
--Andrew Arsenault.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Share the knowledge: propeller.wikispaces.com
Lets make some music: www.andrewarsenault.com/hss
http://www.ramtron.com/products/nonvolatile-memory/serial-product.aspx?id=100
It runs at 40MHz SPI @ 3.3V.
It looks like it would have to be dune on a smt skillet though.
Anybody used this package before?
after spending a bit of time searching/reading/thinking, it I'm starting to realize you guys were right about DRAM, i'm looking into how to use it now. thanks again for all the feedback and ideas.
Of course, that is assuming that you don't actually change the frame buffer. If you changed half of the contents of the frame buffer you would still get 396 years or so.
I don't think that number of writes is a real issue there, unless the writes get slower like in the case of eeprom.
Speaking of speed, I don't know if a descent amount of it could be used for frame buffer because of the SPI interface.
I can see FRAM being used like swap space for Extended Large Memory Model, but at 5MB/second theoretical limit, I don't know if it can be used for that either.
Mike, what is the fastest you have gotten reads or writes on the propeller?
·31 - ·· Serial IO RX (keep as input after boot)
·30 - ·· Serial IO TX and SIMM WE_
·29 - ·· SEEPROM SDA· (keep as input after boot?)
·28 - ·· SEEPROM SCL· and ALE
·26 - 27 Keyboard
·24 - 25 Mouse
·16 - 23 Protoboard VGA
·12 - 15 MicroSD Card (reserved ... not yet added)
·11 -··· SIMM CAS_
·10 -··· SIMM RAS_
·8· - 9· SIMM A0..A1· (for burst modes)
·0· - 7· SIMM D0..D7 & A2..A9 (use ALE)
I'm thinking that native·PASM would give 4 byte read access for LMM instruction fetch in less than 2us.
I'll post results later if·this doesn't·make me burnout first.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley
Traffic is slow at times, but Parallax orders·always get here fast 8)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 4/22/2008 12:19:49 AM GMT
I don't know if this would be a problem or not for some people, but it doesn't seem like a very long time for a IC.
Some of us here have old computers and chips in our collection that are already over 3 times that in age.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Share the knowledge: propeller.wikispaces.com
Lets make some music: www.andrewarsenault.com/hss
Sorry I didn't answer you promptly, was busy. Yes,·A0..9·= 10 bits; using DRAM·RAS/CAS mux = 20 bits.
Alas, total cycle times are worse than I hoped by about 3x but some attributed to cmd/data interface and if-else-if-else construct; A 32bit read cycle is actually about 5.5us. Updated version 32bit access is about 3.8us.
·31 - ·· Serial IO RX
·30 - ·· Serial IO TX and SIMM WE_
·29 - ·· SEEPROM SDA
·28 - ·· SEEPROM SCL· and ALE
·26 - 27 Keyboard
·24 - 25 Mouse
·16 - 23 Protoboard VGA
·12 - 15 MicroSD Card
·11 -··· SIMM CAS_
·10 -··· SIMM RAS_
·0· - 9· SIMM D0..D7 & A0..A9 (use ALE)
The resistor values between Propeller and DBUS (input of 74LS377 and DRAM) should be 1K.
Since the DBUS "latch" is actually an 8-bit D flip-flop ALE's positive transition and not the level set's the address.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley
Traffic is slow at times, but Parallax orders·always get here fast 8)
Post Edited (jazzed) : 4/27/2008 3:11:29 AM GMT
After a bit of snooping, I found out that most dram newer than EDO is 5V. I thought that would be a poblem since you have bidirectional lines. I guess that I have to do some more checking on how to do that. Do you have a schematic? What parts are you using?
BTW I put 2.2KOhm resistors on the bi-directional lines and the bottom comes up a little, but the data is fine. The driver is still prototype phase and I'm debugging it. I'll post the final version publicly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley
Traffic is slow at times, but Parallax orders·always get here fast 8)