PDA

View Full Version : LOOKUP2 not working?



Charlie
- 30th November 2012, 16:41
I thought I'd experiment a bit with Darrel's DT_Analog. I got my A-D working, then included DT_Analog.pbp and I keep getting a compile time error
Error[113] c:\pbp\pbpppil43.lib 702 .. Symbol not previously defined (LOOKUP2).

I'm using PBP 2.6 and the device is a 16F1828. Any ideas?

Darrel Taylor
- 30th November 2012, 20:46
Charlie,

Have you been modifying the Libraries?

There is no such file as pbpppil43.lib.

Charlie
- 30th November 2012, 21:55
Not modifying libraries, but not using spell check either. It should be pbppi14e.lib
I did recently install MPLAB X for testing, but put it in a completely different directory structure.

mackrackit
- 1st December 2012, 01:43
MPLAB X for testing

OH NOOOooooooooo......

Just use the MPLAB that shipped with PBP and save yourself the headache.

Charlie
- 1st December 2012, 03:19
OH NOOOooooooooo......

Just use the MPLAB that shipped with PBP and save yourself the headache.
I honestly think I am doing that.
But this is a very strange error... My next step is to try to recreate the fault without Darrel's code, but first I need to learn about LOOKUP2.

mackrackit
- 1st December 2012, 04:59
LOOKUP2 is just the big brother of LOOKUP, so here are a couple of examples.
http://melabs.com/samples/PBP-mixed/lookup.htm

And this will place the value of a string into a variable


BUFFERQ VAR BYTE[13]
B0 VAR BYTE
B1 VAR BYTE
'#####################
FOR B0 = 0 TO 12
LOOKUP B0,[" MACKRACKIT",10,13],B1
BUFFERQ(B0) = B1
NEXT B0

Charlie
- 1st December 2012, 10:43
I have now noticed a second error in my posting - the undefined Symbol is actually "LOOK2". (NOT LOOKUP2). I really need less coffee, I think.
I did a search of my code, and Darrel's code, and there is no LOOK2.
I removed the include for Darrel's code and the problem goes away; however if I add a statement containing "LOOKUP2", even if it's not executed, the error returns, so it's a library problem, and not a coding problem, It seems that somewhere in the compile process, "LOOKUP2" gets changed to "LOOK2" and bombs.
The search continues...

Charlie
- 1st December 2012, 19:00
Well, after poking a bit, I realized I had modified this library about a year ago to support "LCD Any Pin". I put the original back and that solved the problem. I'll have to do some digging to figure out what mistake I made, but it's clearly my issue so thanks for thinking about it and I'll take it from here. I have not noticed it in all this time, likely because I've been using 18 series parts, which don't use this lib.

Thanks also to Darrel for the gentle hint around the place to start looking.