This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

sending a bit of a char ro any port pin

Dear friends

i would like to know how to send any bit of a char
to any port pin
ie. unsigned char a = 0xAA; now at memory location for a will contains 10101010b can i send the bit 0 of "a" to P1_0? i don't want to send the entire a to P1

thanking you

sunish

Parents
  • Dear friends

    thanks for the suggestions

    i am not trying to transmit the content of a to any distance. just assume, i'd connected 7 i/o devices to port 1, and just want toggle the status of led connected to the 8th pin of port 1 according to the value of bit 0 of char a. here i need to send the bit 0 of char a.that's what all i need without affecting the status of the other pins of port1

    regards

    sunish

Reply
  • Dear friends

    thanks for the suggestions

    i am not trying to transmit the content of a to any distance. just assume, i'd connected 7 i/o devices to port 1, and just want toggle the status of led connected to the 8th pin of port 1 according to the value of bit 0 of char a. here i need to send the bit 0 of char a.that's what all i need without affecting the status of the other pins of port1

    regards

    sunish

Children