Inerfacing RF 433 module with UART transmission in PIC

Status
Not open for further replies.
Code:
me >>=2;
this is the same as
Code:
me = me>>2;
which means shift right two positions the value of me and then assign the new value back to me

Code:
me |= 0b01000000;

| is the OR operator , any value ORed with one becomes 1 and any value ORed by 0 keeps the old value.
The above code is the same as

Code:
me =  me | 0b01000000;
it essentially sets bit6 of me to a value of 1 while preserving the values of all the other bits.

Code:
bit_set(dec,3);
bit_clear(dec,3);
The two parameters are the variable and the bit to manipulate, (dec,3) means bit 3 of variable dec.
The bit_set function sets the bit to a value of 1 and the bit_clear sets the bit to a value of 0.

Alex
 
Reactions: demetal

    demetal

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…