thepenguin77
Junior Member level 2
I have another problem that seems to defy physics, although it might be that I have something very simple backwards.
I am trying to make a mod chip for an Xbox 360 controller. The controller uses ground to signal button presses. So what I have done is to connect wires to ground, power, player 4 LED, and the left and right trigger inputs. The pins that I use are:
(all voltages relative to ground)
1: unused
2: VDD, +2.01V, high mA
3: GP2, +1.48V, 1.1 mA from ground, .4 mA to VDD, right trigger
4: GP1, +1.75V, 2.2 mA from ground, LED with 620Ω resistor in series
5: GP0, +1.46V, 1.2 mA from ground, .4 mA to VDD, left trigger
6: unused
7: VSS, ground
8: extra button, connects to ground
This is only the initialization code, I added a check to see if it makes it through, which it does, but the chip becomes non-programmable afterwards.
GP3, GP2, and GP0 are all in input mode so they are sinking 0mA, .4mA, and .4mA respectively. GP1 is in output, so when it lights the LED it is outputting 2.2mA.
Add these together and that is 3mA total. These chips can handle 75mA though. Any ideas as to what is causing these chips to become unresponsive.
Also, the rest of my code doesn't really work right, although it works in an emulator. Also, code protection is not turned on.
I am trying to make a mod chip for an Xbox 360 controller. The controller uses ground to signal button presses. So what I have done is to connect wires to ground, power, player 4 LED, and the left and right trigger inputs. The pins that I use are:
(all voltages relative to ground)
1: unused
2: VDD, +2.01V, high mA
3: GP2, +1.48V, 1.1 mA from ground, .4 mA to VDD, right trigger
4: GP1, +1.75V, 2.2 mA from ground, LED with 620Ω resistor in series
5: GP0, +1.46V, 1.2 mA from ground, .4 mA to VDD, left trigger
6: unused
7: VSS, ground
8: extra button, connects to ground
This is only the initialization code, I added a check to see if it makes it through, which it does, but the chip becomes non-programmable afterwards.
Code:
org 0x0000
movwf osccal
movlw b'11010111'
; 0 timer
; 0 prescaler on timer
; 111 1 : 256 prescaler
option
movlw b'00001100'
movwf gpioMask
clrf pause
movlw 1
movwf burst
clrf mode
rlf mode, w ;clear carry
;#########################
start:
clrf ledFlash
startWLed:
movlw b'00000010'
movwf gpio
movwf sGpio
movlw b'00001101'
tris gpio
offLoop:
movf gpio, w
andwf gpioMask, w
xorwf gpioMask, w
btfss status, z
goto offLoop
call _20msDelay
;#########################
clrf gpio ;lights LED
stop:
goto stop
GP3, GP2, and GP0 are all in input mode so they are sinking 0mA, .4mA, and .4mA respectively. GP1 is in output, so when it lights the LED it is outputting 2.2mA.
Add these together and that is 3mA total. These chips can handle 75mA though. Any ideas as to what is causing these chips to become unresponsive.
Also, the rest of my code doesn't really work right, although it works in an emulator. Also, code protection is not turned on.