tom_pay
Member
Hi
I am trying to get a PIC to send a byte to another PIC via 433MHz transmitters and receivers.
To get them to talk I need to get the specific bits out of a byte.
How can I do this in a quick and efficient manner?
My current coding is:
; ect.
I was hoping to have a sort of thing that could be like this:
That way it could be used in a for loop.
Thanks
Tom
I am trying to get a PIC to send a byte to another PIC via 433MHz transmitters and receivers.
To get them to talk I need to get the specific bits out of a byte.
How can I do this in a quick and efficient manner?
My current coding is:
HTML:
bit7 = (byte_variable >> 7 ) & 0b1
I was hoping to have a sort of thing that could be like this:
Code:
byte_variable [ bit number ] = bit7
That way it could be used in a for loop.
Thanks
Tom