Hello,
One simple method is to create a union between the 32-bit value and a 4-element array. For example,
typedef union {
unsigned long lword;
unsigned char a[4];
} TYPE_32BIT;
TYPE_32BIT val;
Access to 8-bit elements can be achieved with val.a[i], and access to the 32-bit quantity with val.lword.
Regards,
Mac