up to 16 MHz
up to 16 MHz
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
up to +4 dBm
-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
up to 500 kSPS
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
system off, sleep, and suspend
Operating Conditions
-40C to 85C
-40C to 125C
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.
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.