6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 17, 2024 1:06 am

All times are UTC




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Memory storage
PostPosted: Tue Nov 01, 2011 9:11 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Since i am building some sbc computers, i would like to have a permanent memory for saving data and programs. Since the floppy drive is kinda tricky i thought about using eeproms, but i don't know which would be bast and cheapest. I was thinking about the 28c256, but i am not sure if this is the best choise for a rewritable memory. What other memories would do? (SD cards need a controller, but i don't have a clue how to make one...)...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Nov 01, 2011 9:24 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
How much memory are you thinking about ?


Top
 Profile  
Reply with quote  
 Post subject: Re: Memory storage
PostPosted: Tue Nov 01, 2011 9:56 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8493
Location: Midwestern USA
Dajgoro wrote:
Since i am building some sbc computers, i would like to have a permanent memory for saving data and programs. Since the floppy drive is kinda tricky i thought about using eeproms, but i don't know which would be bast and cheapest. I was thinking about the 28c256, but i am not sure if this is the best choise for a rewritable memory. What other memories would do? (SD cards need a controller, but i don't have a clue how to make one...)...

I assume you are referring to storage other than the boot ROM needed to get your SBC up and running.

EEPROMs are kind of slow for general storage purposes, although that may not be an issue in your situation. The circuitry required to write to an EEPROM may be a hassle to rig up, as timing can be touchy. The 28C256 has a 32 KB capacity. Will that meet your requirements?

You could look at battery-backed static RAM. Static RAMs are available that use very little power to retain data for a long time (vidi the RAM used in PCs to retain setup data). A CR2032 battery would be all that is required to maintain the RAM when powered down, and you can rig up circuitry to supply juice to the RAM when your SBC is powered up. The only real consideration is the capacity vs. power consumed angle.

Flash memory is another possibility, which can be organized along the lines of disk storage, and can offer much greater capacity. Others here have used flash memory in their projects.

Yet another possibility, for which circuitry has been worked out, is to interface a PATA (aka IDE) hard disk. Although PATA disks are no longer used as OEM hardware in PCs, they will be available for some time to come. Capacity certainly won't be an issue.

If you are a bit more adventurous, you could rig up SCSI as I did for my POC unit, and give yourself access to disks, DVD/CD readers, tapes, etc. Might be overkill though. :lol:

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Nov 01, 2011 10:10 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Well, i would like to have as much capacity as i can get...
I looked at the static ram datasheet, and it seems that it consumes 2mA in standby, which is 2 weeks with 700mah ni-cd battery...
A hard drive would be nice, but i also don't have a clue from where to start... I am opened to any suggestions, i even thought about audio tapes, but then i have to carry my big deack tape player, which is bigger than the sbc itself, and walkman stuff is inposible to get any more. At the end i think it the 28c256 is a much better solution than tapes...
I would like to have fancy hard drives and flash memories, but my budget allows only cheap ic, so i can't get my hands on any fancy fpga or simmilar expencive stuff, the pic/atmel controllers are my budget limit...


Top
 Profile  
Reply with quote  
 Post subject: Re: Memory storage
PostPosted: Tue Nov 01, 2011 10:42 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
Dajgoro wrote:
Since i am building some sbc computers, i would like to have a permanent memory for saving data and programs. Since the floppy drive is kinda tricky i thought about using eeproms, but i don't know which would be bast and cheapest. I was thinking about the 28c256, but i am not sure if this is the best choise for a rewritable memory. What other memories would do? (SD cards need a controller, but i don't have a clue how to make one...)...


If you have an RS-232 port on your SBC, you could use a PC to store your files. I wrote an X-Modem file transfer protocol that uses the SBC's UART to send and receive a file from a PC. That has served me quite well on my SBC-2 boards. The code is in the source code repository:
http://6502.org/source/io/xmodem/xmodem.htm

A more advanced method would be to use my 65SPI and SPI-IDE/CF controller that supports the FAT-16 protocol on IDE Hard Drives or CF modules up to 2GB. More info can be found here (look under SPI IO):
http://sbc.rictor.org/

Daryl


Top
 Profile  
Reply with quote  
 Post subject: Re: Memory storage
PostPosted: Tue Nov 01, 2011 10:56 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8493
Location: Midwestern USA
8BIT wrote:
If you have an RS-232 port on your SBC, you could use a PC to store your files. I wrote an X-Modem file transfer protocol that uses the SBC's UART to send and receive a file from a PC. That has served me quite well on my SBC-2 boards. The code is in the source code repository:
http://6502.org/source/io/xmodem/xmodem.htm

That's a good idea if you aren't concerned with having the storage device separate from the SBC. X-modem in such an application probably is overkill, but if you have a terminal emulator, you might as well go with it. I send data over to my POC using Motorola S-records in plain ASCII. The short physical distance (~10 feet) pretty much eliminates transmission errors.

Quote:
A more advanced method would be to use my 65SPI and SPI-IDE/CF controller that supports the FAT-16 protocol on IDE Hard Drives or CF modules up to 2GB. More info can be found here (look under SPI IO):
http://sbc.rictor.org/

That was one of my suggestions, since IDE mechanisms are readily available and cheap.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 02, 2011 12:13 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
There are bigger ones in the 24256 family also. 24256 is only 32Kx8. There's a 128Kx8 also. There probably won't ever be any huge I²C ones though because of the transfer speed. I²C's low speed won't be a problem for you, but nobody would want to wait for it to transfer 10 megapixel photos for example. There are a lot of SPI flash ICs with several megabytes, including 8-pin ones that are very small. Here's one of my half-postage-stamp-sized EEPROM modules:
Image
The 8-pin DIP is a 24256. The 4-position socket on the end has Vcc, ground, clock, and data (although Daryl and I agreed that all future I²C plugs and modules will use a 6-pin, with one hole blocked so you can't plug it in upside down, and one pin for IRQ\ for things like a keybad controller, RTC with alarms, etc.). I don't put the LED on them anymore. I put the LEDs on the computer so I could see when the power is off and the lines are low so I can know it's safe to plug it in or unplug it. The shorting bar on the far left is for write protect.

As for battery-backed SRAM, the 2mA you mention is the maximum current for being fully powered up. When you deselect it and go down to its low-power retention mode, the data sheet may specify 2uA max, and have typical currents in the nA range. I had a 10uF capacitor keep the memory intact on an 8Kx8 SRAM for 24 hours 25 years ago.

As for audio tape, it's cheap and there's a way to make a modem for a dollar or two, but the speed is extreeeeeeemely slow compared to even I²C, and you can't jump around without a lot of fast-forward or rewind time. You also don't get much on a C-90 cassette. I've done it but there's no justification for it anymore.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 02, 2011 1:14 am 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
The idea is that the data may be stored widouth a separate computer...
The i2c looks interesting, it would be also interesting to be able to use a hard drive... I would like to give it a try and connect ide hard drive, but i never used the SPI interface before, and how do i convert it to a 6502 bus compatible format(running it throught a microcontroller may get a bit slow...)(65SPI-out of budget?)?
As for the serial link it is useful for data transfers...
And the tapes, did anyone ever tried to use vhs tapes for digital data storage?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 02, 2011 3:32 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
Dajgoro wrote:
The i2c looks interesting, it would be also interesting to be able to use a hard drive... I would like to give it a try and connect ide hard drive, but i never used the SPI interface before

SPI is simple, and easy to build for. The link here tells about it, but the data sheet of each SPI IC also has all the info you need.

Quote:
, and how do i convert it to a 6502 bus compatible format(running it throught a microcontroller may get a bit slow...)(65SPI-out of budget?)?

65SPI is a nice solution that I don't think is expensive (the postage will cost you more than the part), but SPI is easy to bit-bang for also, with a few bits of a 6522 VIA. I've done it many times.

Quote:
And the tapes, did anyone ever tried to use vhs tapes for digital data storage?

I know it has been done, but I have not done it myself. The size of the tape plus the machine is huge compared to something like my memory module above. I believe Daryl has tiny PCBs already available for exactly this kind of module.

If you use SPI, I would encourage you to implement a 65SIB (serial interface bus) which we devised here. It accommodates Microwire and dumb 74HCxxx shift registers as well. With primary addressing, it allows seven devices on the bus at the same time. There is a list of advantages given at the linked post.


Top
 Profile  
Reply with quote  
 Post subject: Memory storage
PostPosted: Wed Nov 02, 2011 4:34 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8493
Location: Midwestern USA
Dajgoro wrote:
And the tapes, did anyone ever tried to use vhs tapes for digital data storage?

Actually, such a thing was tried long ago with so-so results. The helical scan principle was sound, but the VHS format (and mechanism) was too imprecise for reliable results. It was determined that the digital audio tape (DAT) format was better suited to data storage. Sony and H-P developed a robust incarnation of DAT with extensive error correction, which became DDS (digital data storage), using both 4mm and 8mm helical scan drives. The original 8mm format is pretty much history and 4mm has evolved to DDS-160 (160 GB per cartridge). Similar formats, such as LTO continue to this day. We ship all our servers with LTO-3 tape drives (400 GB per tape), unless otherwise requested by the client.

You may be able to scrounge up an old DDS-2 tape drive (8 GB per cartridge) from one of the liquidators but you'd need a SCSI port to connect to it.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 02, 2011 6:19 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
If you want maximum capacity, you should go for SD card, using SPI interface.

Here's some info:

http://elm-chan.org/docs/mmc/mmc_e.html
http://www.roland-riegel.de/sd-reader/


Top
 Profile  
Reply with quote  
 Post subject: Re: Memory storage
PostPosted: Wed Nov 02, 2011 9:47 am 
Offline
User avatar

Joined: Tue Sep 11, 2007 8:48 am
Posts: 27
Location: Pruszków/Poland
BigDumbDinosaur wrote:
Dajgoro wrote:
And the tapes, did anyone ever tried to use vhs tapes for digital data storage?

Actually, such a thing was tried long ago with so-so results. The helical scan principle was sound, but the VHS format (and mechanism) was too imprecise for reliable results.


"Video Backup System" for Amiga was not that bad ;)

_________________
Practice safe HEX !


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 02, 2011 1:39 pm 
Offline
User avatar

Joined: Mon Dec 08, 2008 6:32 pm
Posts: 143
Location: Brighton, England
Dajgoro wrote:
I looked at the static ram datasheet, and it seems that it consumes 2mA in standby, which is 2 weeks with 700mah ni-cd battery...


The datasheet for the AS6C4008-55PCN lists its standby current at 4uA typical. This is a 512K x 8 bit static RAM. Other CMOS static RAM devices have a similar standby consumption. Using such a chip with a battery backup chip to handle the changeover to battery power will give you a storage system that will last for years.

If using a CMOS RAM, it is important to ensure that the chip select pin (CS or CE) is held high when the system is in battery mode. If this pin is allowed to go low, the chip becomes active and its current consumption can increase enormously.

_________________
Shift to the left,
Shift to the right,
Mask in, Mask Out,
BYTE! BYTE! BYTE!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 02, 2011 3:01 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8493
Location: Midwestern USA
PaulF wrote:
If using a CMOS RAM, it is important to ensure that the chip select pin (CS or CE) is held high when the system is in battery mode. If this pin is allowed to go low, the chip becomes active and its current consumption can increase enormously.

Also, failing to keep /CE high can result in corrupted contents if noise occurs on /WE (write enable). A weak pullup on /CE will take care of the situation.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 02, 2011 6:50 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10981
Location: England
You can buy DIP modules with a builtin lithium battery and power sequencing/conditioning, for example Maxim/Dallas DS1543 is 64k x8 with a clock, or DS1245 is 128k x8. STM do a M48Z35 too, similar idea.

andysa has a Dallas part on his Sym-1 board.

Maxim have an app note talking about the power conditioning problem - they are selling a solution of course.

Cheers
Ed


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: