Go to Post In my opinion, leaders do not need to be picked. They naturally emerge as time goes on and as more opportunities are presented to them. - Alex Golec [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
  #31   Spotlight this post!  
Unread 28-02-2006, 17:02
Denz's Avatar
Denz Denz is offline
Registered User
FRC #0772 (Sabre Bytes Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Location: LaSalle, Ont, Canada
Posts: 66
Denz is on a distinguished road
Send a message via MSN to Denz
Re: GearTooth Sensor Destroying Hopes of Autonomous~!!!!!!

My current setup is using a push switch to simulate the gear tooth sensor. I have it hooked up to rc_dig_in11. I have it printing to screen, and when pushed it shows up as 0, otherwise as 1, so looks like the hardware is working. I'm not sure what to do. The counter is still not counting, it just stays at 0. Thanks again for all the help, it is very much appreciated !
__________________
www.sabrerobotics.com
  #32   Spotlight this post!  
Unread 28-02-2006, 17:50
phrontist's Avatar
phrontist phrontist is offline
Proto-Engineer
AKA: Bjorn Westergard
FRC #1418 (Vae Victus)
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Falls Church, VA
Posts: 828
phrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond repute
Send a message via AIM to phrontist
Re: GearTooth Sensor Destroying Hopes of Autonomous~!!!!!!

Quote:
Originally Posted by Denz
My current setup is using a push switch to simulate the gear tooth sensor. I have it hooked up to rc_dig_in11. I have it printing to screen, and when pushed it shows up as 0, otherwise as 1, so looks like the hardware is working. I'm not sure what to do. The counter is still not counting, it just stays at 0. Thanks again for all the help, it is very much appreciated !
You mean a mechanical switch?! That won't last long... but if you've got a lot of spares.
__________________

University of Kentucky - Radio Free Lexington

"I would rather have a really big success or a really spectacular crash and failure then live out the warm eventual death of mediocrity" - Dean Kamen
  #33   Spotlight this post!  
Unread 28-02-2006, 18:11
Denz's Avatar
Denz Denz is offline
Registered User
FRC #0772 (Sabre Bytes Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Location: LaSalle, Ont, Canada
Posts: 66
Denz is on a distinguished road
Send a message via MSN to Denz
Re: GearTooth Sensor Destroying Hopes of Autonomous~!!!!!!

Quote:
Originally Posted by phrontist
You mean a mechanical switch?! That won't last long... but if you've got a lot of spares.
It's only for testing purposes, since our robot is shipped, I only have a RC and an OI, so I have to make good use of it.
__________________
www.sabrerobotics.com
  #34   Spotlight this post!  
Unread 28-02-2006, 18:33
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: GearTooth Sensor Destroying Hopes of Autonomous~!!!!!!

Quote:
Originally Posted by Denz
My current setup is using a push switch to simulate the gear tooth sensor. I have it hooked up to rc_dig_in11.
Sigh.

As I explained yesterday morning, if you want to trigger the encoder interrupt when the switch changes state, you have to put it on digital input 1.
  #35   Spotlight this post!  
Unread 28-02-2006, 18:38
Denz's Avatar
Denz Denz is offline
Registered User
FRC #0772 (Sabre Bytes Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Location: LaSalle, Ont, Canada
Posts: 66
Denz is on a distinguished road
Send a message via MSN to Denz
Re: GearTooth Sensor Destroying Hopes of Autonomous~!!!!!!

Quote:
Originally Posted by Alan Anderson
Sigh.

As I explained yesterday morning, if you want to trigger the encoder interrupt when the switch changes state, you have to put it on digital input 1.
I will try that. Sorry, I remember seeing that now, however in Kevin's default code it was assigned to rc_dig_in11.

EDIT: YOU GUYS ARE WONDERFUL! I'm so happy it worked!!! THANKS!
__________________
www.sabrerobotics.com

Last edited by Denz : 28-02-2006 at 18:42.
  #36   Spotlight this post!  
Unread 28-02-2006, 18: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: GearTooth Sensor Destroying Hopes of Autonomous~!!!!!!

Quote:
Originally Posted by Denz
I will try that. Sorry, I remember seeing that now, however in Kevin's default code it was assigned to rc_dig_in11.
You misunderstood the part of the code that deals with configuring quadrature encoders.

Phase A of encoder 1 has always been documented as rc_dig_in_01, and phase A of encoder 2 has always been documented as rc_dig_in_02. The "B" phases for a quadrature encoder can be connected to any other digital inputs, but there is no phase B on a gear tooth sensor, which is why that part of the interrupt code is simply removed to handle a GTS.

Digital input 1 on the RC goes to one hardware interrupt on the PIC. Digital input 2 on the RC goes to another hardware interrupt. Changes on digital inputs 3-6 can be configured to cause a third hardware interrupt. If you want to use interrupts, you must use the input pins that support interrupts. (Now why am I suddenly having deja vu?)

Congratulations on getting it to work.
  #37   Spotlight this post!  
Unread 28-02-2006, 19:07
Denz's Avatar
Denz Denz is offline
Registered User
FRC #0772 (Sabre Bytes Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Location: LaSalle, Ont, Canada
Posts: 66
Denz is on a distinguished road
Send a message via MSN to Denz
Re: GearTooth Sensor Destroying Hopes of Autonomous~!!!!!!

Well, I guess you learn something new everyday (or maybe sometimes it takes a couple of days to understand it) but anyways, this is my first year programming anything, and I was in charge or programming the robot. I had alot on my plate I guess so I'm sorry if some of my questions seemed stupid. I really appreciate all the help, our team didn't have any mentors who knew programming, so I'm really glad I could find an e-mentor! Thanks again, now I just have to finish the rest of the autonomous before Rochester!
__________________
www.sabrerobotics.com
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


All times are GMT -5. The time now is 07:55.

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