View Single Post
  #4   Spotlight this post!  
Unread 19-01-2005, 09:33
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
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,855
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Programming Sub-Team Problems

Quote:
Originally Posted by Phil Paspalas
Thanks for your response, but I'm not sure where to find these documents and resources you mention.
Here's an updated Quick Start white paper. see if this helps any.
Programming Quick Start
  • Beginners need the following to program the FIRST robot:
v FRC (Full-size Robot Controller) RC Default Code
v Microchip MPLAB & C compiler
v IFI_Loader
v A standard serial cable
v A Windows PC with a serial port or USB-to-serial converter

  • MPLAB is the FIRST supplied Windows based development environment (edit, compile, debug) that runs on your desktop computer and is usually provided to each team on a compact disk in the Robovation kit. MPLAB is also free on-line at the Microchip website http://microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName =en019469&part=SW007002 , but the C compiler is not free except via the Robovation CD and is normally only available online as a time-limited trial copy or for purchase. For a limited time the latest compiler is available from a link on http://www.usfirst.org/ (bottom left of the page where it says “Microchip Software downloads.” Manuals for using MPLAB come on the FIRST CD.
  • Check the IFI website periodically for updates to the software that corrects issues and fixes problems.
  • The programming language used is “C” or PIC assembly. Tutorials in C can be found on the web, in your local bookstore or on the FIRST website, e.g.,
v C Programming Resource Library http://www.usfirst.org/robotics/C_help.htm has a great overview of the programming process.

v 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. http://www.rec.ri.cmu.edu/education/robot_builder/

v FIRST Robovation - A Primer for Success Learning Modules http://www.usfirst.org/robotics/robovation/primer/index.html
  • Newer laptops no longer come with serial ports. If you have this problem one 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).
  • 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:
    • IFI Programming Reference Guide – basic how to program and download to the RC, hookup switches and sensors and do normal robot operations.
    • IFI RC Default Code Reference Guide – description of how the default code is structured and where users can add their own custom code.
    • MPLAB v6.xx Getting Started – basic how to use MPLAB and set options.
    • MPLAB C18 Users Guide – table of max numbers each variable type will store, compiler options, error messages, detailed descriptions of pragmas and some other advanced topics.
    • MPLAB C18 Libraries – details on timers, interrupts, and various other utility functions available to the programmer.
o More advanced documents are also available, e.g., 18Fxx20 Data Sheet (& Errata)– PIC assembly instruction set and details on EEPROM and other chip specific topics, and several others.
  • Programming limits to the 2004 RC:
    • 30,720 bytes of program space is available to the user, after 2004 IFI code.
    • 1,343 bytes of ram available to the user, after 2004 code overhead.
    • 256 bytes of global variables available within any one MPLAB project file, such as user_routines.c
    • 120 bytes of variables can be declared within any single routine.
o The program and data space your code has used can be checked either by the status line at the bottom of the IFI_Loader window or via the optional .map file that you can set MPLAB to generate for you. Note: the .map file lists % of program space used, but the user will have only 90% available to him or her. The .hex is ASCII and file size is no indication of code size.
Visit the ChiefDelphi Programming forum for discussions on all programming topics, problems, and issues http://www.chiefdelphi.com/forums.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 19-01-2005 at 09:39.