Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Problem on RB0 interrupt in HT-PICC

Status
Not open for further replies.

arash_micro

Member level 5
Joined
Jan 25, 2005
Messages
91
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
739
picc interrupt

Hi guys.
I've problem on RB0 interrupt in HT-PICC.I use the PICC "interruptDemo" sample.

static void interrupt
isr(void){
if(INTF) {
INTF = 0;
}
}

But mplab says:
Error[845] C:\DOCUME~1\Arash\LOCALS~1\Temp\s7o. 364 : multiply defined symbol "int_func"

Error[845] C:\DOCUME~1\Arash\LOCALS~1\Temp\s7o. 387 : multiply defined symbol "saved_w"

Error[845] C:\DOCUME~1\Arash\LOCALS~1\Temp\s7o. 393 : multiply defined symbol "int_restore"

Error[845] C:\DOCUME~1\Arash\LOCALS~1\Temp\s7o. 402 : multiply defined symbol "int_entry"

Error[845] C:\DOCUME~1\Arash\LOCALS~1\Temp\s7o. 408 : multiply defined symbol "saved_status"

Error[845] C:\DOCUME~1\Arash\LOCALS~1\Temp\s7o. 411 : multiply defined symbol "saved_pclath"

I culdent find even one "saved_w" but it says "multiply defined symbol"

Whats my wrong?
 

rfmw

Advanced Member level 2
Joined
May 10, 2001
Messages
545
Helped
93
Reputation
190
Reaction score
50
Trophy points
1,308
Activity points
3,978
rb0 interrupt

Is this your only interrupt routine? Perhaps you have more than one interrupt routines and compiler complains about it... post your complete code.
 

narccizzo

Full Member level 3
Joined
Jan 20, 2006
Messages
174
Helped
16
Reputation
32
Reaction score
11
Trophy points
1,298
Location
PATZCUARO,MICHOACAN,MEXICO
Activity points
2,819
multiply defined symbol int_func

It looks like you are adding twice some file wich contains that symbols definitions
I dont really sure where is the problem its hard to know only with that info.
but if you..
create a new project,
select a pic16f877 in the config menu,
select language toolsuite, (with correct path),
create a new file paste this code:

#include <pic.h>
static bit RELAY @ (unsigned)&PORTB*8+7;
static unsigned int relay_timer;
void main(void)
{
RELAY = 1; // ensure relay is off before enabling output
TRISB = 0x3F; // Port B bits 7 and 6 are output
T0CS = 0; // Timer increments on instruction clock
T0IE = 1; // Enable interrupt on TMR0 overflow
INTEDG = 0; // falling edge trigger the interrupt
INTE = 1; // enable the external interrupt
GIE = 1; // Global interrupt enable
for(;;)
CLRWDT(); // Idly kick the dog
}
static void interrupt
isr(void)
{
if(T0IF)
{
TMR0 -= 250;
T0IF = 0;
if(relay_timer != 0)
relay_timer--;
if(relay_timer == 0)
RELAY = 1;
PORTB ^= 0x40;
}
if(INTF)
{
RELAY = 0;
relay_timer = 4000;
INTF = 0;
}
}

and save it like mainname.c where the project.mcw resides,
and set the build options in the menu:
project->build options->project like the picture
and add the mainname.c file to the sources int the project.mcw window
if you click Build All icon, you shouldnt have any problem, if yes maybe the problem is in the compiler.:?:
hope this helps..:D
sorry if this looks like dummies kind, all it's for avoid errors
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top