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 wonder why you need a long variable for this application? Once that an array has reached a count of 255 (one byte) statistically your pattern is not going to change much till when your long will overflow.
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.
Surely you are doing the transfer via serial port, I don't see why a serial eeprom shouldn't be able to cope with the PC baud rate.
Al.
Last edited by aratti; - 2nd March 2010 at 18:23.
All progress began with an idea
Bookmarks