Logical difference between 2 8-bit ports XOR?


Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Dec 2008
    Location
    Los Angeles, CA
    Posts
    156

    Default Logical difference between 2 8-bit ports XOR?

    I'm trying to use XOR, and don't get it. I want an 8-bit binary number showing the difference between two 8-bit ports.... i.e. port X reads one thing, port Y reads another thing, how are they different. How do you do it, because this does not work...

    Code:
         I2CREAD SDA1,SCL1,DJAM,[X]
         X=X^%11111111
    
         I2CREAD SDA1,SCL1,IRS,[Y]
         Y=Y^%11111111
         
         Z= (X XOR Y)
         
         DEBUG BIN8 Z,10,13
    The ports are different, but this returns all 1's.

    Thanks!
    Last edited by circuitpro; - 23rd July 2010 at 03:27.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts