Shop OBEX P1 Docs P2 Docs Learn Events
Addressing of External memory — Parallax Forums

Addressing of External memory

El PaisaEl Paisa Posts: 375
edited 2006-12-24 20:09 in Propeller 1
There is a provision to add External memory (EEPROM or SRAM)· except I2C ?
If there is, Will be in Hardare or software?
I hate to see a Cog dedicated to this task.

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-05 15:54
    Each cog has 2K of RAM to run an assembly program, either your own [noparse][[/noparse]custom], or the Spin interpreter (loaded from ROM when needed) which runs your Spin program that resides in the 32K main RAM. There is no built-in provision for external memory, though Andre' LaMothe and his team have been doing some [noparse][[/noparse]advanced] work with memory swapping/paging for some of their games.

    Still 32K of RAM is quite a lot, especially considering the efficiency of Spin -- do you think you're going to run out of space? Am I missing the question?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • El PaisaEl Paisa Posts: 375
    edited 2006-04-05 16:00
    I am refering to fast Data storage like Digital Scope ADC Data storage.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-05 16:06
    You would have to dedicate pins and write methods to do it, but it wouldn't require a seperate cog unless you want to do it in assembly.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • parts-man73parts-man73 Posts: 830
    edited 2006-04-10 15:49
    I beleive that what he is asking is...Since the i2c eeprom is already used for the program storage, can a second be used for data storage, such as a datalogger project, or other type of storage.

    Perhaps 2 other pins could be used as a separate i2c "channel" ?

    Brian
  • SleepMasterSleepMaster Posts: 12
    edited 2006-04-10 15:57
    Jon Williams (Parallax) said...
    ...though Andre' LaMothe and his team have been doing some [noparse][[/noparse]advanced] work with memory swapping/paging for some of their games....


    I would very much like to hear more about this. Any chance of getting a look at how they are doing it? I see on Andre's site a photo of a Propeller-based board (http://www.xgamestation.com/view_media.php?id=160) which does not seem to have anything more than the single 256K I2C chip for memory. But there is that expansion connector in the center of the board. Perhaps there we will see some paging RAM?
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-04-10 16:00
    Since the propeller has 32K onboard, only the first 32K of the eeprom is loaded, the remaining 224K is accessed via paging.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-04-10 16:18
    Quick replies...

    1. As I understand, you can use a larger EEPROM than the 32KB one, and store your data in the area above 32KB, or...

    2. Those EEPROMs have address pins (A0, A1, and sometimes A2?)
    I assume that the default EEPROM is addressed as '00'? That leaves several addresses free to connect other EEPROMs, or even the FRAMs discussed in this forum earlier, on the SAME pins as the first EEPROM.

    If you want something that isn't I2C, though...
    That would mean dedicating several pins for it, and probably a separate COG.
    If you plan to use it as a high-speed logger, I would use some sort of battery-backed RAM, with 8 I/O-pins for Data, and stick a counter on another I/O-Pin. In addition you need to deal with Read/Write signals, and a reset for the counter.
    The sequence for saving data would then be:
    1. Reset Counter to start at beginning of RAM.
    2. Output Data
    3. Wiggle whatever Write signal is used.
    4. Pulse Counter pin
    5. If more data, Jump to 2.
    Done in Assembler, this can be quite fast...

    If you don't need the write-speed, you could use serial-in-parallell-out shift-registers for Address and Data. This is slower for sequential access, but much faster for Random access. (Also, you don't have to keep track of where in RAM you're working)

    Also, don't worry too much about dedicating COGs for tasks. If a task isn't used constantly, just make certain that it stops and frees the COG. Having 8, 10 or even 20 tasks doesn't matter if they're not all running at the same time. smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • Russ MillerRuss Miller Posts: 25
    edited 2006-04-10 16:37
    Paul Baker said...
    Since the propeller has 32K onboard, only the first 32K of the eeprom is loaded, the remaining 224K is accessed via paging.

    Paul, the 24lc256 is 256k bits, so the entire thing is needed to fill the 32k byte propeller ram. Perhaps one could use a larger eeprom and use the higher addresses for additional storage
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-04-10 16:52
    Russ you are correct on that point. After a little bit of searching the Hydra will have a 128KByte memory, so the gist of my original statement is true.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10
  • Russ MillerRuss Miller Posts: 25
    edited 2006-04-10 17:12
    Paul Baker said...
    Russ you are correct on that point. After a little bit of searching the Hydra will have a 128KByte memory, so the gist of my original statement is true.

    Ok, maybe that is a 24lc1025 which looks like two 64kbyte eeproms. Cool.
    http://ww1.microchip.com/downloads/en/DeviceDoc/21941B.pdf
  • CatweazleCatweazle Posts: 17
    edited 2006-12-20 09:45
    Hi there,

    but don't forget that writing a EEPROM needs 5ms/page (128Bytes 24LC1024)
    So if you need fast writes (datalogger) then you should use a external SRAM or DRAM
  • Beau SchwabeBeau Schwabe Posts: 6,547
    edited 2006-12-20 17:56
    Russ Miller,

    I believe the 24lc1025 will work. There was a thread about 3 months or so ago that discussed this particular EEPROM.

    http://forums.parallax.com/showthread.php?p=604607

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • edited 2006-12-21 05:46
    I just found these that use fast a SPI bus.

    http://www.nanoamp.com/datasheets/N256S08xxHDA.pdf

    Now if I could just find where to buy some.

    -Dan
  • CatweazleCatweazle Posts: 17
    edited 2006-12-22 19:43
    How about interfacing a SIMM Module (30PIN from an old PC) with 16MBytes for very fast and cheap memory.
    EEPROMs are slow (400kHz/1MHz), first you have to send adress, wait for acknowledge then send memory-adress...
    (and writing needs 5ms)

    I've thought about using I2C Portexpanders (Philips,Microchip,TexasInstruments...) but thats the same prob with the I2C speed.
    A 82C55 (3x8bit) Portexpander was a possible solution (but it is outdated and not very cheap)
    www.csee.umbc.edu/~plusquel/310/slides/8086_IO2.html
    www.diamondsystems.com/files/binaries/har82c55.pdf

    Cheapest solution:
    The adress is shifted via two 74HC164 (very very cheap),
    CAS, RAS, WR (for read,write and refresh) are directly connected.
    -> 14pins needed, thats the bad thing.

    With a 82C55 you need 16 I/O-pins (if you tie /CS to GND) but its much faster than the shift register solution

    I've drawn a schematic for the shift register solution, if anybody has got an idea how to shift the bidirectional datalines,
    please let me know
    945 x 740 - 133K
  • CatweazleCatweazle Posts: 17
    edited 2006-12-22 19:58
    me again,

    If you want to use the 24xx1025:
    Don't forget that the A2 pin has to be tied to Vcc (3.3Volt) [noparse];)[/noparse]
    But you can cascade up to 4 devices (512kByte)
  • David BDavid B Posts: 591
    edited 2006-12-23 04:35
    I don't think you need to do anything more with the data bus to get a working system; you already have a bidirectional data bus by changing the direction of the propeller pins whenever you need to.

    If you Search the projects forum area for "simm", you'll see how I connected a 30 pin simm to an SX52 using basically this same scheme, except for using 8 bit latches instead of shift registers.

    Do modern versions of the 8255s still have that property of setting all their outputs to zero anytime you write to the control register to change direction of any ports? I've used them in the past, but that always a tricky behavior; it sometimes took extra circuitry to make sure that outputs going to zero wouldn't trigger anything.

    David
  • David BDavid B Posts: 591
    edited 2006-12-23 04:51
    Oops, after rereading your post, Catweazle, I realized that by "shift the data" you were referring to reducing the required data bus pin count by using a shift register. I'd thought you meant shift the port direction.

    Yeah, it usually seems that to get speed, you need lots of pins.

    But it's funny - a few years ago, I used to work on an IBM minicomputer with an external rack of hard disks; not all that large by today's standards but it seemed big at the time, like 100 gig or so. But the odd thing was that the entire data access to the rack went through a single serial cable. I don't know how they did it, but its performance was fine.
  • CatweazleCatweazle Posts: 17
    edited 2006-12-23 11:00
    Hi David,

    My intention was to save pins - 16 is to much in my opinion, a SPI like DRAM control would be fine,
    (my english is a little worse, so my phrasing could be a little obscure)
    I have searched for Bidirectional shift registers and found the 74HC598, but I only have a confusing datasheet which I do not understand completely...

    Thanks for your advise, after looking your post in the sx-forum, a cap (10uF) is needed for the SIMM supply,
    I forgot that in my design. Since the power consumtion of the SIMM is high it's a good choice to have one there.

    8255 problem:
    do simple pulldowns at the port not work that out?
    I've used the 82C55 only for one project (for a simple control via 8keys,8leds and a lcd display)
    and it works fine without any extra circuitry.

    - Eric
  • CatweazleCatweazle Posts: 17
    edited 2006-12-24 20:09
    Happy X-MAS, a happy new year and of course happy propelling,

    I've modified the DRAM interface a bit...

    only 6 I/O pins are needed now (if you only use 1bit of the DRAM-SIMM-Module=2MByte)
    The 5-pin Control(Ctrl).-Connector controls serial adress write(Adr-data,Adr-clk) and DRAM read/write(RAS/CAS/WR)
    With a jumper you can put the Data0 line on the Control-connector (6th pin).
    Also you can use the whole 8bit but this will need 13 I/O pins but better performance/speed.

    Schematic and PCB-Board (single sided) is done in (freeware) "Eagle" ... (www.cadsoft.de)

    gtz
    Eric

    Post Edited (Catweazle) : 12/24/2006 8:14:24 PM GMT
    1184 x 740 - 166K
Sign In or Register to comment.