Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   New C18 3.0+ Compatible FRC Code (http://www.chiefdelphi.com/forums/showthread.php?t=60377)

Kevin Watson 28-01-2008 23:22

Re: New C18 3.0+ Compatible FRC Code
 
Quote:

Originally Posted by wcarr (Post 687649)
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 29-01-2008 14:10

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

sparrowkc 29-01-2008 16:20

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.

Alan Anderson 29-01-2008 16:29

Re: Get_Gyro_Rate() returns jumpy values
 
Quote:

Originally Posted by sparrowkc (Post 688105)
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.

sparrowkc 29-01-2008 16:31

Re: Get_Gyro_Rate() returns jumpy values
 
I downloaded the Sensors code from Kevin's site just yesterday, was it not fixed then?

Kevin Watson 29-01-2008 16:42

Re: Get_Gyro_Rate() returns jumpy values
 
Quote:

Originally Posted by sparrowkc (Post 688119)
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

PhilBot 29-01-2008 22:58

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;
}

Guy Davidson 29-01-2008 23:00

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.

Jon236 29-01-2008 23:02

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.

Kevin Watson 29-01-2008 23:31

Re: New C18 3.0+ Compatible FRC Code
 
Quote:

Originally Posted by PhilBot (Post 688470)
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 30-01-2008 00:13

Re: New C18 3.0+ Compatible FRC Code
 
Quote:

Originally Posted by sumadin (Post 688472)
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 30-01-2008 00:16

Re: New C18 3.0+ Compatible FRC Code
 
Quote:

Originally Posted by PhilBot (Post 688470)
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 30-01-2008 00:29

Re: New C18 3.0+ Compatible FRC Code - New Build
 
Quote:

Originally Posted by Jon236 (Post 688475)
...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

Lummis1647 30-01-2008 18:38

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.

Kevin Watson 30-01-2008 19:37

Re: New C18 3.0+ Compatible FRC Code
 
Quote:

Originally Posted by Lummis1647 (Post 689005)
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


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

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi