buttonINT

buttonINT - /* This code light an LED then makes a...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/********************************************** This code light an LED then makes a measurement of the time until a button assumed to be on Port 2 Pin 7 is pressed ***********************************************/ /** NOTE: This is just an example of interrupts. **/ /** This code WILL NOT RUN on our lab MSP430 boards **/ /** because Port 2 pin 7 is not connected to a button!**/ #include "msp430x44x.h" // Assembler directive instruct the assembler program // as to how certain memory locations should be initialized. // Assembler directives are only "run" when IAR downloads // code to the chip. They are NEVER executed by the CPU. NAME buttonExample ; name of program PUBLIC main ; make main visible ORG 0xFFFE ; setup RESET vector to go to dw main ; the address labeled main on power reset ORG 0xFFE2 ; setup the port 2 interrupt vector dw port2_ISR ; with address of ISR ; SHOULD set all unused interrupt vectors to go to ; invalidISR. I show only one example here ORG 0xFFEE ; setup the ADC interrupt vector
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/04/2010 for the course ECE 2801 taught by Professor Jarvis during the Spring '08 term at WPI.

Page1 / 2

buttonINT - /* This code light an LED then makes a...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online