64k spi eeprom
metron9
Posts: 1,100
I found some info on this chip :25LC640 here
http://www.geocities.com/SiliconValley/Orchard/6633/EEPROM.html
The link to digikey shows many part numbers with 25LC640 most with non stock status
One in stock part number 25LC640-I/P seems to be the part number I am looking for It links to the same datasheet as the author in the link above.
So unless someone tells me otherwise I will buy 25 of then for 24 bucks.
http://www.geocities.com/SiliconValley/Orchard/6633/EEPROM.html
The link to digikey shows many part numbers with 25LC640 most with non stock status
One in stock part number 25LC640-I/P seems to be the part number I am looking for It links to the same datasheet as the author in the link above.
So unless someone tells me otherwise I will buy 25 of then for 24 bucks.
Comments
·· How much storage do you need?· There may be a production part that can foot the bill.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I just never had any hands on experience with memory chips except for frying a motherboard once with the wrong chips
I just want experience in working with IC Chips and that seems like a good place to start.
I found the info on the 8k chip but it says discontinued on the parallax site so I am still looking for any memory that will work.
8k Serial EEPROM - DISCONTINUED
I don't se any others on the parallax site.
Don't know what you mean by production part.
Here is a web page listing for all of the Microchip Serial EEPROMs, using various access methods (I2C, SPI, Microwire, etc):
·http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=80
I'm sure they have what you want in stock, and thier datasheets are usually quite understandable. Their prices probably aren't much different than anyone else in small quantities.
Nearly any major chip manufacturer will have some sort of EEPROM offerings. If need to find a way to locate a resource for purchasing a chip number you like, you can use the free FindChips service here:
········ ·· http://www.findchips.com
Regards,
Bruce Bates
Ordered them
Now about the hookup, I know what pins to connect but...
The datasheet is not showing the spaceing of the pins, I ordered the 25LC640-I/P PDIP package (no idea what it stands for yet P=PLASTIC d=DEVICE i=INTIGRATED P=?)
Anyway will this thing fit on the breadboard I have Basic stamp Homework Board or can you point me to solderless boards that it will fit?
I will retire to read my new book I picked up today "Programming and Customizing PICmicro Microcontrollers" by Myke Predko a bit over 1000 pages so I will be back in a few hours.
By the way , I know the C64 had 64k mem but there was an unused 4k area ( I think it was 4 k) starting at &HC000 That's where my IEA Assembler would put the code it generated. I used the basic editor and line numbers for the actual programming I wish I could find that code.. Hey I have my old file I just found it. I used the basic command line with a "." to communicate with the assembler running in the background. The .A command was Assemble hmmm Looks like I was reading the stream from the keyboard input, I even tab spaced the code as you could list it with the .L command. Brings back old memorys as my daughter was only 2, now she's third year at UofM.
Thanks again for the links...
http://www.parallax.com/html_pages/products/basicstamps/oem_components.asp
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
From what I have been told, PDIP stands for Plastic Dual In-Line Packages, and yes it will fit on the homework board's breadboard.
-JLBShecky
Although Myke's book "Programming and Customizing PICmicro Microcontrollers" is an excellent asset for learning about MicroChip PIC micro-controllers, it will only be marginally helpful in understanding the Parallax Basic Stamp per se. Two excellent books (PDF's actually) for the PBASIC Stamp which can be downloaded for FREE from the Parallax web site are: "What's A Microcontroller?" (often referenced as WAM on this forum) and the "PBASIC Stamp Manual", both of which contain a wealth of information about the Stamp platform. There are NUMEROUS other texts which can also be downloaded for FREE from the Documentation Section of the Parallax Web site as seen here:
http://www.parallax.com/html_pages/downloads/index.asp
You will come to learn over time that Parallax is a BIG believer in student/customer education, and they go out of their way to provide as much clear and concise documentation as is humanly possible, in support of the products they sell. There is also an entire segment of their business dedicated to EDUCATION, at elementary, high school, and college levels!
The underlying microchip which drives the earlier Stamp BS-1 and the Stamp BS-2 is indeed a pre-programmed MicroChip PIC micro-controller, but the Stamp user/programmer has little or no control of the hardware features of the PIC itself, and almost no control at a native code (assembler) level. Later versions of the Stamp have used the Ubicom SX series of micro-controllers as their basis. The latest incantation of the Stamp platform (the BS2px) is beginning to offer the programmer a limited amount of control over some of the hardware features. Parallax also offers a non-PBASIC but compiled Basic or assembler solution for using the Ubicom series of micro-controllers easily. More information about that solution and support can be found here:
http://www.parallax.com/sx/index.asp
The PBASIC Stamp also lacks direct access to the internal clock, as well as no integration with the built-in interrupt facility. Both have largely to do with the use of an interpretive language, as opposed to a compiled or asembled language. IMHO there are more rewards than setbacks, in opting for an interpretive language, as you will soon see. Ease of use, and a fast development cycle are two of the greatst features. There is also a much more gradual, and MUCH more enjoyable learning curve for those who are initially unfamiliar with programming, than those platforms which require internal knowledge of the processor, and/or those which require learning assembler.
The Parallax PBASIC Stamp is user programmed in an interpretive form of the Basic Language, which happens to be quite powerful in it's own right. The PBASIC Language interpreter is embedded on the Stamp module itself. Schematics of the various Stamp platforms are available both in the Stamp PBASIC Manual, and seperately on the Parallax web site. After viewing the schematics, you will see that it is a good deal more than just a MicroChip PIC sitting there. It's an entire mini-system built on a DIP male header which can be inserted right into a DIP socket just like any other chip. DIP refers to a Dual Inline Package, and PDIP refers to a Plastic Dual Inline Package, as you rather surmised.
If you have any other questions, just shout. There is generally someone on this forum 24 x 7 x 365. It may be a Parallax employee, or another confirmed Stamp user/programmer such as myself. We're all here to help each other with this wonderful educational and creative adventure, affectionately called "Stamping"! Welcome aboard, you're in for an enjoyable trip.
Finally, the Commodore 64, as well as the Apple, the TRS-80, et al, and later the IBM PC-1 and PC-2, were all personal micro-COMPUTERS, and as such had a vast array of internal, expandable program memory, add-on peripheral cards, expandable ROM/RAM memories, and attached external peripherals. A micro-CONTROLLER, of which the Parallax PBASIC Stamp is one example, have none of those features, but rather have feature sets of their own. Comparison between micro-COMPUTERS and micro-CONTROLLERS are ALWAYS short lived! It's an apples-to-oranges comparison
Regards,
Bruce Bates
The reference to the c64 was adding to a comment I made in another thread (Light Bulb thread, I thought it was in this thread, should be in the introduce yourself topic threads i guess) I am not making any comparison between them I was just noting I used the memory in the system that was unused by the kernal and the basic interpreter, I read another post here from someone making a 6502 system so i just mentioned what I did with it 20 years ago.
Thanks for the detailed response as these forums are one of the reasons I picked the stamp to get started with in the first place.
I wanted to say, I really liked programming the c64, the z80 in my RS-TRS-80 but when windows came along I just could not keep up with the rapid change and lost interest in programming for quite some time. This stamp has rekindled my interest in both electronics and programming. Sometimes I try and move to fast though but I eventually get to the core however my brain has all interups on so I jump around quite a bit.
Works great no problems, an extra 8,000 bytes of eeprom memory for $1.15
Question, If i wanted to hook up 4 chips would I need 3 BS2 pins for each chip or could I wire all 7 pins of 4 chips in parallel and use just one extra pin on the BS2 for each chip? I would think this is how it's done. If so, could you tell all the eeproms that data is comming, and since they all share the same data line they would all write the same data, giving you redundant data or if you are programming eeproms for use in other moduals for example you could write a dozen eeproms at a time?
Attached is the hookup for 1 chip to the BS2
DI, DO and CLK will all be wired in parallel for the EEPROMs, as you suggested. A separate line, and pin port is used for the each of the /CS lines. All chips will see all the data transmitted. but only the chip with /CS active will actually use the information.
Regards,
Bruce Bates
I wired just the one simi permanente and added another work board that's a little bigger for my clumbsy fingers.
I have some 256k FRAM chips on the way, Found them for about 8 bucks but there the old bubble memory I guess
10 billion write cycles so you can use it like ram but of course the serial com is slow.
Just doing some experimenting to try and understand it a bit better...
It takes 30 seconds to write 2000 bytes,
Doing some timimg, I rem'ed the actual write shiftout and it still took 25 seconds so the actual write is not taking the time it's the setup and status that takes the time.
I see to write one byte 6 bytes of setup must be sent. At the 16kbits per sec 6 * 2000 = 12000 bytes to send at 2000 per second we have 6 seconds plus maby 3 seconds overhead on the pbasic side, so it takes the eeprom 20 seconds to write 2000 bytes of data.
Looking at the spec sheet it should take 5ms max to write a byte so 2000 * 5 =10,000 or 10 seconds max
So BS2 10 seconds in sending
eeprom 10 seconds writing
eeprom 10 seconds of setup communication before byte is written.
Is that about right?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don Kinzer
·
You don't specify which Stamp platform your using for your timing considerations, so we'll look at the slowest version, the BS-2 below. Timing for the faster Stamp platforms can be extrapolated from that BS-2 calculation.
Additionally, you don't mention which specific EEPROM chip is under consideration in your calculations, so I'll presume you're speaking of the 256K Ramtron FRAM chip you last spoke of in your message. You do mention using a serial interface for the chip, but not which serial interface (2-wire or SPI), so I'll presume you're considering the faster of the two, which is the SPI interface, and also the interface which uses the /CS line we spoke of earlier.
Your calculations also do not take into consideration the manipulation of the /WP (write protect) line nor the time for setting the /CS line, either of which may or may not be necessary or required. Just keep that in mind when generating your final timing numbers.
Lastly, I have to respectfully disagree with your assessemnt that "I see to write one byte 6 bytes of setup must be sent". According to the FRAM datasheet, each memory write (regardless of the amount of data being written) MUST be preceeded by a WREN command (write enable). WREN = 8 bits or 1 byte, since it requires nothing but the op code to be written to the device. A memory write requires an 8 bit op code, 16 bits of addressing data, followed by a minimum of 8 data bits. So we end up as follows for one completed write cycle:
1. WREN (write enable) = 8 bits, 1 byte = op code (only)
2. WRITE (memory write) = 8 bits, 1 byte = op code
= 16 bits, 2 bytes = address
= 8 bits, 1 byte = data
40 bits, 5 bytes = total information transfer
Thanks to Dr. Tracy Allen, here is a table of BS-2 Basic Stamp instruction timings. Other Basic Stamp platform instruction timings can be extrapolated from those shown on this web site, as noted:
http://www.emesystems.com/BS2speed.htm
From that table we get the following general timing guidelines -
Simple one byte SHIFTOUT using LSBFIRST:
990 mS total instruction time, inclusive of the one byte transfer.
Simple two byte SHIFTOUT using LSBFIRST:
240 mS additional per byte transferred.
From that we can develop the following general formula:
Total BS-2 execution and data transfer time = 990 mS + (240 mS * (n - 1))
where "n" = total number of bytes.
I will leave the actual calculations to the reader.
One might tend to think that we must issue two SHIFTOUTs per EEPROM write access, due to the WREN then WRITE requirement. Since FRAM memories support zero wait states, I would be quite tempted to try and use only ONE SHIFTOUT command to perform a memory write, thusly:
wren_op con $06 'Op code for write enable
write_op con $04 'Op code for memory write
data_addr var word '16 bit data address (15 significant)
datum var byte '8 bits, one byte of data
SHIFTOUT cpin, dpin, LSBFIRST, [noparse][[/noparse]wren_op, write_op, data_addr, datum]
This will save you the overhead of one complete SHIFTOUT, at the mere expense of 8 bits of data transfer (the WREN command) prefixed to the memory write command. I would expect that to be successful, based on my reading of the FRAM datasheet. Your own mileage may vary
Regards,
Bruce Bates
·· That sounds like an awfully long time.· Perhaps you should post your code so that we can determine if there's something else going on.· 2000 passes through a loop not writing data should take less than·2 seconds.· Reading memory, on a BS2 AND printing it to the DEBUG screen took almost 15 seconds.· Reading it and not writing it to the DEBUG screen took about 3 seconds.· Writing without DEBUG took about 5 seconds using the internal EEPROM.· It would take longer with an external EEPROM, but not that long.· BTW, all tests were using 2000 bytes from location 0 through 1999.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
So to stay on topic;
I am Using the BS2
I am Using the 25LC640 , not the FRAM chip I just got them this morning but there surface mounts (my second order of chips and I screwed up, I guess they dont make them in thru hole package size so now I have 4 of them and maby I can make a nice set of earrings or something because I have no idea how to mount something like this.
The program code, and all details on how to hook it up I got here[noparse]:http:[/noparse]//www.geocities.com/SiliconValley/Orchard/6633/EEPROM.html
so the read status sends one byte and then reads one byte
Then you set a latch sending 1 more byte
Then you send the address 16 bit number and the byte you want to store.
I just did some quick and dirty timing for example just doing 2000 read status gosubs and some others to get a quick idea what was taking time
Like I say I understand a tiny fraction of what I am doing, kinda like throwing a rock in a pool of water and saying hey it makes ripples, the depth of discussion that could flow from that simple act and the understanding of what the forces are and how they all interact spured great thinkers into learning how to split atoms.
So to sum up, I was able to buy a raw chip from a chip supplier, wire it up to the BS2 and store and retreive information from it. I am happy to have done that and I was looking forward to trying the FRAM chips 256kbits but like I say they are surface mount tiny critters, so small I need 2 magnifying glasses to read the info on them.
Is there a way for the low budget hobby hacker to mount these tiny bugs?
The chip is only 1/4 inch x 1/4 inch with 4 pins on each side. Probbly what they use on smart cards or something.
I am going to buy some potato chips on the way home, i know the brand I like.....
http://www.parallax.com/detail.asp?product_id=602-00013
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Post Edited (Paul Baker) : 8/25/2005 8:11:31 PM GMT