Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

How to use the niosii interrupt service program

How to use the niosii interrupt service program,where are there example???

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Please see the count_binary example. It registers an interrupt handler for the buttons which change the way it counts.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    i use this example but the interupt can not responde

    when i press the button but the led can not change
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    please tell a little bit more,

    what version of quartus, nios, hardware are you using

    can you start the proram in debugger ?

    can you set a breakpoint in the interrupt ?

    does it enter the interrupt routine ?

    static void handle_button_press(alt_u8 type, FILE *lcd)

    {

    /* Button press actions while counting. */

    if (type == &#39;c&#39;) // <-- set breakpoint here