Problem with Modified Code

Whenever I try to upload modified code to our robot controller, it refuses the modified code. but when i try the default code it works fine. can anyone help me figure out a solution to this?

Can you be more specific? “Refuses the modified code” is a nice turn of phrase, but it doesn’t say much about what is happening.

Define “refuses.” If the code loads all the way, but does not run (code error), then make sure you are calling Getdata/Putdata and not getting stuck in an infinite loop. If the user processor cannot communicate with the master processor (by means of Getdata/Putdata) then the code will not run at all.

I find the same problem happens if you try to upload for the wrong processor.
Make sure if you are working with the full size controller, you’re setup to work with the new (18F8722 iirc) processor.

The code loads but does not run… so you are saying that it might be a Getdata error? I will try this.

It comes down to this… What did you change?

If you post part of the code u changed, im sure the "Pro"grammers on here can help you with your problems. Turst me, ive seen it done before.

I only changed the inputs for the PWM outputs… made it so that you use two joysticks to drive with

analog inputs to pwm outputs
pwm01 = p1_y;
pwm02 = p1_y;
pwm03 = p2_y;
pwm04 = p2_y;
pwm05 = p1_x;
pwm06 = p1_x;
pwm07 = p2_x;
pwm08 = p2 _x;
pwm09 = p1_wheel;
pwm10 = p2_wheel;
pwm11 = p3_wheel;
pwm12 = p4_wheel;

I remembered when we switched our program to run a 360 controller, all of our PWMs were out of order so we had to imput the correct PWMs into the code, maybe you dont have the correct pwms set up for what you need to drive.

I think there’s a typo:
pwm08 = p2 _x;
it’s
pwm08 = p2_x;

But I think he rewrote the whole code into the post and accidently typed space there.
Ah, ok. What did you plug in to what PWM output?

only tested the first 4 pwm ports for the motors nothing was hooked into 5-12 at the time

more description… when i load non-default code all i get in the terminal window is “IFI>”

Andrew,

You changed something else. Try running windiff to compare default and modified source code files.

Mike

what is windiff? where can I find it?

A google search yields many references including this.

ok i think the issue is resolved. thanks for all the advice.