LunarEclipse57
New member
Hi all,
I am very new to Teensy and have set up a simple code to run a single 900 Hz tone to the DAC and into an oscilloscope to figure out the resistor I need to put on my low pass filter to get a nice crisp and clean sine wave. Unfortunately, the signal I seem to be getting doesn't even look like a sine wave. Am I supposed to setup the DAC before I use it or does the DAC work when it is called from pin A14. My code is below and any help would be much appreciated! Sorry if this is a simple, stupid question.
The closest I was able to get to a sine wave(pretty noisy):
Circuit:
Thanks in advance!
I am very new to Teensy and have set up a simple code to run a single 900 Hz tone to the DAC and into an oscilloscope to figure out the resistor I need to put on my low pass filter to get a nice crisp and clean sine wave. Unfortunately, the signal I seem to be getting doesn't even look like a sine wave. Am I supposed to setup the DAC before I use it or does the DAC work when it is called from pin A14. My code is below and any help would be much appreciated! Sorry if this is a simple, stupid question.
The closest I was able to get to a sine wave(pretty noisy):
Circuit:
Code:
void setup() {
pinMode(12, OUTPUT);
digitalWrite(12, HIGH);
//pinMode(3, OUTPUT);
tone(A14, 900, 500000000000);
delayMicroseconds(3010000);
}
void loop() {
}
Thanks in advance!