Hi,
I'm writing some codes in C18. I have an unsigned int that I wish to break into two chars. I saw something on union struct for a byte, but I don't know how to change it into int. Could anyone help? Thanks.
I wish I can have a variable, say "Value",
Value = 0x8FFF;
Value.HighByte // gives 0x8F
Value.LowByte // gives 0xFF
or any other way that works?
The code I saw for char, so that we can use something like Flags = 0; to set all to zeros or Flags.Timeout = 1; to set a specific value.
Hi,
I'm writing some codes in C18. I have an unsigned int that I wish to break into two chars. I saw something on union struct for a byte, but I don't know how to change it into int. Could anyone help? Thanks.
I wish I can have a variable, say "Value",
Value = 0x8FFF;
Value.HighByte // gives 0x8F
Value.LowByte // gives 0xFF
or any other way that works?