View Single Post
  #18   Spotlight this post!  
Unread 13-01-2008, 02:10
SomeoneKnows SomeoneKnows is offline
SomeoneKnows
AKA: Vince Thompson
FRC #1752 (Team Tonka)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: KC Missouri
Posts: 19
SomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of light
Re: Help, I'm a world class computer programming genius yet I'm totally lost.

Quote:
Originally Posted by jratcliff View Post
Thanks for the replies. The main reason I am using the VEX is so that I can experiment programming a fully running robot at home while the high-school team still has a big pile of parts on the floor.
Yes much of the default code for FRC is usable with the Vex but there are a few differences. The Vex makes a great training platform. Are you using the Vex code found at this link http://www.vexlabs.com/vex-competiti...gramming.shtml for the Autonomous Files downloads?


Quote:
Originally Posted by jratcliff View Post
(2) Does his default framework have, out of the box, everything you need to drive a basic frame robot around or do you have to write all of that yourself?
Yes, the default code will allow you to use the controller to run under radio control but you'll want to make modifications for behavior using the joysticks and any autonomous programming.


Quote:
Originally Posted by jratcliff View Post
Where is the missing piece of documentation in all of this?
Quote:
Originally Posted by jratcliff View Post
CCP2CON = 0x3C;
PR2 = 0xF9;
CCPR2L = 0x7F;
T2CON = 0;
T2CONbits.TMR2ON = 1;
I found definitions to these variables in the header file: ifi_picdefs.h from a download off the VexLabs web site. The file was dated 1/14/2004. They were defined as extern so may be part of the master code which is undisclosed.

The only place I'm finding references to this is from FRC code that has been commented out with the explaination that it would generate a 40KHz PWM with a 50% duty cycle...

The documentation for FIRST MPLAB programming is scattered around the Internet. Be sure to check the FIRST web site's Documents and Updates Section http://www.usfirst.org/community/frc...nt.aspx?id=452 in Section 8 check the Additional Technical Resources link.

Check on the IFI Robotics web site under the Operator Interface documentation for tidbits on variables used http://www.ifirobotics.com/oi.shtml and the FRC Robot Controller page for documentation, FRC source code and supporting programs http://www.ifirobotics.com/rc.shtml.

I already mentioned the Vex Labs web site for Vex related versions.

Since you've found Chief Delphi you should check the white papers some have valuable programming information.

One last reference you may want to look at is the Microchip datasheets for the Vex's PIC18F8520 and the FRC controller's PIC 18F8722. If I have trouble finding the datasheets from official FIRST sources I get on www.digikey.com and enter the processor model number, select a processor, select the Technical/Catalog Information link to get a listing of the processors to find the datasheets. At 448 pages the PIC 18F8722 datasheet is not light reading.

I noticed you list the St. Louis area for your location, you might want to attend the local robotics club's monthly meeting next Saturday. They usually have members involved with FIRST. Their information is at www.robomo.com.

Starting to learn MPLAB programming within the 6 week build period is not an ideal situation, I learned that a couple of years ago. Having such a late start I would suggest that you give the EasyC Pro a chance. I'm not fond of their licensing scheme handicapping our programmers so I suggest our team members try programming with WPILib which is a library accessed within the MPLAB environment. Since EasyC seems to be using the WPILib you get the same functionality without the drag and drop GUI.

Quote:
Originally Posted by jratcliff View Post
Yep, that's me. Sorry to the Easy C fans but I'm definitely thrilled with MPLAB and will be using it as my primary development platform.
Its great you have a Vex and are excited about participating, me too. But, as a mentor I should caution you that FIRST is not about you its about the students. They need to be able to program on a level that they can understand. Kevin Watson's code helps make that possible for some but the WPILib and EasyC are the best fit for other students.

Vince