|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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? |
|
#2
|
||||
|
||||
|
Re: Can't enter Vex autonomous mode when using MPLab
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). Blake |
|
#3
|
||||
|
||||
|
Re: Can't enter Vex autonomous mode when using MPLab
Jamie,
This is from mplab_2006_fvc_programming_guide.pdf (note that this document is unchanged from last year): Quote:
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. Mike |
|
#4
|
||||
|
||||
|
Re: Can't enter Vex autonomous mode when using MPLab
Sorry, forgot to mention -
We did use the jumper. Tried it in every port, no luck with any of 'em. |
|
#5
|
|||||
|
|||||
|
Re: Can't enter Vex autonomous mode when using MPLab
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: printf("%2x\n", 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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I enter the Autonomous mode? | CompMaster | Programming | 5 | 17-02-2005 19:12 |
| Using REAL ENGLISH in autonomous mode??? | RIgnazio | Programming | 14 | 17-02-2005 17:19 |
| What type of autonomous mode program are you using? | SilverStar | Programming | 1 | 21-01-2004 18:48 |
| using the MPLAB IDE MPLAB SIM simulator | WizardOfAz | Programming | 1 | 03-11-2003 01:24 |
| Can't figure out auton mode | TangoBravo1318 | Programming | 1 | 20-02-2003 10:06 |