To sample at that speed I would consider a faster MCU/clock speed as you won’t have much time to do anything else. If you supply more details of what you need/want then maybe we can suggest options.
Sorry for the delay, but I have some news!
First of all, what I’m doing is snooping the NES Controller Protocol (Which is based on a CD4021 shift register as probably everybody knows, see here: http://www.mit.edu/~tarvizo/nes-controller.html). I’m not just trying to drive a pad connected to the Arduino, I’m rather intercepting the signals while the console is running, and they’re pretty fast.
I have no problems doing that on a 16 MHz Arduino, even digitalRead() works fine (provided that I use an interrupt to detect clock transitions) but my final objective is to create a sort of modchip to install in the console, so the least components, the better. This means that I would happily avoid the crystal, so I am trying to get things running fine at 8 MHz. It would even be better to use a smaller MCU in the end, my ideal target being the ATtiny84.
But at 8 MHz detection isn’t reliable. I have tried different strategies (direct port manipulation, register variables, different interrupts, etc…), but it seems that the code is always too slow and drags behind the strict timing required. The best result I could get was getting only the first 4 buttons read correctly (over 8 ).
But yesterday I discovered SPI! I spent some time with it and got it working easily on the '328. I used the much neglected (on the Arduino) slave mode, since everything is being driven by the console. Then I switched to the '84 and I found out that there’s no ready-made library and that it doesn’t have real hardware SPI, then I found Atmel’s Technical Note about USI and managed to get something working on the '84 as well. It’s not complete yet, and I’m not sure it will work 100% (it’s hard to debug without a Serial Console), but results are promising so far.
So I guess we are a bit out of topic by now, but anyway… Any hints?