WeirdMatter
Member
// Teensy 3.6 on Windows
Ultimately, I'm working on a project in which I would like to send a ~40 kHz signal as an input into the Teensy. I would then like to generate a 38 kHz square wave and multiply that wave against this input wave, so as to create signal that has been "shifted" to an audible frequency. Finally, I'd like to keep a rolling average of this product as an output.
Is this project feasible with the Teensy 3.6, or am I trying to reach beyond its capabilities?
Details:
I've worked through some of the examples and tutorials for the Teensy, and I've so far been able to read in an analog sine wave (up to at least 40 kHz) and I've been able to output this same sine wave, although it gets quite choppy upwards of 10 kHz. I've also been successful in using the analogWriteFrequency() function to output a nice 38 kHz square wave (thanks to this post).
So, I'm at the point that I would like to generate a 38 kHz internal square wave and multiply each of the input signal's data points to the corresponding data point of the square wave (+/- 1). However, so far, I haven't been able to dig up any sort of information about creating an "internal square wave" with the Teensy. Is it possible to do this?
If it is possible to generate an internal square wave, would anybody have any suggestions/pointers (tutorials would be a god-send) on how I might go about snagging individual input signal data points and their corresponding points on the square wave?
I'm not entirely new to programming, but I am brand new at microprocessor programming and signal processing.
Thanks in advance!
Ultimately, I'm working on a project in which I would like to send a ~40 kHz signal as an input into the Teensy. I would then like to generate a 38 kHz square wave and multiply that wave against this input wave, so as to create signal that has been "shifted" to an audible frequency. Finally, I'd like to keep a rolling average of this product as an output.
Is this project feasible with the Teensy 3.6, or am I trying to reach beyond its capabilities?
Details:
I've worked through some of the examples and tutorials for the Teensy, and I've so far been able to read in an analog sine wave (up to at least 40 kHz) and I've been able to output this same sine wave, although it gets quite choppy upwards of 10 kHz. I've also been successful in using the analogWriteFrequency() function to output a nice 38 kHz square wave (thanks to this post).
So, I'm at the point that I would like to generate a 38 kHz internal square wave and multiply each of the input signal's data points to the corresponding data point of the square wave (+/- 1). However, so far, I haven't been able to dig up any sort of information about creating an "internal square wave" with the Teensy. Is it possible to do this?
If it is possible to generate an internal square wave, would anybody have any suggestions/pointers (tutorials would be a god-send) on how I might go about snagging individual input signal data points and their corresponding points on the square wave?
I'm not entirely new to programming, but I am brand new at microprocessor programming and signal processing.
Thanks in advance!