Button Interrupt

This is a simple example that just toggles the state of the LED when the button is pressed, and is a good first program to compile and load to ensure that you have configured the development environment correctly.

If using IAR: In the Workspace pane, click on Button Blink tab to make this project the current project. Now click Project:Download and Debug to download this code into the micro-controller. If all goes well then you should see a few dialog boxes be displayed and then IAR will change to the debug view. Now click Debug:Go (or the GO button) to start the processor running.

If using Code Composer Studio: In the Project Explorer pane, click on the Button Blink project to make this project the current project. Now click Run : Debug to download this code into the micro-controller. If all goes well then you should see a few dialog boxes be displayed and then CCS will change to the debug view. Once it has finished loading without errors, click Run : Resume (or the green / yellow arrow) to start the processor running.

You should now see one of the LEDs toggle about once per second. Press the other button and you will toggle the other LED on and off. Not the most exciting example, but convenient for verifying that your development environment is configured correctly.

Next: Hello World

Top: Module_Examples

