View Single Post
  #2   Spotlight this post!  
Unread 25-01-2008, 23:41
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: 323
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: This darn Gear Tooth Sensor

All you really have to do is enable the interrupt on port 1, make sure your sensor is plugged into digital I/O 1, and add 1 to a counter in the interrupt handler in "User_Routines_Fast.c"

Although to access it a quick function to disable the interrupt and return the variable's should also be used and the variable should be volatile type.

If you understood that thats good

I will edit this post with a link to a good white paper that gives an in-depth description of the interrupts. They are actually fairly easy

Here it is: http://www.chiefdelphi.com/media/papers/1483
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -