Go to Post The more women we have as 'rock stars' in FIRST, the more girls we'll see celebrating math and science and the doors they can open. - JaneYoung [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 Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
  #316   Spotlight this post!  
Unread 28-01-2008, 23:22
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: New C18 3.0+ Compatible FRC Code

Quote:
Originally Posted by wcarr View Post
I was wondering if the message you have in adc.c:

* This version will only work with PIC18F8722 based robot
* controllers. You should use version 0.3 of this software
* with a PIC18F8520 based robot controller.

is still valid. And if so, how would I go about getting version 0.3 of the adc!
Yes, that version will only work properly with the '8722. I'll be releasing a unified version soon that will work with both robot controllers and C18 2.4 & 3.0+. I'll release it when I'm finished with a major revision of the gyro code.

-Kevin

(If you can't wait and promise to report any bugs you find, here's a snapshot of the latest build without the gyro mods)
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #317   Spotlight this post!  
Unread 29-01-2008, 14:10
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: New C18 3.0+ Compatible FRC Code

I've posted a snapshot of what I hope is the last build for a while. The changes are numerous and include improved gyro code. The documentation still needs some work, but the code should be complete. If you're willing to test it and provide feedback and/or bug report(s), you'll find it here: http://kevin.org/frc/ifi_frc_sensor.zip.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #318   Spotlight this post!  
Unread 29-01-2008, 16:20
sparrowkc sparrowkc is offline
Registered User
AKA: Mark
FRC #1986 (Team Titanium)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Lees Summit
Posts: 114
sparrowkc is a splendid one to beholdsparrowkc is a splendid one to beholdsparrowkc is a splendid one to beholdsparrowkc is a splendid one to beholdsparrowkc is a splendid one to beholdsparrowkc is a splendid one to beholdsparrowkc is a splendid one to beholdsparrowkc is a splendid one to behold
Get_Gyro_Rate() returns jumpy values

when I call Get_Gyro_Rate() it tends to give occasional outliers and data that doesn't make sense. When I turn the gyro constantly one direction, jumps back and forth between positive numbers. Get_Gyro_Angle() works fine and is accurate. I am testing with last year's kit gyro.

Last edited by sparrowkc : 29-01-2008 at 16:32. Reason: typo
  #319   Spotlight this post!  
Unread 29-01-2008, 16:29
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: Get_Gyro_Rate() returns jumpy values

Quote:
Originally Posted by sparrowkc View Post
when I call Get_Gyro_Rate() it tends to give occasional outliers and data that doesn't make. When I turn the gyro constantly one direction, jumps back and forth between positive numbers. Get_Gyro_Angle() works fine and is accurate. I am testing with last year's kit gyro.
You might be seeing the issue resolved here.
  #320   Spotlight this post!  
Unread 29-01-2008, 16:31
sparrowkc sparrowkc is offline
Registered User
AKA: Mark
FRC #1986 (Team Titanium)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Lees Summit
Posts: 114
sparrowkc is a splendid one to beholdsparrowkc is a splendid one to beholdsparrowkc is a splendid one to beholdsparrowkc is a splendid one to beholdsparrowkc is a splendid one to beholdsparrowkc is a splendid one to beholdsparrowkc is a splendid one to beholdsparrowkc is a splendid one to behold
Re: Get_Gyro_Rate() returns jumpy values

I downloaded the Sensors code from Kevin's site just yesterday, was it not fixed then?
  #321   Spotlight this post!  
Unread 29-01-2008, 16:42
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Get_Gyro_Rate() returns jumpy values

Quote:
Originally Posted by sparrowkc View Post
I downloaded the Sensors code from Kevin's site just yesterday, was it not fixed then?
The public version on the website still has the bug. I hope to replace that version with the new version (link a few messages back) tonight after you guys (hopefully) try it out and report any issues.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #322   Spotlight this post!  
Unread 29-01-2008, 22:58
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: New C18 3.0+ Compatible FRC Code

Just transferring the new code over to my dev. code.

Noticed that the Get_Gyro_Bias_Status() function looks like a bad cut/paste from another function. No return value.

Quote:
unsigned char Get_Gyro_Bias_Status(void)
{
// zero out gyro_angle
gyro_angle = 0L;
}
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
  #323   Spotlight this post!  
Unread 29-01-2008, 23:00
Guy Davidson Guy Davidson is offline
Registered User
AKA: formerly sumadin
FRC #0008 (Paly Robotics)
Team Role: Alumni
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Ra'anana, Israel
Posts: 660
Guy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to behold
Send a message via ICQ to Guy Davidson Send a message via AIM to Guy Davidson Send a message via MSN to Guy Davidson
Re: New C18 3.0+ Compatible FRC Code

Other than the Get_Gyro_Bias_Status Phil noted above, I haven't found any problems with the latest code. I only messed around with the relativly simple stuff today - I'll be doing some more intensive encoder and gyro (maybe) based testing tomorrow, so I'll let you know about those after I do that.
__________________
  #324   Spotlight this post!  
Unread 29-01-2008, 23:02
Jon236's Avatar
Jon236 Jon236 is offline
Registered User
AKA: Jon Mittelman
FRC #2648 (Infinite Loop)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Windsor, Maine
Posts: 741
Jon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond repute
Re: New C18 3.0+ Compatible FRC Code - New Build

Great work Kevin

had running a gyro, a MatBotrix Ultrasonic ranger and an encoder!!!!

To get values from the MatBotrix, I needed to use Get_ADC_Result and then Convert_ADC_to_mV....the Get_Analog_Value didn't work.
__________________
Jon Mittelman

Senior Judge Advisor New England & Israel 2014-2015
Infinite Loop Mentor 2011-2015
TechnoTicks Mentor 2000-2011
Championship Chairman's Award 2009 Team236 TechnoTicks
Judge 2010-2015 Championships
Senior Judge Advisor New England District Championship 2014-2015
Judge Advisor Tel Aviv Regional 2007-2015
Judge Advisor Pine Tree Regional 2013
Maine Regional Planning Committee
New England District Planning Committee
Lead Inspector Microsoft Tel Aviv Regional 2006-2008
Judge & Lead Inspector GM/Technion Tel Aviv Regional 2006
Judge UTC Hartford Regional 2006
  #325   Spotlight this post!  
Unread 29-01-2008, 23:31
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: New C18 3.0+ Compatible FRC Code

Quote:
Originally Posted by PhilBot View Post
Just transferring the new code over to my dev. code.

Noticed that the Get_Gyro_Bias_Status() function looks like a bad cut/paste from another function. No return value.
Ouch. Let me see what happened...

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #326   Spotlight this post!  
Unread 30-01-2008, 00:13
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: New C18 3.0+ Compatible FRC Code

Quote:
Originally Posted by sumadin View Post
Other than the Get_Gyro_Bias_Status Phil noted above, I haven't found any problems with the latest code. I only messed around with the relativly simple stuff today - I'll be doing some more intensive encoder and gyro (maybe) based testing tomorrow, so I'll let you know about those after I do that.
Thanks!

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #327   Spotlight this post!  
Unread 30-01-2008, 00:16
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: New C18 3.0+ Compatible FRC Code

Quote:
Originally Posted by PhilBot View Post
Just transferring the new code over to my dev. code.

Noticed that the Get_Gyro_Bias_Status() function looks like a bad cut/paste from another function. No return value.
I don't know what I did, but the correct version should be on the server. Thanks again for your help.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #328   Spotlight this post!  
Unread 30-01-2008, 00:29
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: New C18 3.0+ Compatible FRC Code - New Build

Quote:
Originally Posted by Jon236 View Post
...the Get_Analog_Value didn't work.
I'm pretty sure you'll get corrupted data if you try to use Get_Analog_Value() while the ADC code is running in the background.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #329   Spotlight this post!  
Unread 30-01-2008, 18:38
Lummis1647's Avatar
Lummis1647 Lummis1647 is offline
Registered User
FRC #1647 (Iron Devils)
Team Role: Scout
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Mount Laurel
Posts: 1
Lummis1647 is an unknown quantity at this point
Re: New C18 3.0+ Compatible FRC Code

I'm having a huge problem with the lastest code I just downloaded 2 hours ago. I'm using version 2.4 of the compiler. I followed all of the instructions in the readmes, but if I call Initialize_ADC(); and Initialize_Gyro(); in teleop/Initialization(), I'll get a blinking red and green light next to program state on the rc. On the output window, "IFI User Pr" shows up, making me think that it runs into an error in the middle of trying to print the printf:IFI User Processor Initialized ...\r\n. There are no problems when those 2 function calls are commented out(initialize gyro and adc). I've tried a combination of commenting and uncommenting the gyro code in teleop and the process_gyro_data function in teleop_spin. I don't get this problem with an earlier version of the 2.4 gyro beta code. I'm really not sure what to do. Any one else have this problem? Does this work for anyone using 2.4- the hex file builds and in ifi_frc.h I have USE_C18_24 #defined only. I'd really appreciate any suggestions. Thanks.
  #330   Spotlight this post!  
Unread 30-01-2008, 19:37
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: New C18 3.0+ Compatible FRC Code

Quote:
Originally Posted by Lummis1647 View Post
I'm having a huge problem with the lastest code I just downloaded 2 hours ago. I'm using version 2.4 of the compiler. I followed all of the instructions in the readmes, but if I call Initialize_ADC(); and Initialize_Gyro(); in teleop/Initialization(), I'll get a blinking red and green light next to program state on the rc. On the output window, "IFI User Pr" shows up, making me think that it runs into an error in the middle of trying to print the printf:IFI User Processor Initialized ...\r\n. There are no problems when those 2 function calls are commented out(initialize gyro and adc). I've tried a combination of commenting and uncommenting the gyro code in teleop and the process_gyro_data function in teleop_spin. I don't get this problem with an earlier version of the 2.4 gyro beta code. I'm really not sure what to do. Any one else have this problem? Does this work for anyone using 2.4- the hex file builds and in ifi_frc.h I have USE_C18_24 #defined only. I'd really appreciate any suggestions. Thanks.
My guess is that you didn't enable the timer 4 ISR in ifi_frc.h.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
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
Does the camera code suits to all versions of MPLAB and C18? razer Programming 3 04-01-2007 14:50
Trying to follow C18 interrupt context code... dcbrown Programming 5 21-12-2006 09:01
Error w/ FRC code JamesBrown Programming 2 08-01-2005 16:17
Programming code Fix FRC Ferazel2001 Programming 6 08-02-2004 02:46
FRC default code hedgehogger Programming 2 21-01-2004 18:41


All times are GMT -5. The time now is 14:28.

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