keton
keton

Reputation: 1

how to make sin interpolation of values for transmission to the dac register?

I use the MSP430FR2355 microcontroller and the display connected to it. I create 2 arrays with time and voltage values, a graph is plotted on the display based on these values. After that, I pass these values to the dac register. how can I do sinc interpolation for these values to get a smooth graph? Is it possible to use the hamming window function for this? Another clarification is that the microcontroller does not support floating point.

Or I can make a table of coefficients of the hamming window function and multiply my values by this table, will it work?

Upvotes: 0

Views: 62

Answers (1)

Matt Timmermans
Matt Timmermans

Reputation: 59303

You shouldn't need to use sinc interpolation.

If your signal is properly sampled to begin with, then the original signal contains no frequencies >= Fs/2. In practice, you want to leave a little headroom. If the original signal has no frequencies over Fs x 0.4, for example, then the anti-aliasing filter you need to apply to get a "smooth signal" is much gentler and shorter.

If your DAC supports a higher sampling frequency than you already have, then you should up-sample to the DAC's sampling rate and then apply a digital FIR filter to do most of the anti-aliasing work digitally. This is known as "oversampling".

Regardless, the final anti-aliasing filter should be an analog filter applied to the DAC output. Again, the further your signal is away from Fs/2, the simpler this is. If your signal originally goes up to Fs x 0.4, for example, and you use 2x oversampling, then the DAC output will only have frequencies up to Fs x 0.2, and the analog filter can be very simple. It only has to pass frequencies less than Fs x 0.2 and cut off frequencies greater than Fs x 0.8.

Upvotes: 0

Related Questions