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
Bookmarks