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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Per Westermark
09/10/12 05:02
Read: 751 times

#188287 - Of course
Responding to: ???'s previous message
Of course it is possible.

If you place your byte variables in bit-addressable memory, then you can read and write individual bits directly. How to do it will depend on your specific compiler, since the C standard doesn't contain any bit variables forcing the compiler vendors to create language extensions to take advantage of the 8051 capabilities.

The other option is to read up on bit operations (& | ^ << >>) in C. Any decent C text book should contain the required information.

List of 11 messages in thread
Different variable bit merge into single variable?      Yagnesh Mehta      09/10/12 04:48      
   Of course      Per Westermark      09/10/12 05:02      
      its bit addressable....      Yagnesh Mehta      09/10/12 05:38      
         No      Per Westermark      09/10/12 06:39      
            just want to check...      Yagnesh Mehta      09/10/12 22:16      
               What was missing in the answers you have already received?      Per Westermark      09/11/12 00:21      
                  no defined bit order      Maarten Brock      09/11/12 03:26      
                     Just use C expression      David Prentice      09/11/12 05:39      
         what is wrong with IE?      Erik Malund      09/10/12 07:01      
            Right!!!!!!!!!!      Yagnesh Mehta      09/13/12 00:29      
               gobbledygook      David Prentice      09/13/12 05:09      

Back to Subject List