PDA

View Full Version : Error using DT's Inst Interrupts and PIC BASIC PRO Long



ozarkshermit
- 5th December 2014, 21:15
I'm using a 18F14K22m running at 16 mhz, internal osc. Also using DT's instant Interrupts and AllDigital

Using PBP 2.60A

The program works fine - - I want to use PB Pro Long, for some Long variables. I get an error:
Error: Macro Div32? not found in macro file.

I'm using the Div32 in a temperature conversion routine, with an DS18B20, and everything is fine.
The temperature reads correctly. I won't be using any long variables in that routine.

I declared a large variable, and tried to display it using a simple serout2 to display the value, and it seems to be ignored.

Any Comments . .

Ken

Demon
- 6th December 2014, 00:19
If you're using Microcode Studio, there's a setting for PBPL, you want that enabled.

Robert

Edit: look at this,

http://www.picbasic.co.uk/forum/showthread.php?t=13302&p=90082#post90082

ozarkshermit
- 6th December 2014, 06:15
Thanks Robert -

I have PBPL enabled (the box is checked)

Ken

Demon
- 6th December 2014, 06:39
Is it working?

Archangel
- 6th December 2014, 08:32
Div32 is not used with longs as all division is 32 bit using longs

ozarkshermit
- 6th December 2014, 15:51
DT's Interrupts have nothing to do with this problem.

It seems that whenever a div32 is used with longs, I get the error.

To simplify things, I am using Bruce's temperature conversion routine, reading a DS18B20, and it uses a DIV32 statement.
This all works fine, except when I want to use LONGS for another variable elsewhere in the program, then I get the error.
If I comment out the DIV32, there is not a compile error, but of course the temperature is screwed up.
I can display the LONG variable just fine in either case.

Yes, I do have the LONG box selected.

I guess I just will not attempt to use a LONG variable with a program that uses DIV32.

Ken

ozarkshermit
- 6th December 2014, 18:11
Found the problem - - RTFM - -

Bottom of page 40 of the PBP manual

Ken