nRF51 SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Button Debouncer Example

Modules

 main.c
 Button Debounce Example Application main file.
 

Detailed Description

The Button Debouncer Example shows GPIO usage with integrator debouncer to read the GPIO pin states. By pressing and holding one or more buttons on the the nRF51822 Development Kit, the corresponding LEDs will turn on. By releasing a button, the corresponding LED will turn off.

The source code and project file can be found in the <InstallFolder>\Nordic\nrf51822\Board\nrf6310\debounce_example folder.

When the application starts, the timer for handling debouncing is configured and started, including enabling the timer interrupt. The GPIO-pins 0-7 are configured for input (Buttons), and the GPIO-pins 8-15 are configured for output (LEDs).

Setup

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

LED assignments:

Buttons assignments:

Testing

The Button Debouncer Example Application can be tested as follows:

  1. Compile and program the application.
  2. Press buttons and check if the corresponding LEDs are lit.