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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/24/06 08:52
Read: times


 
#112941 - calculating parity..
Responding to: ???'s previous message
I've found this trick on the net sometime in the past..

v = the_byte_value;
v ^= v >> 4;
v &= 0xf;
parity = (0x6996 >> v) & 1;

of course, the 8051 isn't too efficient with shifting or 16-bit values, so the most efficient way is to move the wanted value to accumulator and reading parity from psw..

List of 30 messages in thread
TopicAuthorDate
odd parity problem            01/01/70 00:00      
   In Raisonance and Keil            01/01/70 00:00      
      OR            01/01/70 00:00      
         How about a portable solution?            01/01/70 00:00      
            calculating parity..            01/01/70 00:00      
            portable my ...            01/01/70 00:00      
         Or another portable solution?            01/01/70 00:00      
         And one more fast method            01/01/70 00:00      
            fast?            01/01/70 00:00      
               Yep            01/01/70 00:00      
                  Bag of Tricks            01/01/70 00:00      
                     bag of tricks..            01/01/70 00:00      
                        Good link. Thanks.            01/01/70 00:00      
                     Collecting            01/01/70 00:00      
                        ciontradictory request            01/01/70 00:00      
                           One confused puppy            01/01/70 00:00      
                              not confused            01/01/70 00:00      
                                 I/O and parity for '51 belongs in Chat            01/01/70 00:00      
                                    If memory parity were implemented, I sur            01/01/70 00:00      
                                       Memory -- expand your thinking a little            01/01/70 00:00      
                                          eeprom would be I/O            01/01/70 00:00      
                                             Memory plus software parity            01/01/70 00:00      
                                             8051 does calculate parity!            01/01/70 00:00      
                                                ALU versus I/O            01/01/70 00:00      
                  no such thought            01/01/70 00:00      
                     My two cents            01/01/70 00:00      
                        Choosing by architecture            01/01/70 00:00      
            thanks:) 18 Bytes each!            01/01/70 00:00      
               "Old" Europe            01/01/70 00:00      
   Simple method            01/01/70 00:00      

Back to Subject List