You are on page 1of 2

CCS :: View topic - INT_EXT interrupting in enable http://ccsinfo.com/forum/viewtopic.php?t=27783&highlight=inte...

FAQ Forum Help Official CCS Support Search Register

Profile Log in to check your private messages Log in

INT_EXT interrupting in enable

CCS Forum Index -> General CCS C Discussion

View previous topic :: View next topic

Author Message

Breno INT_EXT interrupting in enable


Posted: Mon Jul 31, 2006 4:47 pm

Joined: 20 Jul 2006 I am having a problem with interrupts: when I enable INT_EXT, it imediatly goes to the
Posts: 5
Location: Belo Horizonte, interrupt routine, no matter what border it was configured. I am simulating this in proteus so
Brazil there is no bouncing problem.

This initialize the interrupt:


Code:
ext_int_edge(H_TO_L);
enable_interrupts(INT_EXT);
enable_interrupts(GLOBAL);

This is the interrupt routine:


Code:
#INT_EXT
void int_isr(void)
{
c=spi_read(0);
lcd_putc(c);
}

What should I do so the interrupt routine will only be accessed when the PIN_B0 gets low?

Thanks.

Breno

Last edited by Breno on Mon Jul 31, 2006 5:01 pm; edited 1 time in total

PCM programmer Posted: Mon Jul 31, 2006 4:55 pm

Quote:
Joined: 06 Sep 2003
Posts: 6775
When I enable INT_EXT, it immediately goes to the interrupt routine.

Add the line shown below. It may help.


Code:

1 от 2 01.3.2007 г. 10:29
CCS :: View topic - INT_EXT interrupting in enable http://ccsinfo.com/forum/viewtopic.php?t=27783&highlight=inte...

ext_int_edge(H_TO_L);
enable_interrupts(INT_EXT);
clear_interrupt(INT_EXT); // Add this line
enable_interrupts(GLOBAL);

Breno Posted: Mon Jul 31, 2006 5:11 pm

Thanks man, this has fixed the problem.


Joined: 20 Jul 2006
Posts: 5
Location: Belo Horizonte, But I also tried something that worked: configuring the portb directions after the
Brazil
enable_interrupts.

Display posts from previous: All Posts Oldest First Go

All times are GMT - 6 Hours


CCS Forum Index -> General CCS C Discussion

Page 1 of 1

Jump to: General CCS C Discussion Go

You can post new topics in this forum


You can 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

2 от 2 01.3.2007 г. 10:29

You might also like