Fast External Memory


Closed Thread
Results 1 to 36 of 36

Hybrid View

  1. #1
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164

    Default Fast External Memory

    I need to keep track of two large arrays (1024 elements) of LONGs in a two-channel pulse height analyzer. As each value comes in I need to increment that element by one. For example, if ADC1 returns a value of 258 I need to get the value of MyLongArray[258] and add 1 to it.

    I am currently doing this by streaming the data out to a PC and letting the PC do the work of storing and updating the array. I'd like to move this into a self-contained board instead.

    The largest (RAM-wise) PBP-compatible PIC can only maintain one of these arrays so I'm thinking some external RAM might do the trick. I've tried using Ramtron serial F-RAM but it just takes too long. It appears that the I2C interface is too slow with PBP.

    So I'm wondering if any of you folks have any suggestions. Is there a way to use SPI or I2C with PBP that lets me get up to or above 1 MHz? Alternately, could I bit-bang parallel memory in a high-speed fashion? Or is there some other way to accomplish the same goal?

    Thanks,
    Paul

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    prstein, What is the frequency you are updating this ram histogram?

    Dave Purola,
    N8NTA

  3. #3
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dave View Post
    prstein, What is the frequency you are updating this ram histogram?

    Dave Purola,
    N8NTA
    Dave,

    The timing for pulses coming in is random, but it might be as high as a few thousand per second all totaled up.

    Paul

  4. #4
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default

    Is it a bad idea to use two of the pics you say are capable of maintaining one of the arrays?
    I would think an 8 bit parallel interface between them could be that fast.
    Definitely faster than SPI or I2C could do it.

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default

    I'm not familiar with the F-RAM products. I just use chips like the AT24C1024 when I need external ram.

    Sorry, I can't comment on speeds and interfacing right now, I'm still too rusty (been out of the loop too long). But you might want to take a look at those, they are common and cheap.

    I'm just throwing this out in case it actually is helpful to you.


    Features
    • Low-voltage Operation
    – 2.7 (VCC = 2.7V to 5.5V)
    • Internally Organized 131,072 x 8
    • 2-wire Serial Interface
    • Schmitt Triggers, Filtered Inputs for Noise Suppression
    • Bi-directional Data Transfer Protocol
    • 400 kHz (2.7V) and 1 MHz (5V) Clock Rate
    • Write Protect Pin for Hardware and Software Data Protection
    • 256-byte Page Write Mode (Partial Page Writes Allowed)
    • Random and Sequential Read Modes
    • Self-timed Write Cycle (5 ms Typical)
    • High Reliability
    – Endurance: 100,000 Write Cycles/Page
    – Data Retention: 40 Years
    • 8-lead PDIP, 8-lead EIAJ SOIC, 8-lead LAP and 8-ball dBGATM Packages
    Description
    The AT24C1024 provides 1,048,576 bits of serial electrically erasable and programmable
    read only memory (EEPROM) organized as 131,072 words of 8 bits each. The
    device’s cascadable feature allows up to 2 devices to share a common 2-wire bus.
    The device is optimized for use in many industrial and commercial applications where
    low-power and low-voltage operation are essential. The devices are available in
    space-saving 8-lead PDIP, 8-lead EIAJ SOIC, 8-lead Leadless Array (LAP), and 8-ball
    dBGA packages. In addition, the entire family is available in 2.7V (2.7V to 5.5V)
    versions.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  6. #6
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Art,

    Not a bad idea, but that's a lot of pins (and capability) going to waste. I went and actually tested some code and I can't *quite* fit an array of 1024 LONGs, but I can break it down and get 1024 24-bit values.

    This discussion started me looking around, and I'm thinking of picking up a few of these to try: http://search.digikey.com/scripts/Dk...=800-1433-5-ND

    Robert,

    Thanks for the input, but that device looks way too slow.

    Best Regards,
    Paul

Similar Threads

  1. External memory routines?
    By John_Mac in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th April 2009, 02:13
  2. external Memory
    By jerryf in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 29th November 2008, 02:06
  3. PBP/PBPL and external memory
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th November 2007, 05:31
  4. PBP External Memory Bus Support
    By ALFRED in forum mel PIC BASIC
    Replies: 4
    Last Post: - 25th December 2006, 08:42
  5. external memory
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th April 2006, 00:51

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts