View previous topic :: View next topic |
Author |
Message |
Wilson Antonieti
Joined: 22 Jun 2005 Posts: 1 Location: Santo André
|
compiler error on external interrupt |
Posted: Mon Aug 22, 2005 8:02 am |
|
|
Hi folks,
I´ve got a problem with compilation a sw. I´m using PIC18f452 and error occur on external interrupt 0. A piece of my sw described below:
...
ext_int_edge(0,h_to_l); enable_interrupts(int_ext);
enable_interrupts(global);
clear_lcd();
while(true)
{
comand_lcd(0x80);
printf(write_lcd,"Waiting int. ");
delay_ms(1000);
}
#int_ext
void int_ext_isr()
{
clear();
comand_lcd(0x80);
printf(write_lcd,"Received!!");
receive_data();
decoder_data();
}
Compiler show "A numeric expression must appear here" on "int_ext" line.
Well, i really can´t understand why occur this error. Any ideas? Any help?
Thanks, Wileti |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1908
|
|
Posted: Mon Aug 22, 2005 8:13 am |
|
|
The two things that come to mind are:
1. That error usually pops up if there is a problem with the code ABOVE the line that the compiler flagged. Check for missing (), {}, ;
2. The other thing I can think of is that I've never seen an interrupt declaration below the main{}. Try moving the #int_EXT declaration to before main{}. |
|
|
|