Here is what I am trying to do:
sbit PORT_1_0 = P1^0;
void main () { PORT_1_0 = 1; while(1) { PORT_1_0 =~ PORT_1_0; } }
Now this is as simple as it gets. The question is, is it possible to do the same thing using an element of a struct?
Something like:
struct abc { unsigned char bit : 1; };
struct bit bit_array[24];
bit_array[0].bit = P1^0; //Assign the port pin to be toggled
//and then the toggling here.
Basically, how to assign a port pin to the bit in a struct? I am doing this because based on the address of a frame, I need to decide which pin is to be set. I hope you get the question.
Per,
Thanks for the information. Best Regards!