Go to Post Quit hitting me with lexan, I'm NOT a pinata. - hcps-ruwedt [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 14-02-2006, 12:28
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 751
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Interrupt Maximum before the RED light DEATH?

I've been hunting around for a maximum of interrrupt 1-6 on the 2006 controller and 2005 if they are different. Best I've found is Kevin's documents that say "thousand of clicks per second" on a 40 MHZ PIC chip.

Is there a spec somewhere? Or does that really depend on how much code you have?

We are using the gear teeth sensors which say they have a maximum of 6KHZ of bandwidth, but wanted to make sure we wouldn't kill our CPU if we try and spin the gears up pretty fast. I think we are running around 1176 pulses per second, and the interrupt seems to be behaving. It would be nice to know what are "true" max is before we bury the CPU.




-
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
  #2   Spotlight this post!  
Unread 14-02-2006, 13:17
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Interrupt Maximum before the RED light DEATH?

The PIC executes ten million instructions per second. If your interrupt service routines don't use them all up, the main program will be able to execute. Counting instructions is tedious and error-prone, but it'll give you the answer you're looking for.

A less tedious way would be to set an output pin high when you enter the interrupt service routine, then set it low as you leave. An oscilloscope on that pin will tell you how long and how often the routine runs, and will give you a reasonable indication of what fraction of the time you're spending servicing interrupts.
  #3   Spotlight this post!  
Unread 14-02-2006, 13:28
aaeamdar's Avatar
aaeamdar aaeamdar is offline
Post-A-Holic
AKA: Paul Dennis
FRC #1719 (The Umbrella Corp)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Baltimore, MD
Posts: 231
aaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant future
Re: Interrupt Maximum before the RED light DEATH?

Sorry, I'm not quite getting what you're saying, and if this doesn't help, again, I apolgize, just ignore it.

From what we, team 1719, have figured out, it seems that the geartooth ticks are determined by the amount that it's low.

We have so far seemed to have no problems with our system and we haven't worried about any of this math.

Best of luck,
Paul Dennis
  #4   Spotlight this post!  
Unread 14-02-2006, 15:29
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,906
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Interrupt Maximum before the RED light DEATH?

It does depend on your code of course and the worst case time it takes you to execute a fast loop including your maximum # of interrupts. Unless the slow loop is really bloated I doubt you'd be bound by that time, but if your time to complete a fast loop approaches slow loop speed you'll be in trouble.

When the slow loop becomes impacted you get the Red Light of Death.

You can also get an approximation by counting the number of fast loops per second with minimal interrupts, then running your interrupts at max and comparing, both times looking for the worst case.
I think we measured the streamlined camera code at a worst case of 65,000 loops per second without other interrupts.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 14-02-2006 at 15:37.
  #5   Spotlight this post!  
Unread 15-02-2006, 01:01
gnirts gnirts is offline
Suspicious pointer conversion
AKA: Robinson Levin
FRC #1648 (The Gearbox Gangstaz)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: ATL
Posts: 116
gnirts will become famous soon enough
Re: Interrupt Maximum before the RED light DEATH?

Quote:
Originally Posted by Alan Anderson
set an output pin high when you enter the interrupt service routine, then set it low as you leave
What type of output? An relay? A PWM? Don't those only update after every putdata() call, i.e. every 26.2ms?

Confused,
Robinson
__________________
'... who are you, then?'
'I am part of that power which eternally
wills evil and eternally works good.'
Goethe, Faust
  #6   Spotlight this post!  
Unread 15-02-2006, 06:53
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Interrupt Maximum before the RED light DEATH?

Quote:
Originally Posted by gnirts
What type of output?
A digital output. They're directly connected to the CPU pins, and change state immediately.
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
Problems Combining Camera Code and Driving Code cmurdoch Programming 20 10-02-2007 16:34
Encoders and putdata theycallhimtom Programming 3 09-02-2006 19:24
TTL port to a serial port on a demo board ImmortalAres Programming 16 09-07-2005 23:44
How many users does it take to change a Light Bulb? Matt Attallah Chit-Chat 4 04-09-2004 20:59
heres the code. y this not working omega Programming 16 31-03-2004 15:18


All times are GMT -5. The time now is 00:50.

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