Go to Post Progress should never made at the expense of the past. - Koko Ed [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #20   Spotlight this post!  
Unread 18-03-2008, 09:31
Ian G Ian G is offline
BUILD SUCCEEDED
FRC #2415 (WiredCats)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2004
Location: Atlanta
Posts: 23
Ian G is an unknown quantity at this point
Send a message via AIM to Ian G
Re: New Infrared Remote Control Software

I tried to make a quick fix to increase the coverage of our IR sensors by quickly adding a second interrupt and third interrupt. I knew the way I did it wasn't right, but it mostly worked enough. I was wondering what I would have to do to properly add more interrupts to the the IR code. I don't like wiring multiple sensors in parallel, because it looks like if the sensors receive signals at different times, their output pulses will interfere.

Here is what I did:

Code:
		#ifdef ENABLE_INT_3
		if(Port_B_Delta & 0x10) // did external interrupt 3 change state?
		{
			IR_Sensor_ISR(Port_B & 0x10 ? 1 : 0); // call the interrupt 3 handler (in interrupts.c or encoder.c)
		}
		#endif
		#ifdef ENABLE_INT_4
		if(Port_B_Delta & 0x20) // did external interrupt 4 change state?
		{
			IR_Sensor_ISR(Port_B & 0x20 ? 1 : 0);//Int_4_ISR(Port_B & 0x20 ? 1 : 0); // call the interrupt 4 handler (in interrupts.c or encoder.c)
		}
		#endif
		#ifdef ENABLE_INT_5
		if(Port_B_Delta & 0x40) // did external interrupt 5 change state?
		{
			IR_Sensor_ISR(Port_B & 0x40 ? 1 : 0);//Int_5_ISR(Port_B & 0x40 ? 1 : 0); // call the interrupt 5 handler (in interrupts.c or encoder.c)
		}
Thanks in advance!
 


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
Remote Control Rover Help Dominator_Legen Math and Science 7 12-02-2005 03:35
Remote Control Car SUCCESS!! arpus maximus Control System 77 10-12-2004 20:30
Manual override of compressor software control willross Pneumatics 15 18-02-2004 23:51
Remote Remote Kickoff for Southern California ChrisH Southern California Regional Robotics Forum 0 05-01-2004 12:36
Remote Remote Kick off at University High School George1902 Off-Season Events 4 04-01-2004 21:05


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

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