Go to Post its pretty great when non FIRST friends go into your purse for chapstick or something and find a spike... - anna~marie [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-01-2004, 16:26
Mercutio Mercutio is offline
Atticus Finch Wannabe
#1213 (The Grobots)
 
Join Date: Feb 2003
Location: Birmingham, Michigan
Posts: 63
Mercutio is on a distinguished road
Angry INT2 and INT3 interrupts not working

For some reason, INT2 and INT3 are not working for me. I'm incrementing a variable inside the if (INTCON3bits.INT2IF)... block in the interrupt handler (same for the INT3 if block), but the variable never changes. I know the digital inputs are changing value when I open and close them, and I know the RBIF interrupts are working, but INT2 and INT3 don't respond. Does anyone have some advice?

~Aaron
__________________
"If we knew what we were doing, it wouldn't be called research, would it?"
—Albert Einstein

<X3 What can I do? You broke the tie wraps that were holding together my heart. ^_^
  #2   Spotlight this post!  
Unread 21-01-2004, 16:44
Mercutio Mercutio is offline
Atticus Finch Wannabe
#1213 (The Grobots)
 
Join Date: Feb 2003
Location: Birmingham, Michigan
Posts: 63
Mercutio is on a distinguished road
Cool never mind...

YAY! I FIXED IT! If you're having the same problem, read this:

INT2 and INT3 (the interrupts on digital inputs 1 and 2) ARE NOT ENABLED BY DEFAULT!!!!!

INTCON3bits.INTXIE, the bit that controls whether INTX is enabled (where X is 2 or 3 and probably 1 or 0 as well), is set to 0 by default! You have to change it before the interrupts will work.

If everyone knows this already, feel free to delete this thread, moderator. If this is a problem people might run into, on the other hand, it might be best to leave it up.

~Aaron
__________________
"If we knew what we were doing, it wouldn't be called research, would it?"
—Albert Einstein

<X3 What can I do? You broke the tie wraps that were holding together my heart. ^_^
  #3   Spotlight this post!  
Unread 01-02-2004, 03:16
emusteve's Avatar
emusteve emusteve is offline
Registered User
AKA: Steve Martin
#0470 (Alpha Omega)
 
Join Date: Jan 2004
Location: Ypsilanti
Posts: 66
emusteve is just really niceemusteve is just really niceemusteve is just really niceemusteve is just really nice
Question Re: INT2 and INT3 interrupts not working

Glad you got it working, but where were you able to find out which interupts went with which inputs? I've been trying to find out which PIC ports are which digital inputs for the past week!
  #4   Spotlight this post!  
Unread 01-02-2004, 04:17
Jay Lundy Jay Lundy is offline
Programmer/Driver 2001-2004
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Berkeley, CA
Posts: 320
Jay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to all
Re: INT2 and INT3 interrupts not working

Quote:
Originally Posted by emusteve
Glad you got it working, but where were you able to find out which interupts went with which inputs? I've been trying to find out which PIC ports are which digital inputs for the past week!
RC Dig I/O 1 = RB2 (INT2)
RC Dig I/O 2 = RB3 (INT3)
RC Dig I/O 3 = RB4 (RBIF)
RC Dig I/O 4 = RB5 (RBIF)
RC Dig I/O 5 = RB6 (RBIF)
RC Dig I/O 6 = RB7 (RBIF)
  #5   Spotlight this post!  
Unread 01-02-2004, 13:27
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: INT2 and INT3 interrupts not working

Quote:
Originally Posted by emusteve
Glad you got it working, but where were you able to find out which interupts went with which inputs? I've been trying to find out which PIC ports are which digital inputs for the past week!
The information is in the FAQ and the interrupt and timer template code that can be found here.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 13:45.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi