[OCCRA]: Programming

I missed the tutorial on programming but my team (West Bloomfield) is interested in doing this. I am fluent in c and c++, so its not the actual coding that I need help in. Rather, what I need to know, is where I can get the compiler, and maybe something on getting the compiled program to the robot (though I think that will be pretty easy.) I’ve seen the compiler on the first website for $50, but I didn’t think we had to purchase it separately. If someone could point me in the right direction I would be thankful.

I do believe you need IFI loader and MPLAB, if your coming from a FIRST team then they should have both already, if not

MPLAB

IFIloader

Both download links are at the bottom.

You need more than just MP LAB and IFI Loader–you need the actual compiler. It’s called C-18. Now, I’ve heard of ways people have done this with open-source stuff, but I can’t honestly say I’ve done it. If you are on a high-speed connection, I can offer you an ISO of the CD FIRST gave us last year. You would have to revert to the older linker files (I’ll post how if you need me to, but it is in the read me file in the default code, obtained from the IFI robotics site) because the controller we use in OCCRA is the 2004 controller, and they changed the PIC model number on us last year in FIRST. It will be interesting trying to upload that huge file to the server, but I can try. :yikes:

Maybe we can try, like, an AIM file transfer…or something…

I’m not offering this to the general public, because I view that as abuse, but just for educational purposes, and for another robotics team, I believe it is within the spirit of the license.

Just let me know.
JBot

Or you could just download the student addition free. You have to register first, but its free, then you can download the student version which is basically just a demo. It works fully for 60 days, so that should get you through OCCRA, and even after that, the compiler still works.

c18

The links are at the bottom, the one that says no documents worked for me. Remember you will have to register free first

“Student Edition/Demo
The Student Edition is free! It has all the features of the full compiler and libraries. After 60 days, the optimizations related to procedural abstraction and to the extended instruction set of the newer PIC18XXXX devices will be disabled. Code compiled after the expiration date will function but may occupy more memory space.” From Microchips site

Hope this is a little easier.

The proper legal way to handle this would be to contact IFI and/or Microchip and inquire about purchasing your own copy of the proper software.

Also, the open source alternative still depends on C18, running under WINE.

Yeah, I guess that’s right. It seems like since FIRST is handing out licenses of it that it should be fine, but I guess you are right.

Would it be okay to find our 2004 CD (as we are using the '04 RC) and give it to this user? We don’t use the license any more…

Oh. Good to know. Sounds messy, though. I like Windows…somewhat.

Isn’t there a way to adapt existing compilers to non-PC devices? I know that RockBox has devised a way to get gcc to compile to the processor of the iPod. I’m pretty ignorant when it comes to how this works. I want to learn more of the lower-level design of our controller, and how the compiler works. I know that we have 2 PICs in our controller, but that’s about it. Could we theoretically write our code in assembly? Sounds like fun…I think…

Sorry if I’m rambling.

JBot

The only way to get MPLAB, the program to compile code, legally is from Microchip.

IFI_LOADER, the program to put code on the robot is free and available from Innovation First.

As for open source alternatives, only IFI_LOADER truly has an open source alternative called picloader. MPLAB does not truly have an open source alternative. It only has legal emulation of the purchased product in WINE.

OCCRA purchased the IFI software and gave each team a license and the CD with the necessary programming files; your team should have a license. If you lost the actual cd, I believe you can get a copy of it from another team and be legal.

I know this thread was kind of dead but my question falls into this category and I did not know if I should create a new thread or…
So anyway I’m new at this programming thing, actually very new (I just downloaded my first code this afternoon. The code we wrote runs fine but after it is complete the robot just sits there when I try to use the controller. I went back and downloaded the test code (we are working with a vex robot) and found that after the code was complete that the vex bot was still not responsive. Anyone know why this may be happening and what I can do to fix this? Please Help!!! :eek:

Sam be a little bit more specific: The robot was programmed for auto mode and would not come out of auto mode which is basically the problem. It had a start and finish to the code right sam? someone help this boy please. :slight_smile: (he really does need it if you know what I mean!!) just kiddin.

Well I was using EasyC which gives you the variable screen with a start and end block. The commands were on the side so you drag and drop then fill out the motor values and wait times. The code was very basic, I don’t have the exact flowchart with me but I believe it was something like…

I/O
Variables
Start
-SetMotor (2, 0)
-SetMotor (3, 255)
-wait (4500)
-SetMotor (2, 0)
-SetMotor (3, 255)
-SetMotor (7, 255) // servo motor
-wait (1000)
-SetMotor (2, 0)
-SetMotor (3, 255)
-SetMotor (7, 255)
-SetMotor (8, 0)
-Wait (2500)
-SetMotor (2, 127)
-SetMotor (3, 127)
-SetMotor (7, 255)
-SetMotor (8, 127)
-wait (1000)
-SetMotor (7, 127)
End

I thought I had remember seeing something after the autonomous block for our FIRST robot but I think autonomous was in it’s own block. Was I maybe supposed to create that block. OHHH I’m confused??? :ahh:

Nevermind I have fixed the problem it took me a little while but I did it. :smiley: