$ 0 0 Hi Alberto, I am afraid that I can't help with structuring your program. Maybe you should move the 256 reads cycle and j++ in an ISR that is fired by the GPIO interrupt.