Hi, my i have a 12-bit AD-Converter and want to avoid wasting my precious memory space.
Is it possible to put 4k of this 12-bit-word into 1.5k unsigned int (32 bit) variables?
This stuff should be adressable as a kind of ring-buffer.
Think a struct with union should do. But as i'am a relative beginner i'am not sure about the syntax.
Correct, but most users don't use a sampling speed high enough that it matters, and the simplified handling of being able to read/write values with a single odd/even if statement may offset the memory bandwidth issue.
It's the usual KISS contra maximum optimization.
Well, the OP now has a good set of options to choose from.
Only he can evaluate their relative merits according to his specific requirements, constraints, etc - unknown to the rest of us...