Not sure whats wrong here


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869

    Default Not sure whats wrong here

    This is being with 2.6A for 16F1947

    here is the error message:
    ERROR: Macro NAND?TTL not found in macro file.Halting build on first failure as requested.
    BUILD FAILED: Sun Feb 06 12:43:14 2011
    and the offending code:
    Code:
    IF (LSH1 &/ HSP1) THEN LIMITHIT
    I tried it with and without the (), still no joy.
    LSH1 and HSP1 are both bits, so I thought this should work?

    Any insight would be great here, thanks!!
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Not sure whats wrong here

    Looks like a compiler parser "feature"
    try
    Code:
    IF (LSH1 &/ HSP1)=1 THEN LIMITHIT
    And then
    Code:
    IF (LSH1 &/ HSP1) THEN GOTO LIMITHIT
    BTW, you should use "Logical Operator" not "Bitwise operator", unless I miss something.
    Code:
    IF (LSH1 ANDNOT HSP1) THEN LIMITHIT
    Last edited by mister_e; - 6th February 2011 at 18:27.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    &/ is a bitwise operator.

    ANDNOT is a logical operator ...

    Code:
    IF LSH1 ANDNOT HSP1 THEN LIMITHIT
    DT

  4. #4
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: Not sure whats wrong here

    Thank you both! Turns out I finally get the difference now. I have read it in the manual and somehow kept not being able to make the distinction.

    As a side not, I really needed ORnot instead of ANDnot. but thats a different story.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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