Initialize and Check button press ARM ASSEMBLY TIVA

107 views Asked by At

I have a TM4C123G board. I've set up a basic ARM assembly program in which the bits will shift either left (PC4, PC5, PC6) or right (down the opposite), lighting up differen LED's. I now would like to add a button to decide which of these patterns will be used while pressed. I'm struggling as far as how to initialize the GPIO for the button.

1

There are 1 answers

0
dracdc On

Generally speaking, to make use of a button (or any other peripheral) you need to work with their address.

It looks like that the TM4C board has user buttons. So you could try making use of them first, instead of buying a separate button/switch and connecting it to the GPIO.

If you must use the GPIO, please refer to this tutorial on How to use GPIO pins of TM4C