nRF51 SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Pin Change Interrupt Example

Modules

 main.c
 Pin Change Interrupt Example Application main file.
 

Detailed Description

The Pin Change Interrupt Example demonstrates interrupts on pin change on pin 0. Pin 8 is configured as output and toggled in the pin change interrupt handler. It uses the hardware delivered in the nRF51822 Development Kit.

The application starts with configuring the pins and configuring GPIOTE to give an interrupt on pin 0 change. The interrupt handler toggles pin 8 (LED 0) when pin 0 (button 0) is pressed.

Setup

Instructions on how to set up the nRFgo Motherboard: nRFgo Motherboard Setup (nRF6310).

LED assignments:

Button assignments:

Testing

The Pin Change Interrupt Example Application can be tested as follows:

  1. Compile and program the application.
  2. Press Button 0 and check if LED 0 toggles.