Log in

View Full Version : default drive?


GMKlenklen
23-01-2007, 00:36
Hi all!

Today we got 50% of the robot running!!! (the right side)

I'd like to know what pwm pins and such are used by the "default" program in there. I think I have pwm output to a victor hooked up to my right cim motor. Now I have pwm output to the other victor hooked up to my left cim motor... but either that does not work (hope not)... or the default isn't Port 1 & 2 on the operator interface!

Does anyone know?!?!

dpick1055
23-01-2007, 01:48
The default drive code uses pwm 13 - 16. pwm 13 and 14 are side of the robot and 15 and 16 are the other side. Here's the code if your interested.

pwm13 = pwm14 = Limit_Mix(2000 + p1_y + p1_x - 127);
pwm15 = pwm16 = Limit_Mix(2000 + p1_y - p1_x + 127);

Alan Anderson
23-01-2007, 06:52
I'd like to know what pwm pins and such are used by the "default" program in there.
Read the default program. You can find it at http://www.ifirobotics.com/rc.shtml (it's the 2007 RC Code (http://www.ifirobotics.com/docs/frc-code-2007-8722.zip) link) if you don't already have a copy. It is well commented. The relevant part is Default_Routine() in the user_routines.c file.

GMKlenklen
23-01-2007, 13:23
so uh... how do I open .hex files? to look at them / edit them?

dpick1055
23-01-2007, 13:27
You don't want to open the .hex files. You download default code (the link was posted above, I don't remember it off the top of my head). This will come with a bunch of .c and .h files and an MPLAP workspace file. Once you install MPLAB which came in the kop you can open these files and edit them. You should read the programming getting started thread it has a good explaintion of all of this. http://www.chiefdelphi.com/forums/showthread.php?t=30976

Good Luck!

GMKlenklen
23-01-2007, 15:32
sweet, thanks