Hi All,
I have a signal processing project running on a PIC processor. I would like to take advantage of the much higher Teensy speed to perform more advanced DSP processing. I have a few hopefully simple questions:
On the PIC I have a hardware timer with 125uSec period which automatically triggers an ADC 12bit read (or indeed several which can be hardware averaged). I transfer the readings to a buffer within an ISR and process them separately. I can fine tune the sampling interval in increments of 1usec "on the fly" in order to maintain synchronization with a FSK signal.
What is the best way to do this on a Teensy 4.0/4.1? Is there a feature for timer-triggered ADC readings where I can also fine tune the sampling frequency "on the fly"? I did read that you can trigger the ADC from an internal PWM output. I'm happy to process the ADC readings in an ISR. I just need the actual sampling rate to be precise (crystal controlled) plus have the ability to trim the sampling frequency up/down by small amounts.
Given the sampling is quite slow compared with many applications, I realise that I could take a timer interrupt and trigger the ADC reading from an ISR.
The PIC has good voltage ref facilities and I realise I will need to provide something better than the internal reference on Teensy.
I have a signal processing project running on a PIC processor. I would like to take advantage of the much higher Teensy speed to perform more advanced DSP processing. I have a few hopefully simple questions:
On the PIC I have a hardware timer with 125uSec period which automatically triggers an ADC 12bit read (or indeed several which can be hardware averaged). I transfer the readings to a buffer within an ISR and process them separately. I can fine tune the sampling interval in increments of 1usec "on the fly" in order to maintain synchronization with a FSK signal.
What is the best way to do this on a Teensy 4.0/4.1? Is there a feature for timer-triggered ADC readings where I can also fine tune the sampling frequency "on the fly"? I did read that you can trigger the ADC from an internal PWM output. I'm happy to process the ADC readings in an ISR. I just need the actual sampling rate to be precise (crystal controlled) plus have the ability to trim the sampling frequency up/down by small amounts.
Given the sampling is quite slow compared with many applications, I realise that I could take a timer interrupt and trigger the ADC reading from an ISR.
The PIC has good voltage ref facilities and I realise I will need to provide something better than the internal reference on Teensy.