From: Muhammad Fahmy F. <m_fahmy_f@ho...> - 2000-12-23 08:01:09
i'm new user for SDCC..
here are some of my code... that fails to respond to external interrupt
signal at INT0..
code unsigned char *LOGO1 = "logo1";
code unsigned char *LOGO2 = "logo2";
code unsigned char *INCOMING = "incoming";
void main( void )
init_mcu(); // OK!
lcd_clear(); // OK!
lcd_puts(4, 0, LOGO1); // OK! before interruption
lcd_puts(0, 1, LOGO2); // OK! before interruption
void External0_ISR(void) interrupt 0
lcd_clear(); // display clears OK! but it stucks here
// never reach the instruction below
lcd_puts(4, 0, INCOMING);
lcd_puts(4, 0, LOGO1);
lcd_puts(0, 1, LOGO2);
does my problem have something to do with "calling other function from ISR
how to handle that if i really need to call other function ?
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
please take a look at chapter 9 of the sdcc documentation.
it is about critical functions
i guess what you shoud do is to declare
> lcd_clear(); // display clears OK! but it stucks here
> lcd_puts(4, 0, INCOMING);
all functions you call from the ISR as critical like
void lcd_clear() critical
// do something
image your main loop is in such a function and the ISR calls it again.
the handling of port-bits and other stuff can be something else but not how
you think it is.
Get latest updates about Open Source Projects, Conferences and News.