CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

compiler error on external interrupt

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Wilson Antonieti



Joined: 22 Jun 2005
Posts: 1
Location: Santo André

View user's profile Send private message

compiler error on external interrupt
PostPosted: Mon Aug 22, 2005 8:02 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Aug 22, 2005 8:13 am     Reply with quote

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{}.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group