Questions tagged [c]
C is a high level (i.e. not assembler) programming language often used to program DSPs and other embedded microprocessors as well as being used for systems programming. Features of the language make it especially suitable for programming hardware and writing device drivers.
153 questions
1 vote
1 answer
167 views
Implementing forward-backward filtering on STM32 with CMSIS' biquad cascade function
I am trying to implement a forward-backward filtering scheme to run on my STM32 using CMSIS. Here is an overview of what I am doing Trigger ADC with timer to perform an A/D conversion every 1 ms: $...
0 votes
0 answers
69 views
How to execute an FFT on a zero-padded time domain signal so that it's the same result as its non-zero-padded DFT?
I'm trying to create my own FFT implementation in C. I got it working for 2^N length signals, but it's not outputting what I expect when executing my algorithm on padded signals. For example, an audio ...
1 vote
1 answer
73 views
Why does my 2-FSK samples have the max value across the whole band?
I am trying to generate 2-FSK I/Q samples to use with a HackRF. I iterate through the bits like this: ...
0 votes
1 answer
193 views
For a symmetric FIR filter, can the number of coefficients be even and half of the filter order?
I'm trying to use an assembly DSP library (TriLib by Infineon) and for one of the FIR functions, FirSym_4_16, the implementation has the following constrains: Number of coefficients given by user ...
0 votes
0 answers
45 views
Time lag between two audio files is wrong if sample rate is 48000 hz
I have functions that help me find time lag between two audios: ...
1 vote
2 answers
740 views
How to do FFT with complex numbers - Ansi C code
I have a small issue. I'm going to do FFT2 onto a matrix $X$, and the only library I have is FFTPack. FFTPack is the oldest FFT library, but it's one of the fastest and 100% portable too. The problem ...
1 vote
1 answer
147 views
Getting half the frequency and double the duration from a sine wave generated using C and played using aplay
I am trying to generate a sine wave of 440Hz frequency that lasts for 10 seconds using the following C code: ...
0 votes
0 answers
74 views
What are noise reduction techniques implemented in code, if not graph beautifiers?
How does Noise Reduction techniques implemented in code help us? I am working on an analog accelerometer and while I log the data, I see noise in the data values that is almost constant and in the ...