Programming Guidance

Hi, I know C fairly well. I’ve written data processing programs for PCs as well as programmed microprocessors. Unfortunately, the developement time for the FRC is much less than many of my projects in the past so I would like to get a jump start on the programming. I’m wondering if any of you might know of any good resources for programming the FRC Robot controller? Are there libraries already written specifically for FRC Controllers or will I need to start at low level and work to high level?

Team #2477

If you want to program in C (as opposed to Intellitek’s graphical language, easyC) you will want to get the default code that Innovation First publishes. All the way at the bottom of this page, there is a link for 2007 default code. The controller has not changed for a few years, so the 2007 code is the most up-to-date.

I’ve been looking for a good reference guide to this code, such as the one that IFI published in 2004, but I can find no such creature…it seems that basic documentation is missing…I just might have to write somthing up.

Let me know if you need more help than what I’ve given. I can write a “basic intro to the default code” manual if that’s what you need.


Mahalo Nui Loa (Thank you very much!) for your response JBotAlan! I understand what you are staying. Actually when I am looking for is a reference that describes the libraries and functions that can be used to control the robot. You know motor control function calls, PWM writing functions, A/D conversion functions. How to do interrupts. etc. A tutorial of the default code would be nice ,but if I find a programming manual specifically for FIRST then that might not be useful.

Actually one question, I looked that the link that you gave me and I realize that there are two seperate zip files for code. One is name “RC Code” and the other is “RC Master Code”. What is the difference between these?

Ohh i also just realized that my posting in the controller forum is a little inappropriate so I’ll repost a question in the programming forum.

Again, Thanks for your help!

The CBot compact disk that came in the Kit-of-Parts with MPLAB and the mcc18 compiler has a complete set of manuals appropriate for the compiler version 2.4 we use.

There are libraries and collections of code people have written for FIRST that will save you a lot of time. As well as copies of the C18 documents.
See Kevin Watson’s site:
See Brad Miller’s:

In the IFI Robot Controller we use in FIRST there are two processors: the Master and the User. We code the User processor, but the Master controls the User Processor for field functions such as Disabled, Hybrid, Teleoperated modes. While the source code that the Master processor is running is not released to the public, periodically binary updates to the Master code are released that we have to download in order to fix bugs or satisfy current playing field requirements.
–This question makes it appropriate for the Control System forum :slight_smile:

Thanks Mark! Very valuable resources! Much appreciated!