PDA

View Full Version : Not sure whats wrong here



cncmachineguy
- 6th February 2011, 17:53
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:


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!!

mister_e
- 6th February 2011, 18:04
Looks like a compiler parser "feature"
try

IF (LSH1 &/ HSP1)=1 THEN LIMITHITAnd then

IF (LSH1 &/ HSP1) THEN GOTO LIMITHIT

BTW, you should use "Logical Operator" not "Bitwise operator", unless I miss something.

IF (LSH1 ANDNOT HSP1) THEN LIMITHIT

Darrel Taylor
- 6th February 2011, 18:22
&/ is a bitwise operator.

ANDNOT is a logical operator ...


IF LSH1 ANDNOT HSP1 THEN LIMITHIT

cncmachineguy
- 6th February 2011, 18:49
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.