External memory and where to buy components
IG3D Media
Posts: 24
Hi, I'm new to the SX/hardware world (although I have been programming software for nearly a decade).
The device I want to build needs to store much more data than is avaliable on the SX chip memory banks and I have been searching the net for places to but EEPROM chips but I cannot find any that look like they will work with the SX.
I was hoping someone can point me to a website that sells chips and components. I am specificaly looking for...
* Power supplies (so I can power non-TechBoard applications)
* EEPROM and RAM chips
Also, I am not sure if they are easy to·get ahold·of·but I am also trying to find ready to board mount male and female PS/2 and RJ-45 connectors.
Thank you ahead of time for anyone who helps me out.
P.S... will components designed for the Stamp (servo controllers for instance) work with the SX?
The device I want to build needs to store much more data than is avaliable on the SX chip memory banks and I have been searching the net for places to but EEPROM chips but I cannot find any that look like they will work with the SX.
I was hoping someone can point me to a website that sells chips and components. I am specificaly looking for...
* Power supplies (so I can power non-TechBoard applications)
* EEPROM and RAM chips
Also, I am not sure if they are easy to·get ahold·of·but I am also trying to find ready to board mount male and female PS/2 and RJ-45 connectors.
Thank you ahead of time for anyone who helps me out.
P.S... will components designed for the Stamp (servo controllers for instance) work with the SX?
Comments
http://www.digikey.com
http://www.mouser.com
http://www.jameco.com
http://www.jdr.com
I also visit http://www.allelectronics.com who's inventory isn't that large but they are a surplus store and if you can find it there it will be much cheaper than the above companies.
Ok now onto the rest of your questions, the beauty of the SX is you can interface it with anything, unlike other microcontrollers which require a part to adhere to a certain standard (SPI, i2c etc). The key is to finding the right virtual peripheral (VP) code. Parallax has several examples and I'm sure some sites on the sxlist ring have some too. Anything designed for the basic stamp can be driven by the SX since the BS2's microcontroller is an SX. It may not be as straightforward as programming the interface in PBASIC but it is absolutely do'able.
For non-voltatile memory (eeprom) if you need quick access you'll need to get a parallel eprom, but if speed isn't important (it usually isn't for eeprom go with a serial eeprom (seeprom) spi or i2c since there is VP code already out there for those interfaces.
For external ram you'll want a static ram (sram), if you want super fast, go with the cypress async sram at digikey. Or·if super fast is not uber important you can kill two birds with one stone and get a non-volatile sram, this is a·sram which has a battery piggybacked into the package to keep your data even with the power is turned off, the battery typically lasts for a decade. Texas Instruments (BQ40 series), Xicor (X20C series), and Dallas (DS12 series) all make them, but Xicor is hard to find stocked.
If you go for a high density chip (more than a few KB) and are using the SX28 or below, you'll need to add an external latch to·provide enough pin-outs to drive the chip (for example a 64Kx8 chip will need 16 bits of address, 8 bits of data, and typically at least 3 control signals (/OE, /WR, and clock (and /CE if you using more than one memory), this is 27 pins and the SX28 has 20). If you need help designing this interface let me know.
The other parts you inquired about are likely availible at one of the above retailers. If you don't have experience designing power circuits, and you aren't driving a bunch of circuitry or power hungry devices (such as motors) just copy the circuit on the protoboard your using and plug your wall wart into it (the key is to have a wall wart do the AC -> DC conversion and do your regulation on the board).
I can expand my discussion on any of these topics if you need more guidance.
Paul
Post Edited (Paul Baker) : 1/10/2005 4:18:51 PM GMT
Paul
Just to clerify, I am an experienced programmer but I am verry inexperienced in electronics and the SX instruction set, so please be patient with me.
Could someone link me to this products or suitable substitutes... I am having trouble finding it in the sites...
* LM294OCT-5.0 (the thing that cuts down the input voltage on the tech board, I am not sure what the technical name is)
Also, DigiKey has litteral dozens of EEPROM and RAM chips. Is there any refference out there that will tell me which ones are best? For one prototype I need memory that can store logs that will be constantly updated (several times per second) plus retain it on power loss, and in another unrelated prototype I need memory that can store large ammounts of images and ascii data that won't change much (once every month at the most) after the memory is programmed.
I am not sure if I will need more 512K or more memory for either but it would be nice to have the circuit diagrams handy that show how to do it.
Paul Baker said...
I assume from your programming experience you will be able to implement timing diagrams into proper code, if this is incorrect let me know and I'll give you a primer.
As I said in the beginning of this reply, I am new to the electronics aspect. I have not played much with complex output and my ability to read electrical diagrams is limited (I'm teachning myself slowly). So if you can give me a "quick primer" it would be appreciated. I am using an SX28AC/DP with a fequency of 50Mhx. I am not sure what memory I will use yet.
Thank you both for your help.
I too searched google but I came up with a lot of sites that, quite frankly overwhelmed with with technical information that I'm not quite ready for. (I'm working on it) Anyway, that is exactly what I needed, thank you.
I'm still working on finding the right memory I need.
As per your memory needs, lets start with your first application. Since you only need to write to the memory·"several times a second", you may be able to get away with using a serial eeprom. This pretty much eliminates the hardware complexity. Microchip's 24FC515 is a 64Kx8 seeprom that uses the i2c interface, which parallax has an example virtual peripheral for. Up to 4 of these can be put on the same bus (the same two wires)·by wiring A0 and A1 on each chip to represent the 4 possible binary values, each chip will know when you're talking to it. With 4 connected you'll have 512x8 storage and with a 1 MHz clock rate for the memory you can write over 26,000 bytes/second. The only down side is the cost, they are just under $5 apiece, not too shabby, but if your thinking of production, there are cheaper avenues.
With your other application, I don't know what kind of access speed you need, but the "read a bunch, update contents periodically" sounds like a perfect fit for a flash memory. If you can give me a capacity and reads/second I can help you narrow down the field even more.
Paul
Paul,
It seems that Andrew and I are both trying to figure out pretty much the same thing. And your assistance in that direction has been most helpful. Since I am thinking about production down the road, what cheaper routes would you pursue? And why wouldn't they necessarily be the first choice for general experimenting or prototyping?
Jim
Gnight, Paul
Post Edited (Paul Baker) : 1/11/2005 6:00:30 AM GMT
Also, some more information...
One prototype will be logging all events on a certain line. Each event will take two bytes. So essentialy it is writting 2 bytes every time an event occures. (which could be anywear from none to three times per second)
I need the events to be stored in such a way as the device can loose power and still retain all the records. I would like to store 64,000 record so I'd need a 128k chip.
The othe prototype (the one that needs to be written less but store more) won't be needed for a while but will require more memory. I'm not worried about that for a while.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Curioso
IG3D Media
Ok, lets ignore your second project for now. Your first is simpler and we'll get you on the ground before tackling the other. Your small number of acesses are very well within the capability of a serial eeprom. So we will go with them. I suggest getting two 64Kx8 seeproms because it is far cheaper than getting a single 128Kx8. I would go with either an I2C or SPI interface, I2C is a two wire interface, SPI is a four wire. The virtual peripheral code for the I2C protocol is here: http://www.parallax.com/dl/appnt/sx/An29.pdf·, the virtual peripheral code for the SPI protocol is here: http://www.parallax.com/dl/appnt/sx/An20Spi.pdf·and here: http://www.parallax.com/dl/docs/prod/sx/SpiDemom.zip .· When you look at the documentation, remember that the SX will be the master.
I cannot give specific guidance on which to use, since I've never interfaced with an I2C and I was in college using the MC68HC11 when I last interfaced with an SPI device (and the HC11 did this in hardware). I2C will use exactly 2 pins of your SX, SPI for this application will use 6 pins (you can get this down to 5 pins·if you include·a 7404 (inverter) in the design). Dave (achilles03) says (in this post: http://forums.parallax.com/showthread.php?p=522200) that SPI is easier to interface with, so you may want to opt for the SPI interface.
My suggested part number for the SPI seeprom is Atmel's AT25HP512 which is availible at Digikey for $3.89 for the 16-SOIC package (AT25HP512W2-10SI-2.7) and $7.42 for the 8-DIP package (AT25HP512-10PI-2.7).
My suggested part number for the I2C seeprom is Microchip's 24FC515 which is availible at Digikey for $4.73 for the 8-SOIC package (24FC515-I/SM) and $4.68 for the 8-DIP package (24FC515-I/P).
The DIP package is much easier to prototype with than the SOIC, and SOIC is better for production than DIP. So its best to prototype in DIP when possible then switch over to surface mount when in production (DIP is quickly becoming a thing of the past, the vast majority of new chips are availible in surface mount packages only). Get two of whichever part you decide on.
There isn't much point in going into further detail at this point until you winnow down which part you will be using. Check the other retailer sites I listed in my first post·to find the best price on the part, Digikey and Mouser have the best selection.
Paul
PS Jim this advice also applies to you, your memory access requirements are the same as Andrew's.
Post Edited (Paul Baker) : 1/11/2005 10:35:21 PM GMT
Before I make a decision I need to know one thing. This is a newbie question but as I said, I am new to electronics and Google couldn't helpt me on this one. What is the difference between DIP and SOIC and if I choose one how easy would it be to switch the final design over to the other type?
If I figured it out·right: SOIC will take up less space but can't fit on a breadboard without an adapter·because it·has closer spaced pins? Is that correct?·If that is true then I am assuming that it is also easier to solder a DIP on a finished board without accidentaly bridging pins.
As for I2C·v. SPI... the pin issue is not a problem as this particular application will only use 4 pins for I/O (two input two output) asside·from the logging. So even if I used the SX18AC in my final design I could still afford the 6 pins.
However, I have two question...
1)·Would there be any difference in the physical space each takes up? I am trying to make my final design as compact as possible.
2) You said earlier that you needed two wires for addressing in I2C. If you are using two wires for addressing which chip to use wouldn't you need at least·two other·wires for doing the actual memory read/write opperations
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Curioso
IG3D Media
Post Edited (IG3D Media) : 1/12/2005 12:00:25 AM GMT
The best answer to that, and also for your DIP Vs SOIC is to look at the manufacturers data sheets. Just Google on the chip number and you'll find either the manufacturers site, or one of several sites which have data sheets for multiple vendors on them. The data sheet is the technical specifications for the chip. It will contain much information, which if you're like me, will mostly head off into outer space after glancing off the top of your head.
You should definitely get copies of data sheets for any and all parts you will be using.
One of the easier sites I've found to look up info and pricing on chips is www.mouser.com. In addition to having links to data sheets, their catalog pages show line drawings of the chip types for the items listed on the page.
Jim
The parts I've quoted are identical except for the package, so buy the DIP to do your breadboarding, and once you have it working the way you want, design your pcb arround the·SOIC part. As you can see, the 16-SOIC is pretty much the same size as the 8-DIP, but with surface mount you can populate the board on both sides of the pcb if you hand solder or use a wave soldering technique (reflow ovens only permit population of one side). DIPs which go through the pcb don't provide any advantage of dual side population.·Dual side population will have the largest impact on minuaturization of your final circuit because you can cut the pcb size down to nearly half if you work hard enough on chip and trace placement.
With I2C one pin is the clock, the other is the data pin which is bidirectional (the same pin is used for input and output) the method of addressing one chip from the other is in the data that the SX sends out on the data pin. Because the same pin is used for input and output, the part can be finicky especially when you operate it at its maximum speed (we'll discuss operating speed at a later point).
SPI has a dedicated input pin, a dedicated output pin, a clock and a select. Each select connects to a pin on the SX, so your looking at 5 pins for SPI (I was incorrect in my previous post).
Paul
I think I am going to go with SPI because I don't want the confusion of having to impliment all memory I/O on the same wire. Especialy since I need to worry about the othet two (user) inputs at the same time. "Finicky" is not something I want.
So I finally decided... I need to go with SEEPROM with a SPI interface, and a DIP chip for the prototype but the SOIC version when I do the final board.
I'm still not completely sure wether to go with serial or parallel... it was posted earlier that serial can get expensive.
I was looking through the prices at digikey and it seams that serial EEPROM s cheaper for 256K than 64K ( http://dkc3.digikey.com/PDF/T051/0537.pdf ) is there something I missed?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Curioso
IG3D Media
This was pointed out in the basic stamp forum: the AT25HP512 is a page write seeprom with 128 byte pages, meaning a buffer holds data until you fill up the entire 128 bytes before writing it into memory. If power is lost you will loose any data that was in the buffer, this may not be a critical issue in your app but it is something to consider. I cannot find any any stocked SPI seeproms with high enough density that have byte write operations. So if appears you will have to make a design trade off choice. Don't be too scared of the I2C interface, we will be underclocking the chip since you don't need to access it frequently, this will make the process of accessing the chip more forgiving.
serial is more expensive for the same chip density but the complexity of interfacing with a parallel eeprom is greater (you need some glue logic)
* Writting 0 to 4 times per second.
* Must be able to efficiantly playback the log (which consists of regenerating the electrical signals it logged).
* Number of wires is not an issue.
* This design "probibaly" won't be being produced so price is not too important. (although if it works well and I can get it small enough and cheap enough, I might consider production)
Thank you again for your help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Curioso
IG3D Media
Post Edited (IG3D Media) : 1/12/2005 3:51:11 PM GMT
One downside of the 256k chips is that it's only available in the SOIC package. No DIP.
Andrew, you said you were looking for around 512k of memory. Was that bits or bytes?
If it is bytes you'll be needing 16 of the 256k chips. While they're not that expensive, I would think that the cost of implementing and handling 16 memory chips (or 32 if you go with the 64k chips) would be a bit daunting. Plus the real estate would result in a much larger board.
Something like the Atmel AT28LV010-20PC, a parallel 128k x 8 EEPROM would be more expensive, but you'd only be dealing with 2 chips. The chip is $40.30 each from Mouser. It is available in a PLCC and DIP, but Mouser doesn't stock the DIP, and a special order is a minimum of 12 units.
Anyway, I guess my thought is that if you are looking for 512k bytes, the higher density chips, while more expensive, would seem to be a better bet. Paul, please disabuse me of my delusion if I've over looked something about this.
Jim
Post Edited (Jim McCorison) : 1/12/2005 4:00:56 PM GMT
Correct me if I am wrong.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Curioso
IG3D Media
Ok. I was confused. Your prior post had the url for page 537 which had the 128kx1 chips. I spaced over Pauls reference of the AT25GP512.
I too don't want to loose 128 bytes of accumulated readings in the event of a power failure. In another thread http://forums.parallax.com/showthread.php?p=522200, Paul suggested using SRAM with a non-volatile controller chip (DS1210). A solution to the page writes could be using a small battery backed SRAM chip to accumulate until the write, or just use an NV-SRAM. Then when you have a page of data to write, you transfer it to the EEPROM.
Somewhere I recall somebody, maybe Paul, saying that that wasn't necesary, that you could just write whatever you wanted to in increments of 2,4,8,16,32,64, or 128 bytes. But that might have been for a different chip. I can't find the post at the moment.
Jim
My revised suggestion is·Atmel's AT24C1024·which is a·2-wire interface (atmel's name for I2C) 128Kx8 the 8-DIP is $8.04 and the 8-SOIC is $4.94; best of all, you only need a single chip. Your final pcb if using surface mount and dual side population will be very small (my guess is under 2" square, most of which will be used by your program header, oscillator socket·and voltage regulator)
With regards to the cost issue, you need to look at the entire picture. While a parallel eeprom may be cheaper, it will require glue logic and much more board real-estate, both of which will drive up the cost. So while your chip cost will be lowered, you will see little·or no cost advantage when you consider all factors.
Paul
btw I2C has byte write mode so no data loss
updated part name from AT25C... to AT24C..., originaly quoted part does not exist.
Post Edited (Paul Baker) : 1/12/2005 8:39:56 PM GMT
A few questions...
* What do you mean by glue logic?
* Also, when you say "most of which will be used by your program header" are you reffering to the serial interface to the SX chip? Because my final PCB will have the chips programmed prior to being attatched to the board (I am assuming this is possible).
* I am having trouble finding that part numeber (AT25C1024) are you sure it is correct? I am looking through Mouser as it is the easier to search.
Also, final board realestate is more important than cost for this particular project. So serial definately seams the way to go.
As a side note: the device will not need a power regulator either (my other prototype I meantioned does though) because it will already be supplied with a +5V input (the power output from another device). So I am hoping that the final design can be extremely small.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Curioso
IG3D Media
Post Edited (IG3D Media) : 1/12/2005 6:01:00 PM GMT
I had the same problem. After searching through Atmel's site I came across the AT24C1024, which fits Paul's description.
Jim
1. goto http://www.digikey.com
2. type eeprom into search box
3. click on EEPROM - Serial
4. click 1M (131,072 x 8) in memory size
5. click apply filters
6. click on pdf icon in far right column of first part.
7. click on datasheet and voila the data sheet.
by only specifying the class of product your looking for, then narrowing down the choice by using successive parametric filters, you quickly weed out only the parts your interested in, plus the results page places all information in a grid you can quickly scan based on anything your looking for. In my opinion this is more intuitive and a much more powerful search engine than mouser offers, I only use mouser's website for price comparison because if I don't know what the part number is, just the parameters, I find mouser's interface a major headache. If I want a 128Kx8 seeprom, I don't want to wade though pages and pages of seeproms that aren't that size, plus to get all the product parameters you have to click on each and every part number and frequently have to access the data sheet (such as finding what interface a particular seeprom uses), this is·an unessesary step.
The power of an online search is to access only the parts you want by the use of a relational database, if I want to read through the parts like a catalog I'll use the catalog (I have both company's on my desk).
Glue logic is extra chips nessesary to interface with a part, this is done with 7400 series chips, or PAL/GAL/SPLD/CPLD. If your power supply is regulated then you don't need a regulator on board. The SX can be programmed before placing it on the pcb, but programming a surface mount off chip poses a problem. I won't discuss it in this thread cause it is too off topic, this isn't something you need to worry about until you goto the pcb stage so lets postpone the discussion for now. And if you are preprogramming the SX chip you can use a surface mount resonator or oscillator, saving even more space. The only "big part" left on the board is the power plug, look at your SX-Tech to see the size of it.·This can be replaced with something smaller too if certain conditions are met, but again this is an off topic issue and doesn't need to be addressed until after the prototype is done.
Paul
So, you think I should go ahead and buy the AT25C1024 chip?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Curioso
IG3D Media
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Curioso
IG3D Media
Paul
Post Edited (Paul Baker) : 1/12/2005 8:49:28 PM GMT
In the mean time I am struggling to find were the power usage on the data sheets.
As it is, the only things on the board will be the SX chip, the memory, and a resonator. The devide only acts as an observer of sorts. All it does is monitor data comming from another device (which also happens to be powered by the same +5V) going to the host device and store the events in memory or playbacks the events if a playback command is issued from the other device.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Curioso
IG3D Media