My question is this:
I am programming in C and compiling with XC8 in MPLAB X. I have a sensor that returns data in the form of "unsigned char" (8 bits per data) and I would like to access the bits of that data byte.
I had thought about converting the unsigned char to an array but it is in this step where I am stuck because my programming level is very bad.
Do you think that the best way to access the bits that make up a specific byte is by converting them into an array or is there another method for this?
Basically I want to access each bit that makes up the unsigned char to check by means of LEDs the bits that become 1.
Thank you very much.