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

Interrupts, flags and functions

Hello, I need to know the exact moment when an input is set.

I'm using XC167CI and I have fast interrupts. This way is full, I mean I have used all fast interrupts.

I don't know how I can know when an input por is set and reset.

What can I do? I which file can I paste the code? Maybe in MAIN.C? Maybe in IO.C?

Please, help me.

Parents
  • "If you can guarantee that the signal generating the interrupt will remain active for greater than the latency period you can 'OR' several signals together on one interrupt pin and connect each one to a port pin. In the ISR you then poll each pin to see which one generated the interrupt. Alternatively you might look at using an external interrupt controller IC."

    Have u got a sample code for that?

    How can I use ISR? How can I connect several signal together on 1 interrupt pint? I'm so lost. Please, help me.

Reply
  • "If you can guarantee that the signal generating the interrupt will remain active for greater than the latency period you can 'OR' several signals together on one interrupt pin and connect each one to a port pin. In the ISR you then poll each pin to see which one generated the interrupt. Alternatively you might look at using an external interrupt controller IC."

    Have u got a sample code for that?

    How can I use ISR? How can I connect several signal together on 1 interrupt pint? I'm so lost. Please, help me.

Children