This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Packing 12-bit date into int

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.

0