I want to define a 8 BIT variable and char variable that occoupy the same memory loaction in the memory. so any change in the char variable should reflect the bit variable. In C we can define a structure for bit struct num {
unsigned char X:1; unsigned char Y:1; unsigned char Z:1; unsigned char A:1; unsigned char B:1; unsigned char C:1; unsigned char D:1; unsigned char E:1; };
struct num Axis_Move ;
How i can define a Union having one char and 8 BIT variable
"We can do by following way also"
Of course you can. Why did you ask for a union, then?
"but what if the controller dosent have the bdata"
What do you mean? All 8051 derivatives have bit-addressable memory. Whether you use it as such or not is up to you.