9600 Hz is a 600 usec pulse. That's 1,666.7 clock cycles. A 10 bit analog read takes 105.
You could make that pulse with BlinkWithoutDelay using micros() instead of millis() and still be able to run code that does something with that pulse "at the same time".
With BWD, don't forget to change the 2 longs to unsigned longs and put UL at the end of every unsigned long constant value.
CrossRoads:
What are you doing with the array im[] ?
1/9600 = 104uS, so your 600uS seems a little off.
im[ ] array stands for Imaginary[ ].
I need real number arguments and Imaginary number arguments to put in a fix_fft functions to execute a FFT.
Because i only need the real data i set up 0 into de im array. 128 stands for the numbers of samples.
You can set the ATmega328P's ADC into a freerunning mode that will start a new conversion as soon as the old one completes. With an x64 prescaler clock I have been able to push the ADC to about 19,200 samples per second. That's probably the fastest you're going to get while maintaining reasonable accuracy. It complicates your code a little bit though since you have to use the ISR(ADC_vect) to process the output.