Hello, I am working on a project and I am trying to obtain the phase and amplitude of a 40kHz using my teensy.I am generating the wave with a function generator. The serial plotter gives a good sine wave figure for 4kHz but when I increase the frequency to 40kHz the shape is distorted. I am new to microcontrollers, so I don't really know how to improve it because I know the teensy should be able to read 40kHz.
my code
int val;
void setup() {
// put your setup code here, to run once:
Serial.begin(2000000);
}
void loop() {
// put your main code here, to run repeatedly:
val = analogRead(A9);
Serial.println(val);
}
Please any suggestions on what to do will be appreciated
my code
int val;
void setup() {
// put your setup code here, to run once:
Serial.begin(2000000);
}
void loop() {
// put your main code here, to run repeatedly:
val = analogRead(A9);
Serial.println(val);
}
Please any suggestions on what to do will be appreciated