Hello,
I am a beginner in Microcontroller programming and wasn't sure how I should address the below issue I was having.
I am trying to use the Teensy 3.2 to continuously read an analog signal being fed to an analog pin using the analogReadContinous() statement, store it in an array of length 100 (which gives me a delay of roughly 100us) and then feed this array to the DAC using the analogWrite() statement so it can output this on pin A14. So essentially, I want to continuously sample the analog signal coming in from a function generator or other source (via ADC), save the samples (causing a certain delay), output the samples (DAC).
When I run the code attached, I don't get a clean signal out using the DAC. Is this due to the DAC speed? If so, how can I improve the DAC speed? I read a few forums on using DMA with DAC, would that be the way to go about it?
Basically, I am just trying to build a fast analog read, do some computation or delay the digital samples and fast analog write. Any help or guidance would be greatly appreciated.
Thank you so much for your help!
I am a beginner in Microcontroller programming and wasn't sure how I should address the below issue I was having.
I am trying to use the Teensy 3.2 to continuously read an analog signal being fed to an analog pin using the analogReadContinous() statement, store it in an array of length 100 (which gives me a delay of roughly 100us) and then feed this array to the DAC using the analogWrite() statement so it can output this on pin A14. So essentially, I want to continuously sample the analog signal coming in from a function generator or other source (via ADC), save the samples (causing a certain delay), output the samples (DAC).
When I run the code attached, I don't get a clean signal out using the DAC. Is this due to the DAC speed? If so, how can I improve the DAC speed? I read a few forums on using DMA with DAC, would that be the way to go about it?
Basically, I am just trying to build a fast analog read, do some computation or delay the digital samples and fast analog write. Any help or guidance would be greatly appreciated.
Thank you so much for your help!