Zitat Zitat von bL1nK
ich würds mit union machen
Wobei es etwas missverständlich ist, die "byte_t" zu nennen, weil ja insgesamt 16 Bits drinne sind.

Code:
#include <inttypes.h>

typdef union
{
   uint8_t asByte[2];
   uint16_t asWord;
} data16_t;

data16_t variable;

variable.asWord = 0x1234;
variable.asByte[0] = 0x34;
variable.asByte[1] = 0x12;
Zitat Zitat von bL1nK
ps: ich bin mir jetzt nicht sicher mit byte[0] ob der das LSB nimmt denke aber schon.
Das ist architekturabhängig, s.g. Endianess. Für AVR (bzw. avr-gcc) ist das der Fall. Wenn man also Kommunikation macht, muss man da schon aufpassen.