Go to Post Bless you sire and all your HD camera goodness. - pyroslev [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
  #16   Spotlight this post!  
Unread 18-02-2005, 11:11
phillutz phillutz is offline
Registered User
FRC #0851 (The Froggers)
Team Role: Mentor
 
Join Date: Nov 2004
Rookie Year: 2004
Location: El Segundo,CA
Posts: 28
phillutz is on a distinguished road
Re: Third Encoder Channel

I'm not concerned about a third encoder, but that is not to say I don't need help.
Encoders were the last thing on our minds putting the robot together.
Now the team would like to use them to get accurate distance measures.
The problem I am thinking exists is with Kevins code, Digital's 1,2,6&8 are used for the encoders, and I assume the interrupt routines.
We are using those digitals already on the robot. (1-11 and 17,18 are all used)

Where specifically do I need to change the interrupt code to have the interrupts function for say... digitals 12,13,14,15.
I understand needing to change the user_routines.c file for INPUT/OUPUT but interrupts confuse me.
Also, I see in encoder.h that Kevin is #define ing the XXX_Encoder_Phase_B_Pin's but not the Phase_A_Pins? Am I missing something?



Thanks in advance for your assistance.

Phil

Last edited by phillutz : 18-02-2005 at 11:13.
  #17   Spotlight this post!  
Unread 18-02-2005, 11:44
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: Third Encoder Channel

Quote:
Originally Posted by phillutz
Where specifically do I need to change the interrupt code to have the interrupts function for say... digitals 12,13,14,15.
I understand needing to change the user_routines.c file for INPUT/OUPUT but interrupts confuse me.
Also, I see in encoder.h that Kevin is #define ing the XXX_Encoder_Phase_B_Pin's but not the Phase_A_Pins? Am I missing something?
Digital inputs 1 and 2 are permanently connected inside the robot controller's CPU to the interrupts used by the encoder code. You can't do anything about that. There is a third external interrupt which is triggered on any change of digital inputs 3 through 6, but using it is a bit more complicated than the first two. So far as I know, none of the other digital inputs can cause interrupts.
  #18   Spotlight this post!  
Unread 18-02-2005, 12:09
phillutz phillutz is offline
Registered User
FRC #0851 (The Froggers)
Team Role: Mentor
 
Join Date: Nov 2004
Rookie Year: 2004
Location: El Segundo,CA
Posts: 28
phillutz is on a distinguished road
Re: Third Encoder Channel

1. Can I change at least digital 6&8 to something else.
We have a wiring harness that is pulled into dig 1-11. This can be moved up to 3-13, but has to stay together...

2. Do I need to change anything in the Interrupt routines if the answer to #1 is yes?

Thanks,

Phil
  #19   Spotlight this post!  
Unread 18-02-2005, 12:24
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: Third Encoder Channel

Quote:
Originally Posted by phillutz
1. Can I change at least digital 6&8 to something else.
We have a wiring harness that is pulled into dig 1-11. This can be moved up to 3-13, but has to stay together...

2. Do I need to change anything in the Interrupt routines if the answer to #1 is yes?
Yes, you can move the encoder Quad B connections on digital inputs 6 & 8 to any other digital input pins.

You'll need to change the following two lines found in encoder.h to reflect the new digital inputs.
Code:
#define LEFT_ENCODER_PHASE_B_PIN rc_dig_in06
...
#define RIGHT_ENCODER_PHASE_B_PIN rc_dig_in08
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #20   Spotlight this post!  
Unread 18-02-2005, 12:28
phillutz phillutz is offline
Registered User
FRC #0851 (The Froggers)
Team Role: Mentor
 
Join Date: Nov 2004
Rookie Year: 2004
Location: El Segundo,CA
Posts: 28
phillutz is on a distinguished road
Re: Third Encoder Channel

I will mod the code tonight (This work thing keeps getting in the way of robotics).

Thanks for the quick responses.

Phil
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
encoder vs. motor stephenthe1 Programming 55 06-01-2005 22:07
Updated Encoder Code Available Kevin Watson Programming 2 04-01-2005 01:00
Choosing an Encoder for the Drive-train MikeDubreuil Electrical 11 21-10-2004 00:50
The Science Channel to broadcast FIRST documentary Andy Baker General Forum 49 01-03-2004 14:03
how to add steps in the provided encoder program for the edu Zaramel2002 Programming 3 11-02-2004 08:35


All times are GMT -5. The time now is 01:12.

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