Hi,
Here is a couple of things to consider.
1. Try a different joystick to verify that is okay.
2. Modify the code to do something like this...
Code:
if (p1_sw_top == 1)
pwm01 = 254;
else
pwm01 = 0;
3. jdhawg is right on. If the program is not actually building correctly (you don't see the error messages) and you load, the IFI loader will download the last .hex file that was created....leading you to believe that your new code simply is not working. This has happened to us before.
4. Try a different port to verify port 1 does not have a problem.
Let us know what you have learned.
Regards,
ChuckB