8 years, 10 months ago.

What is the gpio for joystick right and left?

configure joystick (JSUP or pin P0.23) as GPIO
LDR R0,=PINSEL1 LDR R1,[R0] BIC R1,R1,#0x0000C000 STR R1,[R0]
configure joystick (JSDOWN or pin P0.17) as GPIO
LDR R0,=PINSEL1 LDR R1,[R0] BIC R1,R1,#0x0000000C STR R1,[R0]
configure joystick (JSRIGHT or pin P0.24) as GPIO
LDR R0,=PINSEL1 LDR R1,[R0] BIC R1,R1,#0x00000000 <-DON'T KNOW THE VALUE STR R1,[R0]
configure joystick (JSLEFT or pin P0.15) as GPIO
LDR R0,=PINSEL1 LDR R1,[R0] BIC R1,R1,#0x0000000 <-HERE ALSO DON'T KNOW STR R1,[R0]

Question relating to:

Be the first to answer this question.