Ccs _ View Topic - Int_ext Interrupting In Enable

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Ccs _ View Topic - Int_ext Interrupting In Enable as PDF for free.

More details

  • Words: 352
  • Pages: 2
CCS :: View topic - INT_EXT interrupting in enable

FAQ

Forum Help Profile

Official CCS Support

http://ccsinfo.com/forum/viewtopic.php?t=27783&highlight=inte...

Search

Log in to check your private messages

Register Log in

INT_EXT interrupting in enable CCS Forum Index -> General CCS C Discussion View previous topic :: View next topic Author Breno

Message INT_EXT interrupting in enable Posted: Mon Jul 31, 2006 4:47 pm

Joined: 20 Jul 2006 Posts: 5 Location: Belo Horizonte, Brazil

I am having a problem with interrupts: when I enable INT_EXT, it imediatly goes to the interrupt routine, no matter what border it was configured. I am simulating this in proteus so 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

Joined: 06 Sep 2003 Posts: 6775

Posted: Mon Jul 31, 2006 4:55 pm

Quote: 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

Joined: 20 Jul 2006 Posts: 5 Location: Belo Horizonte, Brazil

Posted: Mon Jul 31, 2006 5:11 pm

Thanks man, this has fixed the problem. But I also tried something that worked: configuring the portb directions after the enable_interrupts.

Display posts from previous: All Posts

Oldest First

CCS Forum Index -> General CCS C Discussion

Go All times are GMT - 6 Hours

Page 1 of 1 Jump to: General CCS C Discussion You can post new topics You can reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls

Go in in in in in

this this this this this

forum forum forum forum forum

Powered by phpBB © 2001, 2005 phpBB Group

2 от 2

01.3.2007 г. 10:29

Related Documents