Go to Post I just... I can't even comprehend it. Like, my brain is soup. Commas are everywhere. Sentences. Shrinking. zzzzzzzzzzzz... - PayneTrain [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 04-02-2008, 19:34
NinJA999's Avatar
NinJA999 NinJA999 is offline
Chipmunk NinJA
AKA: Nick Aldwin
FRC #0811 (Team 811)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Windham, NH
Posts: 45
NinJA999 will become famous soon enough
Send a message via AIM to NinJA999
Interrupt Gear Tooth Sensors

Our team is working on using the geartooth sensors integrated with the AndyMark 2-speed transmissions. We are going to go with an interrupt-driven system using the code from http://www.chiefdelphi.com/forums/sh...ad.php?t=61242 . Unfortunately, as soon as we type in:
Code:
/* Initialize INT2 for pulse counting. INT2 is rc_dig_in01 */
INTCON3bits.INT2IE = 1; //enable INT2
INTCON3bits.INT2IP = 0; //set INT2 to low priority
INTCON2bits.INTEDG2 = 1; //rising edge

/* Initialize INT3 for pulse counting INT3 is rc_dig_in02*/
INTCON3bits.INT3IE = 1; //enable INT3
INTCON2bits.INT3IP = 0; //set INT3 to low priority
INTCON2bits.INTEDG3 = 1; //rising edge

INTCONbits.GIEL = 1; /* Enable Global Low Priority Interrupts */
into the user_routines_fast.c, MPLAB tells us that the first line (after the comment) is a syntax error. Nobody else seems to be having this problem. Is there something we may be doing wrong?
__________________
Team 811 (Nashua, NH) - Mentor

Previously Team Lead & Programming Lead

Last edited by NinJA999 : 04-02-2008 at 19:42.
  #2   Spotlight this post!  
Unread 04-02-2008, 19:44
Spider-Man's Avatar
Spider-Man Spider-Man is offline
Curling Rocks
AKA: Adam Jacobson
FRC #0467 (DTB/Shrewsbury Colonials); #0034 (Rocket City Robotics)
Team Role: Mentor
 
Join Date: Dec 2006
Rookie Year: 2000
Location: Shrewsbury, MA USA
Posts: 86
Spider-Man has a spectacular aura aboutSpider-Man has a spectacular aura about
Re: Interrupt Gear Tooth Sensors

Is that the only definition of InterruptHandlerLow() in user_routines_fast.c or is what you posted only part of it? It may be a good idea to post the code from the entire file to be safe.
__________________
Student [2000 - 2001] Team 34 Rocket City Robotics
Plays Well With Others
2000 VA - Delphi "Driving Tomorrow's Technology"
2000 CMP - Top 5 Autodesk Visualization
2001 TX - Regional Finalist

Mentor [2004 - 2005][2007 - ????] Team 467 Shrewsbury Colonials (nee Duct Tape Bandits)
We Not Me
2004 LI - DaimlerChrysler Team Spirit
2004 LI - Website Design
2005 MD - Delphi "Driving Tomorrow's Technology"
2007 MA - Johnson & Johnson Sportsmanship
2008 CT - Judges' Award
2008 PA - Judges' Award

2010 MA - Judge's Award[/size][/font]
2012 DC - Chrysler Team Spirit[/size][/font]
2012 DC - Regional Winners[/size][/font]
2013 MAWO - Engineering Inspiration[/size][/font]
  #3   Spotlight this post!  
Unread 04-02-2008, 19:49
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 325
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Interrupt Gear Tooth Sensors

Are you using the default code and MPLab 7.2? There is an error that one of the variables is defined wrong in C:\MCC18\include\p18f8722.h (or whatever your directory is) I think it is one of the priority bits, look in that file for both and make sure its correct. Kevin has the corrected one in his encoder code if you take a look at that. Or you may be getting something from annother line?
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
  #4   Spotlight this post!  
Unread 04-02-2008, 20:33
NinJA999's Avatar
NinJA999 NinJA999 is offline
Chipmunk NinJA
AKA: Nick Aldwin
FRC #0811 (Team 811)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Windham, NH
Posts: 45
NinJA999 will become famous soon enough
Send a message via AIM to NinJA999
Re: Interrupt Gear Tooth Sensors

Quote:
Originally Posted by wt200999 View Post
Are you using the default code and MPLab 7.2? There is an error that one of the variables is defined wrong in C:\MCC18\include\p18f8722.h (or whatever your directory is) I think it is one of the priority bits, look in that file for both and make sure its correct. Kevin has the corrected one in his encoder code if you take a look at that. Or you may be getting something from annother line?
It was that problem. With Kevin's updated p18f8722.h, it is not giving us any errors. Thanks a lot!
__________________
Team 811 (Nashua, NH) - Mentor

Previously Team Lead & Programming Lead
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
gear tooth sensors purchasing wedellm Motors 5 07-02-2007 20:50
Gear tooth sensors - Forward or backward? Tom Line Programming 6 30-01-2007 09:19
where can we buy hall effect sensors or gear tooth sensors amirjpl Electrical 3 13-02-2006 11:02
Gear Tooth Sensors et1337 Electrical 7 28-01-2006 22:48
Accelerometer vs Gear Tooth Sensors zdeswarte Electrical 4 22-01-2005 15:35


All times are GMT -5. The time now is 19:10.

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