lauwers 0 Posted February 9, 2020 Share Posted February 9, 2020 Hi, I have the code attached here for testing a 3digit 7 segment display and some pushbuttons. I use an interrupt routine to update the display, manage blinking and debouncing buttons. The program should just change the value on the 7 segment display when pushing a button (falling edge on the pin). Code is working if I put a delay(0) within my while loop (line 87). Without the delay(0) the code in the while loop is doing nothing (it also works if I eg. put random(0) iso. delay(0) ) Looks like the compiler is ignoring the code in the while loop for some strange reason. Anyone who can explain what is going wrong ? And how to avoid it ? I am running this on an MSP430G2452; energia version 1.8.11E23 (but same behaviour in 1.6) thank's, Jan TEST_7segment_interrupt_input.ino Quote Link to post Share on other sites
StefanSch 10 Posted February 10, 2020 Share Posted February 10, 2020 try it with this line: TA0CTL=0b0000001011010000; If it works i will explain why 😊 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.