DwayneR
- 9th December 2009, 19:10
Good day to all.
I'm continuing my journey as a PBP newbie and have another reasonably simple question:
How can I use bit names within PBP statements?
One recurring problem I have when porting code between different PICs is the location of the a/d converter go/done bit. Its easy in assembler: I simply define that bit in my header files and the proper bit is used even when I change processors. Eg: #define _GO_DONE ADCON0,1
But it doesn't seem to work in PBP.
This works:
adcon0.1 = 1
This doesn't work:
adcon0.GO_DONE = 1
even though GO_DONE has been equated to 1 in the appropriate header file (M16F88X.inc)
I'm sure its simple - could someone point me in the correct direction?
Many thanks!
dwayne
PS - the a/d go/done bit is the most common bit I need to change - it moves between .1 or .2, depending upon which PIC I'm currently targeting.
dwayne
I'm continuing my journey as a PBP newbie and have another reasonably simple question:
How can I use bit names within PBP statements?
One recurring problem I have when porting code between different PICs is the location of the a/d converter go/done bit. Its easy in assembler: I simply define that bit in my header files and the proper bit is used even when I change processors. Eg: #define _GO_DONE ADCON0,1
But it doesn't seem to work in PBP.
This works:
adcon0.1 = 1
This doesn't work:
adcon0.GO_DONE = 1
even though GO_DONE has been equated to 1 in the appropriate header file (M16F88X.inc)
I'm sure its simple - could someone point me in the correct direction?
Many thanks!
dwayne
PS - the a/d go/done bit is the most common bit I need to change - it moves between .1 or .2, depending upon which PIC I'm currently targeting.
dwayne