I am working on a project where I am trying to get an input signal filtered according to its frequency. I checked the signal before it went into my DSP algorithm to see where the problem was and I found that the frequency was remaining the same no matter if I put in 30Hz 120Hz or 58kHz. This leads me to think I have a problem with the sampling rate. Does that sound like it is the actual issue? Or am I barking up the wrong tree?
I was just using the readADC command to read in the data
void setup() //Setup Function to intialise ADC and Serial Communication
{
DDRC=0x00; //PORTC as INPUT
DDRD=0xFF; //PORTD is OUTPUT
DDRD=0xFF;
for(i=0;i<N;i++)
{
InitADC();
a=ReadADC(4);
x[i]=a;
}
Serial.begin(9600);
}