PDA

View Full Version : Error code help!



Picman 35
- 31st July 2007, 21:01
I am new at this pic chip stuff and needed some basic help on an error that I am getting.

I am using a PIC16F917 for my project and get the following error when I try to compile my program....

Error[115] c:\pbp\16f917.inc 27 : Duplicate label ("EEDATA" or redining symbol that cannot be redefined)

I loaded the latest MPLAB IDE v7.60 and then started to get this error.

Any help would be greatly appreciated.....

Regards,
Picman 35

mackrackit
- 31st July 2007, 21:11
Just making a guess. You are setting the fuses in your code.
Have you read this? http://www.picbasic.co.uk/forum/showthread.php?t=543
Read the whole thing.
If this is not the problem, post the code.

Darrel Taylor
- 31st July 2007, 23:29
Picman,

Most PIC chips already have a register called EEDATA.

If you are trying to create a variable or constant with the same name, you will get an error.
<br>

Picman 35
- 1st August 2007, 04:35
DT,

I don't know if my last reply got through, so I will list the code below that the assemblier is looking at.

Note: The last two lines are the problem, I think?? This code was included in the C:/pbp folder.....

Any ideas? Should I just remove the last two lines???

Thanks,
Picman 35


************************************************** **************
;* 16F917.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2005 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 02/28/05 *
;* Version : 2.46a *
;* Notes : *
;************************************************* ***************
NOLIST
ifdef PM_USED
LIST
include 'M16F91x.INC' ; PM header
device pic16F917, xt_osc, wdt_on, protect_off
XALL
NOLIST
else
LIST
LIST p = 16F917, r = dec, w = -302
INCLUDE "P16F917.INC" ; MPASM Header
__config _XT_OSC & _WDT_ON & _CP_OFF
NOLIST
endif
LIST

#define EEDATA EEDATL
#define EEADR EEADRL

Darrel Taylor
- 1st August 2007, 12:38
No, those lines are there for a reason, and should stay there.

Can you post your code.
Has to be something else wrong.
<br>

Picman 35
- 1st August 2007, 18:47
DT,

I don't think it is the code. As stated, I can put one line and still give me the error.
This all started when I loaded the new MPLAB IDE v7.60. Could this cause the problem?? Or, maybe my settings???

Here is an example of a code that fails (it gives me the two errors)....

'************************************************* ***************
'* Name : UNTITLED.BAS *
'* Author : [select VIEW...EDITOR OPTIONS] *
'* Notice : Copyright (c) 2007 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 8/1/2007 *
'* Version : 1.0 *
'* Notes : *
'* : *
'************************************************* ***************

end

Darrel Taylor
- 1st August 2007, 19:36
OK my fault, wasn't thinking of (the latest) MPASM. :o

I just upgraded MPLAB and found that Microchip has changed a couple things.

They've added aliases that are the same as the defines in PBP's inc file.
The changes can be found in the P16F917.INC file in the MPASM folder.

So, you were right!
Just comment out those 2 lines and it should be fine.

Sorry,

Picman 35
- 1st August 2007, 23:00
DT,

Thanks! I appreciate your response.

I'll keep you updated on my progress (with the project).

Best Regards,
Picman 35