Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/31/03 06:39
Read: times


 
#47091 - RE: Grabbing a bit from a byte?
Responding to: ???'s previous message
many possible ways there , 51 itself capable of bit porccessing , more you cal also use what we call mask.
problem is i donno the C51 but assemly jut move the byte to accumulator and you can access every bit of it.

acc.0,acc.1.............


to use mask in C

#define bit0 0x1
#define bit1 0x2
#define bit2 0x4
#define bit3 0x8
#define bit4 0x10

....
....
....
#define bit7 0x80

<variable> = <variable> & <mask>


mask can be bit0,bit1...............



abhishek





List of 10 messages in thread
TopicAuthorDate
Grabbing a bit from a byte?            01/01/70 00:00      
   RE: Grabbing a bit from a byte?            01/01/70 00:00      
   RE: Grabbing a bit from a byte?            01/01/70 00:00      
      RE: Grabbing a bit from a byte?            01/01/70 00:00      
         RE: Grabbing a bit from a byte?            01/01/70 00:00      
            RE: Grabbing a bit from a byte?            01/01/70 00:00      
         RE: Grabbing a bit from a byte?            01/01/70 00:00      
            RE: Grabbing a bit from a byte?            01/01/70 00:00      
            RE: Grabbing a bit from a byte?            01/01/70 00:00      
   RE: Grabbing a bit from a byte?            01/01/70 00:00      

Back to Subject List