Can't enter Vex autonomous mode when using MPLab

So my team competed at a Vex scrimmage this past weekend, and we ran into a problem -
Our robot never goes into autonomous mode on the field! Every other team there got it running, but not us. I found it’s at least partially due to the fact that we did our coding in MPLab, while everyone else was using EasyC.

We downloaded master firmware v. 7, and used the latest MPLab template from here

Everything works fine with user control, but the robot never goes into autonomous mode.
We tried changing the Library files, with these results:
Vex_alltimers.lib - Runs autonomous only, no user control.
Vex_alltimers_auton_test.lib - Runs user control, goes in and out of autonomous via channel 5 button on the controller.
Vex_alltimers_wauton.lib - Runs user control only, no auton
Vex_alltimers_wauton_impr.lib - Runs user control only, no auton

The only ones actually tested on the field were wauton and wauton_impr. The team refused to take the chance of having no user control or having auton on a trigger, so we only tried the others during testing in the pits between matches.

We also tried the equivalent Vex_library*.lib files, with identical results.

Has anyone else encountered this problem and/or found a solution?

Just to make sure - Did you use the Master code that is NOT for use with EasyC?

There are two versions of the Master code. One for use with EasyC, one for MPLab (or any other non-EasyC code, I presume).



This is from mplab_2006_fvc_programming_guide.pdf (note that this document is unchanged from last year):

When competing use :
These libraries use interrupt pin 6 to determine whether or not you want to run competition
code. The autonomous duration is set for 20 seconds. The operator match
duration is set for 2 minutes and 30 seconds.

Emphasis mine.

You need to have interrupt jumper 6 installed to have an autonomous mode.

If asked, the Technical Director for your tournament should have known this.


Sorry, forgot to mention -

We did use the jumper. Tried it in every port, no luck with any of 'em.

I haven’t looked at the vex MPLab code in a while (that’ll be changing shortly) but if it’s going off interrupt 6, are you sure you’re not accidentally mangling that bit in your code somewhere? The aliases file tells me it’s PORTBbits.RB7, aliased as rc_dig_int6. If you’re doing anything with these somewhere in your own code, it could account for the wackiness. Similar wackiness could probably occur if you’re doing anything with TRISB and as a remote possibility, any of the INTCON registers.

Looking at the rest of the code, you can’t really screw up the setting of the autonomous mode bit, but you can screw up actually going into autonomous mode if you’ve made improper changes to ifi_aliases.h, main.c, or user_routines_fast.c. Since it sounds like it’s going into autonomous mode with the channel 5 trick, I think you’re best off making sure that you’re getting a proper value from interrupt 6. You should just be able to toss in:
", rc_dig_int6);
somewhere to read the value you’re getting from interrupt 6. Then put the jumper in and out and make sure it’s changing properly. If it’s not… well then you know you’re doing something wrong somewhere, or you’re got a bad controller.