Exclusive OR - XOR


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Truth Table

    Hello,
    Well something like this:

    pin0 pin1 pin2
    0 0 0

    0 1 1

    1 0 1

    1 1 0

    I want the pic to do exactly what a 7486 TTL chip will do
    from signals generated by other code.

    example:
    sub1
    portb.0 high
    pause 500
    portb.0 low
    pause 500
    return

    sub2
    if portb.1 = 1
    then portb.0 high
    else
    return

    I need to control 1 output xor from 2 inputs.
    It's really simple to combine 2 outputs into a 7486 xor
    chip to achieve this, but I am sure it can be done internaly
    in a pic.. In the above example the first sub would always output
    a flashing signal, whereas sub2 would output a steady signal only
    if sub 1 was not running. I haven't had time to get back to this
    but I have some ideas as to how to do it.
    thanks for asking.
    JS

  2. #2
    ro37bis's Avatar
    ro37bis Guest


    Did you find this post helpful? Yes | No

    Default xor

    hello test some like this:

    PIN VAR PORTB.0
    OUT1 VAR BIT
    OUT2 VAR BIT

    PIN = OUT1 ^^ OUT2 ' alternative syntax is PIN = OUT1 XOR OUT2

    bye
    Roberto

Similar Threads

  1. A logic gate chip with 1 ea XOR and 2 ea AND gates?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 5th August 2009, 05:29
  2. XOR result different with PC application
    By Pic2008 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 26th January 2009, 04:56
  3. Exclusive bit settings (i.e. PORTS)
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st March 2007, 21:37
  4. Xor Sum
    By Sphere in forum General
    Replies: 3
    Last Post: - 7th December 2006, 07:52
  5. Exclusive OR howto?
    By Ali_en in forum General
    Replies: 2
    Last Post: - 5th May 2005, 12:11

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