Wierd result when inverting an input


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: Wierd result when inverting an input

    Code:
    Bell var portB.6
    Report var byte
    main:
    Report = ~~(Bell + 48) 
    debug report
    pause 500
    
    goto main
    Thank you Archangel for your snippet.
    I tried with one tilde character ~(Bell + 48) and it does't work. (Just strange characters)
    I tried with two tildes, as per your example, and what I get is the original Logic state of the pin. It seems that two tildes are simply ignored.

    So, at the moment I have used the IF/THEN/ELSE/ENDIF workaround. Conclusion we cannot invert a pin alias and convert it to ascii using the "!" or the bitwise "~"

    Cheers
    Al.
    Last edited by aratti; - 19th June 2015 at 18:57.
    All progress began with an idea

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