
21-01-2007, 09:51
|
 |
 |
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,825
|
|
|
Re: Programming - Getting Started
Overdue for updated links and accounting for 2007 changes...
2007 Programming Quick Start
1. Beginners need the following to program the FIRST robot:
v FRC (Full-size Robot Controller) RC Default Code
v Microchip MPLAB & C compiler (only from the Kit-of-Parts (KOP) CD) or Intelitek Easy C also in the KOP.
v IFI_Loader v1.1.0 (from the KOP CD)
v A standard serial cable
v A Windows PC with a serial port or USB-to-serial converter
2. Where to get everything:
-Basic default code, updates, documentation, and support information is available on the Innovation FIRST (IFI) website, in particular at:
v 2007 default code comes ready for basic driving and with a variety of sample I/O usages.
v Robot Controller
v Operator Interface
v CMUCam2
-The Camera default code for use with the CMUCam2 camera comes in two versions, one for the MPLAB native C programming environment and the other for the EasyC development environment.
The MPLAB version is available at the developer Kevin Watson’s website. While there you’ll also find code examples for using other beneficial sensors. This default code may have the normal driving mode disabled.
-MPLAB is the FIRST supplied Windows based development environment (edit, compile, debug) that runs on your desktop computer and comes in the Kit-of-Parts wrapped inside the small clipboard. Manuals for using MPLAB come on the CD and are also found hosted on-line at Kevin Watson’s website.
IFI_Loader v1.1.0 (also on the KOP CD) is used to download the compiled code into the RC via a serial cable from your desktop or laptop computer.
-EasyC from Intellitek can be used instead of MPLAB or as a rapid prototyping tool. It came in the KOP in the bag with the robotics magazines. The Main Contact of each team received an email from FIRST a software key to activate one installation of the software.
-- The EasyC version of the Camera default code for use with the CMUCam2 camera is available at Intelitek's website.
3. National Instruments Labview came in the kit-of-parts and has some optional special applications for the camera and OI dashboard among others have been provided in this Chiefdelphi thread and discussions can be followed in the Chiefdelphi EasyC Pro forum.
4. WPI has developed a potentially useful approach to programming your robot. Details are at WPILIBand discussions can be followed in the Chiefdelphi WPILIB forum.
5. Check the IFI website periodically for updates to the software that corrects issues and fixes problems. For instance, new Master Controller “patches” if any, will be made available there. Directions will be included with any download.
6. The programming language used is “C”, EasyC, or PIC assembly. Tutorials in C can be found on the web, in your local bookstore or on the FIRST website, e.g.,
-- C Programming Resource Library has a great overview of the programming process.
-- Learn C Programming - Developed by Carnegie Mellon and the National Robotics Engineering Consortium specifically for FIRST, this interactive website will get your team prepared for the FIRST Robotics Competition.
7. Newer laptops no longer come with the serial port required to download code to the Robot Controller. If you have one of these laptops a solution is to use a USB/Serial converter. Various models are available at Radio Shack, CompUSA, or online, however, some models can be temperamental and they generally take longer to download than a built-in serial port (60sec vs 10 sec). Good results have been reported using: Bafo Technologies BF-810 (~$15) and a Radio Shack USB-to-Serial port cable #26-183 ($42). You can also use the converter that comes with the Radio Shack Vex Programming Kit.
8. Documentation is your friend. Take the time to at least leaf through each manual, so you have an idea of where information can be found. Most of the basic information beginners require can be found in the IFI documents or MPLAB documents available from the websites:- The 2004 IFI Control System Overview version applies to 2007 as well.
- 2005 IFI Programming Reference Guide – basic how to hookup, program and download to the RC, hookup switches and sensors and do normal robot operations.
- Useful programming and compiler documents come on the Kit provided MPLAB CBOT CD with the tool installations or are available from either Kevin Watson’s website or the legacy section of the Microchip website.
v c18_getting_started_2.4.pdf v c18_libraries_2.4.pdf – details on timers, interrupts, and various other utility functions available to the programmer. v c18_users_guide_2.4.pdf - table of max numbers each variable type will store, compiler options, error messages, detailed descriptions of pragmas and some other advanced topics. v Microchip pic18f8722 data sheet - PIC assembly instruction set and details on EEPROM and other chip specific topics. Mistakes found later after the datasheet was published. v Microchip PICmicro 18C MCU Family Reference Manual – all things great and small (in excruciating detail) about the processor we use. v MPLAB Quick Start Guide.pdf - basic how to use MPLAB and set options. v MPLAB Users Guide.pdf Visit the ChiefDelphi Programming forum for discussions on all programming topics, problems, issues, and ideas.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Last edited by Mark McLeod : 21-01-2007 at 10:30.
|