Thanks for the MPLAB suggestion, it has helped a lot, I've now got the joysticks working well.
The code seem's to work exactly like I expect however the LED's are very dim. I don't think it's a wiring issue as when the program first starts the LED's are turned on and they come on at full brightness. It might be the way I'm setting the pins, I was using the following code which I've never tried before so maybe I haven't understood how it works correctly:
Could this be causing some sort of pulse modulation that's dimming the LEDs?
The code seem's to work exactly like I expect however the LED's are very dim. I don't think it's a wiring issue as when the program first starts the LED's are turned on and they come on at full brightness. It might be the way I'm setting the pins, I was using the following code which I've never tried before so maybe I haven't understood how it works correctly:
Rich (BB code):
movf FB,W ;**** Set Full Beam ****
xorwf On,W
btfsc STATUS,Z
bsf PORTB, 0
bcf PORTB, 0