PDA

View Full Version : Extensions to PBP variables



John_Mac
- 22nd October 2009, 19:08
I am trying to figure out how to use "extensions" to PBP variables...I'm sure that isn't the right name, but what I mean is something like:

INTCON.INTEDG

This works in ASM, but gives an error in PBP. If I use:

INTCON.6

it works fine.

I have a PBP program that has an ASM interrupt routine. When I use the first example above it knows what value INTEDG is and works fine. Same program in the PBP section, it gives an error. All these "extensions" are defined in the .SYM file, but the compiler doesn't seem to know about it for PBP code.

I use the following line config line at the start of the program:

@ device pic16F627A, INTRC_OSC_NOCLKOUT, wdt_off, pwrt_on, mclr_off, lvp_off, protect_off

I haven't seen these "extensions" used in any of the sample programs, but I haven't looked at them all.

Thanks
John

Archangel
- 23rd October 2009, 02:46
i am trying to figure out how to use "extensions" to pbp variables...i'm sure that isn't the right name, but what i mean is something like:

Intcon.intedg

this works in asm, but gives an error in pbp. If i use:

Intcon.6

it works fine.

I have a pbp program that has an asm interrupt routine. When i use the first example above it knows what value intedg is and works fine. Same program in the pbp section, it gives an error. All these "extensions" are defined in the .sym file, but the compiler doesn't seem to know about it for pbp code.

I use the following line config line at the start of the program:

@ device pic16f627a, intrc_osc_noclkout, wdt_off, pwrt_on, mclr_off, lvp_off, protect_off

i haven't seen these "extensions" used in any of the sample programs, but i haven't looked at them all.

Thanks
john
Hi John, something like this ?


INTEDG Var INTCON.6
INTEDG = 0

Darrel Taylor
- 23rd October 2009, 02:55
All the bit names are defined in the assembler files.
But PBP would need to know what those value are at "compile time".

The assembler doesn't execute until after PBP is finished.
So PBP has no idea what they are.

Plus CONstants as bit modifiers are not an accepted syntax for PBP.

Joes example is the best way.
<br>

Archangel
- 23rd October 2009, 03:31
Joes example is the best way.
<br>
He he he . . . guess who I learned it from . . .

Darrel Taylor
- 23rd October 2009, 03:47
M-M-M-M-M-M,

Melanie
Mister-e
Mackrackit
Melabs
Manual

oh, and Me :)
<br>

John_Mac
- 23rd October 2009, 05:21
OK got it...many thanks.