PDA

View Full Version : Ever had one of those days....



jmgelba
- 18th April 2005, 17:24
Keep getting compiler error messages and I have no idea why.
Even with this.......

define OSC 10
ADCON1 = 7
TRISA = %11000000
TRISB = %00000000


loop:
PORTB.2=0
pause 1000
PORTB.2=1
pause 1000
PORTB.2=0
pause 1000
PORTB.2=1
pause 1000
goto loop

end



I get "Error[113] d:\program~1\pbp\18f1320.inc 24:Symbol not previously defined (_DEBUG_OFF_4L)"

Any idea as to what is going on?

Tissy
- 18th April 2005, 17:36
I presume you are using a 18F1320 as your chosen device.

Also are you setting your own fuses at the beginning of your code. If you are, you need to disable to predefined and default ones in the .INC file.

Regards,

Steve

jmgelba
- 18th April 2005, 17:54
I am using the 18f1320. Im setting fuses via the epic programmer just as im about to upload the program to the pic. This error occurs and sometimes i dont even get to epic.

Dwayne
- 18th April 2005, 18:20
The datasheet does not show a 10MZ internal clock.

Make sure you have your programmer assigned to external clock, not internal.

Dwayne

jmgelba
- 18th April 2005, 18:27
Im using a 10mhz external ceramic resonator, using the HS fuse.

Im using version 2.43, there was some kind of fix on the latest versions for the configuration of the 18f1320. Could this be the problem?



UPDATE:

Tried the same simple program on a 16f818 and it works as expected. Must be the 18f1320 config error.

anderson037
- 18th April 2005, 19:23
This is probably caused by a label that PBP is using to set configuration bits. PBP expects "_DEBUG_OFF_4L" to be defined in the MPASMWIN header file for the part. For whatever reason (probably related to MPASMWIN version), the label is not defined.

You can probably fix it by upgrading to the latest version of MPASMWIN.

You can also edit the PBP file 18F1320.INC. The debug bit defaults to off, so there's no reason for PBP to specify it. Comment the offensive label at the end of the line:

__CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L ;& _DEBUG_OFF_4L