Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/23/02 08:13
Read: times


 
#26158 - RE: external IRQ and I2C with KEIL C,80537
It sounds like you have set up your Interrupt Service Routine and you are making a direct function call to the same routine; eg,
void isr(void) interrupt n
{
   // Handle the Interrupt
}

void main(void)
{
  isr(); // Direct call to Interrupt Service Routine 
}
You must not do this!

The interrupt extended keyword tells the compiler, among other things, to end the function with a RETI instead of just a RET - so this should be used as an ISR only.

You need to separate-out what needs to be done in the ISR from what needs to be done in the "main loop"

List of 5 messages in thread
TopicAuthorDate
external IRQ and I2C with KEIL C,80537            01/01/70 00:00      
RE: external IRQ and I2C with KEIL C,80537            01/01/70 00:00      
RE: external IRQ and I2C with KEIL C,80537            01/01/70 00:00      
RE: external IRQ and I2C with KEIL C,80537            01/01/70 00:00      
RE: external IRQ and I2C with KEIL C,80537            01/01/70 00:00      

Back to Subject List