I would like to do the next thing. If I use P9.1 like as general input I'd like to do some operations when this input is set. How can I do it? I have try that: void hello(void) { printf("Hello, willow\n"); } void main(void) { MAIN_vInit(); while (1) { if (P9_P0) { hello(); } } } With this example I'm wrong because hello repeats so many times until P9.0 is reset. I don't want do that, I would like to do this only one time and I'm thinking to do hello like an interrupt but I don't know how.