OK Hippy,
you beat me. Wanted to add the thoughts of rolling the aquisition time into the wait time and using more than one EEPROM when I got home
The only trouble is that in my opinion a constant sample rate is pretty important - otherwise you may just miss the important event you wanted to capture... Second, unrolling the loop into a linear sequence only allows a few 100 samples before you either run out of program space or have to loop around - again causing a pause in the sampling.
The best compromise I guess is doing a loop, writing to several EEPROMS, and timing the execution time with a scope (since every data word is written to an EEPROM, those I2C signals can be used as timing markers.
Dummy-Pulsout's between each acquisition can be used to trim the execution speeds with 5us resolution (at 8 MHz), instead of "pause" which has 0.5ms resolution at 8MHz. The longest sample interval will be the one where the loop wraps around, this one would need the shortest pulsout. Yes I know, execution times can change slightly when you change constants or do any changes in the program, but it should be possible to at least get close. I could offer to help - I have several 24LC EEPROMS lying around and access to a good scope.
Code snippet for two EEPROMS (untested!):
for index = 0 to 0xfffd step 2
ReadADc10 pin, w0
i2cslave SLAVE_ADDRESS1, i2cfast, i2cword
I2cWrite index,(b0,b1)
pulsout DUMMY_PIN, DELAY1 ' make that 2.5ms - execution time
Readadc10 pin, w0
i2cslave SLAVE_ADDRESS2, i2cfast, i2cword
I2cWrite index,(b0,b1)
pulsout DUMMY_PIN, DELAY2 ' make that 2.5ms - execution time
next index
That could achieve 500 samples/sec, and even better if you use more EEPROMS in parallel. Since each sample takes about 5 commands (readadc, i2cslave, i2cwrite, pulsout, and loop wraparound) I'd expect the upper limit to be maybe 8000/5 = 1600 samples/sec.
Wolfgang