PreviousNext
clearIOCBN
Help > Macros > Control > clearIOCBN

Macro

 

Clear the MCU flag IOCBN4.

Purpose

 

To configure interrupt on pin change not to detect falling edge.

Syntax

 

void clearIOCBN()

Parameters

 

 –

Return value

 

 –

Output values

 

Flag IOCBN4 is cleared.

Preconditions

 

 –

Remarks

 

     This macro works with MCU pin RB4. It is the dedicated MCU pin for interrupt on change at TR transceivers. It is connected to TR pin C5 (for TRs for SIM mounting, e.g. TR-72G) or Q12 (for TRs for SMT mounting, e.g.TR-76G).

     IQRF development tools (e.g. CK-USB-04A and DK-EVAL-04A) with a TR module for SIM mounting, e.g. TR-72G (but not with a TR module for SMT mounting, e.g. TR-76G) use this pin to connect the User pushbutton (SW1), active low.

See MCU datasheet and IQRF OS User’s guide, chapters MCU pins and Interrupt.

Side effects

 

 –

See also

 

setIOCBN, clearIOCF

Example

 

setIOCBN();         // Falling edge active

   ...

if (IOCBF.4)        // Falling edge detected?

{

  pulseLEDR();      // Yes, perform desired service

  clearIOCF();      //   and clear interrupt on pin change flag

}

   ...

clearIOCBN();       // Falling edge not active

IOCBP.4 = 1;        // Rising edge active

   ...

if (IOCBF.4)        // Rising edge detected?

{

  pulseLEDG();      // Yes, perform desired service

  clearIOCF();      //   and clear interrupt on pin change flag

}

   ...