Part Number: MSP430G2553 Hi folks, I am trying to work with interrupts, but I have no idea how get this to work, or where to start. I've written three for loops which count to ten. Then the idea was to activate the temp sensor in order to trigger an interrupt, which would stop the counting, and then continue when it cools down again. But I don't know how to enter this temp sensor routine, like how to check if the sensor is above 30 degrees. Since the code is executed one line at the time, I don't fathom as to how it's possible to both perform my 10 count, AND check the temperature sensor. Should I incorporate it in the for loop? #include #define TEL //10 //Tel upp til 10 ádrenn flash show #define BLINK 1//120000 #define ENDLINE 1//100000 #define FINISH 1//2000000 /** * main.c */ void tempInit(); int tempOut(); int main(void) { WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer P1DIR |= BIT0 + BIT6; volatile int rows = 0; volatile int line = 0; volatile int pause = 0; while(1) { //Outer loop for(rows = 0; rows > 16); //convert and pass }
↧