Stufin
Home Quick Cart Profile

NRF51822

Buy Now

Clock speed

up to 16 MHz

Low power consumption

4.3 mA in TX mode, 3.9 mA in RX mode, and 0.4 A in sleep mode

Radio Frequency (RF) Transceiver

2.4 GHz transceiver with Gaussian Frequency Shift Keying (GFSK) modulation

Transmit power

up to +4 dBm

Receive sensitivity

-93 dBm

Support for adaptive frequency hopping (AFH) and adaptive data rate (ADR)

Analog-to-Digital Converter (ADC)

12-bit ADC with 8 configurable channels

Conversion speed

up to 500 kSPS

Input range

0-3.6 V

Peripherals

12-bit timer with 4 channels

2 x SPI, 2 x I2C, 1 x UART, and 1 x I2S interfaces

31 GPIOs, including 3 x 4mA drive capability

Support for NFC-A tag functionality

Power Management

Integrated power management unit (PMU) with voltage regulator and power gating

Support for coin cell battery operation

Low power modes

system off, sleep, and suspend

Operating Conditions

Operating temperature

-40C to 85C

Storage temperature

-40C to 125C

Supply voltage

1.8 V to 3.6 V

Package and Availability

The NRF51822 is available in a 48-pin QFN package (6x6 mm) and a 32-pin QFN package (5x5 mm). It is suitable for a wide range of applications, including smart home devices, wearables, and industrial IoT devices.

In summary, the NRF51822 is a high-performance, low-power SoC that offers a unique combination of microcontroller and RF transceiver functionality, making it an ideal choice for a variety of IoT applications.

Pin Configuration

  • NRF51822 Pinout Explanation
  • The NRF51822 is a powerful system-on-chip (SoC) from Nordic Semiconductor, designed for IoT and wireless applications. It has a total of 48 pins, which are categorized into different functional groups. Here is a detailed explanation of each pin, point by point:
  • VDD and GND Pins
  • VDD (Pins 1, 2, 3, and 4): These pins are connected to the power supply (1.8V to 3.6V) and should be decoupled with capacitors to the GND pins.
  • GND (Pins 5, 6, 7, and 8): These pins are connected to the ground of the system and should be connected to a common ground plane.
  • Digital I/O Pins
  • P0.00 (Pin 9): Digital I/O pin, can be used as a GPIO or as a serial clock input (SCK) for SPI communication.
  • P0.01 (Pin 10): Digital I/O pin, can be used as a GPIO or as a serial data input (MOSI) for SPI communication.
  • P0.02 (Pin 11): Digital I/O pin, can be used as a GPIO or as a serial data output (MISO) for SPI communication.
  • P0.03 (Pin 12): Digital I/O pin, can be used as a GPIO or as a serial clock output (SCK) for SPI communication.
  • P0.04 (Pin 13): Digital I/O pin, can be used as a GPIO or as a UART transmitter (TXD).
  • P0.05 (Pin 14): Digital I/O pin, can be used as a GPIO or as a UART receiver (RXD).
  • P0.06 (Pin 15): Digital I/O pin, can be used as a GPIO.
  • P0.07 (Pin 16): Digital I/O pin, can be used as a GPIO.
  • P0.08 (Pin 17): Digital I/O pin, can be used as a GPIO.
  • P0.09 (Pin 18): Digital I/O pin, can be used as a GPIO.
  • P0.10 (Pin 19): Digital I/O pin, can be used as a GPIO.
  • P0.11 (Pin 20): Digital I/O pin, can be used as a GPIO.
  • P0.12 (Pin 21): Digital I/O pin, can be used as a GPIO.
  • P0.13 (Pin 22): Digital I/O pin, can be used as a GPIO.
  • P0.14 (Pin 23): Digital I/O pin, can be used as a GPIO.
  • P0.15 (Pin 24): Digital I/O pin, can be used as a GPIO.
  • Analog Pins
  • A0 (Pin 25): Analog-to-digital converter (ADC) input pin.
  • A1 (Pin 26): Analog-to-digital converter (ADC) input pin.
  • A2 (Pin 27): Analog-to-digital converter (ADC) input pin.
  • A3 (Pin 28): Analog-to-digital converter (ADC) input pin.
  • Communication Pins
  • RX (Pin 29): UART receiver input pin.
  • TX (Pin 30): UART transmitter output pin.
  • SCK (Pin 31): SPI serial clock input pin.
  • MOSI (Pin 32): SPI serial data input pin.
  • MISO (Pin 33): SPI serial data output pin.
  • SCL (Pin 34): I2C serial clock input pin.
  • SDA (Pin 35): I2C serial data input/output pin.
  • Reset and Interrupt Pins
  • RST (Pin 36): Reset input pin, active-low.
  • INT0 (Pin 37): External interrupt input pin 0.
  • INT1 (Pin 38): External interrupt input pin 1.
  • INT2 (Pin 39): External interrupt input pin 2.
  • INT3 (Pin 40): External interrupt input pin 3.
  • Wireless Communication Pins
  • RFIO (Pin 41): Wireless transceiver I/O pin.
  • RFCLK (Pin 42): Wireless transceiver clock pin.
  • RFVDD (Pin 43): Wireless transceiver power supply pin.
  • RFGND (Pin 44): Wireless transceiver ground pin.
  • Debug and Test Pins
  • SWDCLK (Pin 45): Serial wire debug clock input pin.
  • SWDIO (Pin 46): Serial wire debug data input/output pin.
  • TMS (Pin 47): Test mode select input pin.
  • TCK (Pin 48): Test clock input pin.
  • When connecting the pins, ensure that:
  • VDD and GND pins are connected to the power supply and ground, respectively.
  • Digital I/O pins are connected to the desired peripherals or components.
  • Analog pins are connected to the desired analog sources.
  • Communication pins are connected to the corresponding communication peripherals.
  • Reset and interrupt pins are connected to the desired reset and interrupt sources.
  • Wireless communication pins are connected to the wireless transceiver module.
  • Debug and test pins are connected to the debug interface or test equipment.
  • Remember to follow the recommended PCB layout guidelines and decoupling capacitor placement to ensure reliable operation of the NRF51822 SoC.

Code Examples

NRF51822 Component Documentation
Overview
The NRF51822 is a microcontroller from Nordic Semiconductor, a popular choice for IoT and wireless applications. It's a highly integrated, low-power system-on-chip (SoC) that combines a microcontroller with a 2.4 GHz transceiver for Bluetooth low energy (BLE) and other wireless protocols.
Features
32-bit ARM Cortex-M0 processor
 256 KB flash memory and 16 KB RAM
 2.4 GHz transceiver for BLE, ANT, and proprietary 2.4 GHz protocols
 Low power consumption (down to 2.5 A/MHz in active mode)
 Supports multiple peripherals, including UART, SPI, I2C, and I2S
Code Examples
### Example 1: BLE Advertising with the NRF51822
This example demonstrates how to use the NRF51822 to advertise a BLE service using the Nordic Semiconductor's nRF5 SDK.
```c
#include <nrf_gpio.h>
#include <nrf_drv_gpiote.h>
#include <nrf_ble_gatt.h>
#include <nrf_ble_qwr.h>
// Define the BLE advertising data
ble_advdata_t advdata;
advdata.name_type               = BLE_ADVDATA_FULL_NAME;
advdata.include_appearance     = true;
advdata.flags                  = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
// Initialize the BLE stack
void ble_stack_init(void)
{
  uint32_t err_code;
  
  // Initialize the GAP layer
  err_code = nrf_ble_gap_init(gap_params, NULL);
  APP_ERROR_CHECK(err_code);
// Initialize the GATT layer
  err_code = nrf_ble_gatt_init(gatt_params, NULL);
  APP_ERROR_CHECK(err_code);
// Start advertising
  err_code = nrf_ble_qwr_adv_start(0, &advdata);
  APP_ERROR_CHECK(err_code);
}
int main(void)
{
  ble_stack_init();
  while (1) {
    // Handle BLE events
    nrf_ble_evt_dispatch();
  }
}
```
### Example 2: UART Communication with the NRF51822
This example shows how to use the NRF51822's UART peripheral to communicate with a serial terminal.
```c
#include <nrf_uart.h>
#include <nrf_drv_uart.h>
// Define the UART configuration
nrf_uart_config_t uart_config = NRF_UART_DEFAULT_CONFIG;
uart_config.baudrate = NRF_UART_BAUDRATE_9600;
// Initialize the UART peripheral
void uart_init(void)
{
  nrf_drv_uart_init(&uart_config, NULL);
}
int main(void)
{
  uart_init();
while (1) {
    char buffer[20];
    sprintf(buffer, "Hello, world! %d
", i++);
    nrf_drv_uart_write(&buffer[0], strlen(buffer), 0);
    nrf_drv_uart_disconnect();
    nrf_delay_ms(1000);
  }
}
```
Note: These examples are simplified and don't include error handling or other essential features. For a complete and production-ready implementation, please refer to the Nordic Semiconductor's nRF5 SDK documentation and examples.