We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, can someone help point me in the right direction. I have a simple program that takes push button inputs and then sends them by IR led link to a receiver. It uses the printf function to drive the LED and the KBI on P0 for the p/button inputs.
The program compiles ok and the printf works if I do a printf("rtrt") just before entering the main loop where the program is supposed to sit until a KBI is detected. Problem is I cannot trigger the interrupt. Additionally, I get an L16 'unused code, ignored for . . . etc' message for the interrupt service routine. So, I think that the compiler or linker is not seeing the isr. I don't think its a hardware issue. I've checked wiring and voltage level changes on the P0 pins.
Any thoughts on this?
thanks
Jason
I do not like to see a function prototype that is not matching the ISR - the prototype indicates that it is a normal function, not an ISR.
If the compiler decides to trust the function prototype, and treats void keypad_isr(void) as a normal function, then it can be thrown away since there will be no caller.
By the way - did you consider the bit values you have defined and what your command variable will be set to?