Wierd result when inverting an input


Results 1 to 20 of 20

Threaded View

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


    Did you find this post helpful? Yes | No

    Default Re: Wierd result when inverting an input

    Quote Originally Posted by aratti View Post
    Thank you Dave for the suggestion, but no luck it doesn't work either. With "~" I get ascii 46 when portB.0 is false and the same ascii 47 when the portB.0 is True.

    Looking into the manual the character for the NOT is "!", I could not find any reference to "~" as a NOT notation.

    Cheers

    Al.
    The "tilde" character ~ is a BITWISE NOT. pp35 in the old green book, have misplaced my PBP3 book.

    This works:
    Code:
    
    Bell var portB.6
    Report var byte
    main:
    Report = ~~(Bell + 48) 
    debug report
    pause 500
    
    goto main
    Last edited by Archangel; - 19th June 2015 at 18:02.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. 16F628 PortA pin connections - wierd
    By john meiers in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 10th December 2011, 17:28
  2. Wierd sleep issue
    By orca in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th March 2006, 22:06
  3. Inverting Input Values
    By Peter1960 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st August 2005, 08:09
  4. wierd problem with 12f629 Need Help Despretly
    By Nadeem in forum Off Topic
    Replies: 1
    Last Post: - 15th June 2005, 20:59
  5. Very wierd problem
    By jswayze in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th November 2004, 04:56

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