This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cannot get KBD interrupt to work - 89LPC922

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

Parents
  • Note that this has nothing to do with Keil - it is purely a hardware feature of the specific chip.

    "If I put the micro into total power down, I assume this is the same as executing some type of 'halt' instruction"

    Never assume - always check in the Datasheet.

    The datasheet will document precisely what is and is not preserved in the various "low power" modes available on the specific chip.

    IIRC, "total power down" does exactly as the name suggests; so nothing is preserved - getting out of "total power down" is equivalent to a Reset.
    If you want anything preserved, you will have to use one of the other "low power" modes - the less-than-total powerdown ones!
    Again, check this in the Datasheet.

    I think there's an NXP app note that illustrates this?

Reply
  • Note that this has nothing to do with Keil - it is purely a hardware feature of the specific chip.

    "If I put the micro into total power down, I assume this is the same as executing some type of 'halt' instruction"

    Never assume - always check in the Datasheet.

    The datasheet will document precisely what is and is not preserved in the various "low power" modes available on the specific chip.

    IIRC, "total power down" does exactly as the name suggests; so nothing is preserved - getting out of "total power down" is equivalent to a Reset.
    If you want anything preserved, you will have to use one of the other "low power" modes - the less-than-total powerdown ones!
    Again, check this in the Datasheet.

    I think there's an NXP app note that illustrates this?

Children