A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
compiler error on external interrupt - wantoniet - Aug 22 9:55:00 2005
Hi folks,
I´ve got a problem with compilation a sw through CCS compiler. I´m
using PIC18f452 and error occur on external interrupt0. 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, Wilson

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: compiler error on external interrupt - rtstofer - Aug 22 23:03:00 2005
I don't use that compiler so I am just guessing but...
The # symbol usually starts a preprocessor command. I don't think
the line is a valid preprocessor statement so I think it needs to be
removed or changed to a comment.
But, I am just guessing...
--- In piclist@picl..., "wantoniet" <wantoniet@y...> wrote:
> Hi folks,
>
> I´ve got a problem with compilation a sw through CCS compiler. I´m
> using PIC18f452 and error occur on external interrupt0. 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, Wilson

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: compiler error on external interrupt - john - Aug 23 21:07:00 2005
You need to specify which external interrupt you're using which
would be zero ( #int_ext0 ). the compiler is complaining about the
number missing behind the #int_ext.
--- In piclist@picl..., "wantoniet" <wantoniet@y...> wrote:
> Hi folks,
>
> I´ve got a problem with compilation a sw through CCS compiler.
I´m
> using PIC18f452 and error occur on external interrupt0. 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, Wilson

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )