# Digital Input 0 Interrupt

**URL:** <https://forums.digi.com/t/digital-input-0-interrupt/10050>\
**Category:** Rabbit\
**Created:** [March 12, 2008, 8:48pm UTC](https://forums.digi.com/t/digital-input-0-interrupt/10050 "2008-03-12T20:48:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtokarz](https://avatars.discourse-cdn.com/v4/letter/j/ec9cab/32.png) [@jtokarz](https://forums.digi.com/u/jtokarz)\
**Post date:** [March 12, 2008, 8:48pm UTC](https://forums.digi.com/t/digital-input-0-interrupt/10050/1 "2008-03-12T20:48:33Z")

</div>

I am trying to understand how to code interrupts. A simple interrupt routine would look something like this.

```auto

//If I want to trigger off of dig input 0 my port would be ICCSR (input capture)
//I do not know what value to set the port register so
//interrupts get triggered from the digital input
WrPortI(port address that you want to trigger interrupt, 
            current value of port, new value of port);

//I understand what is happing here
SetVectExtern3000(interrupt number,interrupt handling function);

WrPortI(IOCR,NULL,0x09); //will trigger interrupt on rising edge priority 1

{stuff}

WrPort(IOCR,NULL,0x00); //disables interrupt

```
