# Please Help with RIO interrrupt

**URL:** <https://forums.digi.com/t/please-help-with-rio-interrrupt/21642>\
**Category:** Rabbit\
**Tags:** rio-interrupt\
**Created:** [August 7, 2020, 12:58pm UTC](https://forums.digi.com/t/please-help-with-rio-interrrupt/21642 "2020-08-07T12:58:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ctjpham](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@Ctjpham](https://forums.digi.com/u/Ctjpham)\
**Post date:** [August 7, 2020, 12:58pm UTC](https://forums.digi.com/t/please-help-with-rio-interrrupt/21642/1 "2020-08-07T12:58:44Z")

</div>

How to set interrupt on Rabbit extended IO? I followed the example in the document and it is not working for me. Here is the codes. Question: The P0CR is Pin 0 Control Register but what Block does this P0CR applied?  
/\*  
we are trying to setup the read mapping sensor vs interrupt  
MR 0x0E Use master prescaler, count from beginning  
condition to end condition  
MPR 0x13 Divide 20 MHz clock by 20 to get period of 1 ìs.  
ICR 0x0C Begin on rising edge of Pin 0.  
DCR 0x14 End on falling edge of Pin 0.  
P0CR 0x00 Make Pin 0 an input.  
\*/  
WrPortE(MR\_REG,NULL,0x0E);  
WrPortE(MPR\_REG,NULL,ONE\_MICRO\_SECOND);  
WrPortE(IRC\_REG,NULL,RISING\_EDGE\_DETECT);  
WrPortE(DCR\_REG,NULL,ENDS\_FALLING\_EDGE);  
WrPortE(P3CR,NULL,1);  
WrPortE(IER\_REG,NULL,0xf0);  
WrPortE(MCR\_REG,NULL,0x01);

---

<div class="post-metadata">

**Author:** ![TomCollins](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/tomcollins/32/37_2.png) [@TomCollins](https://forums.digi.com/u/TomCollins)\
**Post date:** [August 11, 2020, 2:24pm UTC](https://forums.digi.com/t/please-help-with-rio-interrrupt/21642/2 "2020-08-11T14:24:25Z")

</div>

Which product are you using the RIO chip with? Is this something that ships with the RIO, or did you add it into your own design?

Are you already making use of RIO\_SBC.LIB from Dynamic C 10?

Are you trying to measure a pulse time on pin 0? Your sample code refers to pin 0 but your code is writing to P3CR instead of P0CR.

---

<div class="post-metadata">

**Author:** ![Ctjpham](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@Ctjpham](https://forums.digi.com/u/Ctjpham)\
**Post date:** [August 12, 2020, 9:44am UTC](https://forums.digi.com/t/please-help-with-rio-interrrupt/21642/3 "2020-08-12T09:44:29Z")

</div>

WOOPs it is a type, I did have P3CR as an input
