HEY everyone
I am using dsPIC30F.
As I started a thread before, which is not open anymore.
http://forum.allaboutcircuits.com/showthread.php?t=64772
I am trying to analyze a system. Firstly a 1kHz sine wave is given to the system, then analyze the sine wave. And export DC voltage according to the received sine wave. As a result, the MCU need to generate sine wave, receive sine wave and analyze sine wave.
The signal exported by DAC:
includes a DC part(which is actually decided by calculation of MCU) and a 1kHz sine wave. I also plan to export DAC at 50kHz, which means 50samples/period for the sine wave. The DC part changes slowly actually.
The input signal at ADC:
Sinewave at 1kHz. The MCU ADC(12bits) need to convert at 50kHz, which means 50 samples/period.
Here is my question: If I use a timer triggered ADC as an interrupt and export DAC at the same time, the interrupt will be too big. (conversion ADC, put adc value to array, load DAC value, load the value to output ports.)
The interrupt latency will also be long.
If I do not use a big interrupt, any way to improve?
Regards
Richie
I am using dsPIC30F.
As I started a thread before, which is not open anymore.
http://forum.allaboutcircuits.com/showthread.php?t=64772
I am trying to analyze a system. Firstly a 1kHz sine wave is given to the system, then analyze the sine wave. And export DC voltage according to the received sine wave. As a result, the MCU need to generate sine wave, receive sine wave and analyze sine wave.
The signal exported by DAC:
includes a DC part(which is actually decided by calculation of MCU) and a 1kHz sine wave. I also plan to export DAC at 50kHz, which means 50samples/period for the sine wave. The DC part changes slowly actually.
The input signal at ADC:
Sinewave at 1kHz. The MCU ADC(12bits) need to convert at 50kHz, which means 50 samples/period.
Here is my question: If I use a timer triggered ADC as an interrupt and export DAC at the same time, the interrupt will be too big. (conversion ADC, put adc value to array, load DAC value, load the value to output ports.)
The interrupt latency will also be long.
If I do not use a big interrupt, any way to improve?
Regards
Richie