Go to Post Woody says that gracious professionalism is "acting how you would if you grandmother was watching you"... some people must have some really crazy grandmothers. (: - Cappeh [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 24-11-2003, 08:24
thoughtful's Avatar
thoughtful thoughtful is offline
Registered User
FRC #1219 (Emery Iron Eagle)
Team Role: Alumni
 
Join Date: Nov 2003
Location: Toronto,Canada
Posts: 291
thoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to behold
help with Interrupts

Basically i learned that the PIC18 we are using has digital interrupts, how do we use them. Because so far i understand that when the digital interrupt is triggered it stops the main program and goes to address it. Where in the program or how do we specify that which interrupt should result in what procedure. If some canhelp me here it will be great
__________________
.:Bringling Brains to Life:.

03,04,05-Team 1219 Captain
2003 Rookie all Start @ GTR
2005 Galileo Semi-Finalist & Alliance captain
06-Team 1219 Mentor
2006 Radio Shack Innovation in control @ Waterloo
  #2   Spotlight this post!  
Unread 24-11-2003, 11:46
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
The function that is called in response to an interrupt is specified in "user_routines_fast.c". If there is some interest, I could whip-up some example code that uses interrupts and timers.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #3   Spotlight this post!  
Unread 24-11-2003, 12:23
InnovationFirst's Avatar
InnovationFirst InnovationFirst is offline
Official FIRST Supplier
no team
 
Join Date: Nov 2002
Location: Greenville, Tx
Posts: 28
InnovationFirst has a reputation beyond reputeInnovationFirst has a reputation beyond reputeInnovationFirst has a reputation beyond reputeInnovationFirst has a reputation beyond reputeInnovationFirst has a reputation beyond reputeInnovationFirst has a reputation beyond reputeInnovationFirst has a reputation beyond reputeInnovationFirst has a reputation beyond reputeInnovationFirst has a reputation beyond reputeInnovationFirst has a reputation beyond reputeInnovationFirst has a reputation beyond repute
For good general pointers on how to use interrupts, see IFI's white paper titled Using Polled or Interrupt-driven Timers at: http://www.innovationfirst.com/first...ite_papers.htm

It does not specifically address using the external interrupt pins (labeled INTERRUPTS on your EDU RC), but the principles for using external or internal (i.e. timer) interrupts are the same.

For more information on configuring your INTERRUPTS pins for use with interrupt-driven code, read the Microchip PIC18FXX20 Data Sheet. General interrupt information is on pages 87-102. Note that by checking ifi_aliases.h you can find out the mapping of the microcontroller pins (RB2-RB7) to the INTERRUPTS pins. Specific information on these pins and their interrupts is on pages 106-108 of the data sheet.

As a final note, remember that all interrupts that you use MUST be low priority. If you try to make any interrupts high priority then you will see the PROGRAM STATE LED blinking red.
  #4   Spotlight this post!  
Unread 24-11-2003, 17:49
thoughtful's Avatar
thoughtful thoughtful is offline
Registered User
FRC #1219 (Emery Iron Eagle)
Team Role: Alumni
 
Join Date: Nov 2003
Location: Toronto,Canada
Posts: 291
thoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to behold
Hey guys thnx a lot for your help, and i will love to see somw examples Kevin.
__________________
.:Bringling Brains to Life:.

03,04,05-Team 1219 Captain
2003 Rookie all Start @ GTR
2005 Galileo Semi-Finalist & Alliance captain
06-Team 1219 Mentor
2006 Radio Shack Innovation in control @ Waterloo
  #5   Spotlight this post!  
Unread 08-01-2004, 15:29
WizardOfAz's Avatar
WizardOfAz WizardOfAz is offline
Lead Mentor
AKA: Bill Bennett
FRC #1011 (CRUSH)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Tucson, AZ
Posts: 101
WizardOfAz will become famous soon enough
Send a message via AIM to WizardOfAz
PROGRAM STATE LED is red

When else can the PROGRAM STATE LED turn red? I get it sometimes when not doing anything with timers or interrupts, and haven't yet figured out why.

Stack overflow for example?

Thanks,
Bill Bennett
  #6   Spotlight this post!  
Unread 08-01-2004, 16:07
rwaliany's Avatar
rwaliany rwaliany is offline
R
None #0691 (HartBurn)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2000
Location: http://www.hartrobot.com
Posts: 137
rwaliany will become famous soon enough
Re: PROGRAM STATE LED is red

Quote:
Originally Posted by WizardOfAz
When else can the PROGRAM STATE LED turn red? I get it sometimes when not doing anything with timers or interrupts, and haven't yet figured out why.

Stack overflow for example?

Thanks,
Bill Bennett
If too much current is given or too high of a voltage? Couldn't tell but it was flashing red. :-)

Invalid code did it once, sent an empty program to eduRC.

Accessing an invalid ptr and making reference to it.

Those are the only three I've gotten.

Thanks,
Ryan Waliany
__________________
R
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Interrupts on the EDU-RC? Andrew Programming 3 13-11-2003 23:16
New Controller Specs Posted Jnadke Programming 58 05-10-2003 08:18
New Controller programmable in C dez250 Programming 48 02-10-2003 19:28
What is an interrupt handler? Adam Y. Programming 7 14-08-2003 10:26
Possible Configuration to keep things cheap archiver 1999 8 23-06-2002 23:03


All times are GMT -5. The time now is 06:30.

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