Develop a tiny radio station for things like remote control, home appliances, or other gadgets that need to send or receive information wirelessly
A
A
Hardware Overview
How does it work?
ccRF Click is based on the CC2500, a low-power, high-performance 2.4GHz transceiver from Texas Instruments, operating in the worldwide ISM frequency band from 2400MHz to 2483.5. The CC2500 has excellent receiver selectivity and blocking performance with an embedded packet handler engine suitable for packet-oriented systems. It also has a highly configurable baseband modem that supports various modulation formats (OOK, 2-FSK, GFSK, and MSK) and user-configurable parameters like frequency channel, output power, and air data rate. The transceiver has a programmable data rate from 1.2 to 500kBaud depending on frequency range over a PCB trace 2.4GHz antenna, making the ccRF Click
suitable for ultra-low power designs. The CC2500 has a built-in state machine that switches between different operation states (modes) to achieve optimum performance for many applications. Change of the states is performed using command strobes or internal events such as TX FIFO underflow. These states take care of Sleep, Idle, Active, Receive or Transmit modes, Wake-on-Radio (WOR), and more. In addition, the CC2500 comes with on-chip support for synchronization word detection, address check, flexible packet length, and automatic CRC handling. The ccRF Click uses an SPI serial interface to communicate with the host MCU. There are two pins in addition, the GD0 and GD2, routed where the RST and PWM pins of
the mikroBUS™ socket stand by default. With the GD2 as a digital output pin, the user can get test signals, FIFO status, clear channel indicator, serial output RX data, and more. The GD0 as a digital output pin can be used to get the same data as the GD2, plus it can provide serial input TX data. This Click board™ can only be operated with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Features overview
Development board
Fusion for ARM v8 is a development board specially designed for the needs of rapid development of embedded applications. It supports a wide range of microcontrollers, such as different ARM® Cortex®-M based MCUs regardless of their number of pins, and a broad set of unique functions, such as the first-ever embedded debugger/programmer over WiFi. The development board is well organized and designed so that the end-user has all the necessary elements, such as switches, buttons, indicators, connectors, and others, in one place. Thanks to innovative manufacturing technology, Fusion for ARM v8 provides a fluid and immersive working experience, allowing access anywhere and under any
circumstances at any time. Each part of the Fusion for ARM v8 development board contains the components necessary for the most efficient operation of the same board. An advanced integrated CODEGRIP programmer/debugger module offers many valuable programming/debugging options, including support for JTAG, SWD, and SWO Trace (Single Wire Output)), and seamless integration with the Mikroe software environment. Besides, it also includes a clean and regulated power supply module for the development board. It can use a wide range of external power sources, including a battery, an external 12V power supply, and a power source via the USB Type-C (USB-C) connector.
Communication options such as USB-UART, USB HOST/DEVICE, CAN (on the MCU card, if supported), and Ethernet is also included. In addition, it also has the well-established mikroBUS™ standard, a standardized socket for the MCU card (SiBRAIN standard), and two display options for the TFT board line of products and character-based LCD. Fusion for ARM v8 is an integral part of the Mikroe ecosystem for rapid development. Natively supported by Mikroe software tools, it covers many aspects of prototyping and development thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.
Microcontroller Overview
MCU Card / MCU
Type
8th Generation
Architecture
ARM Cortex-M4
MCU Memory (KB)
1536
Silicon Vendor
STMicroelectronics
Pin count
64
RAM (Bytes)
327680
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Schematic
Step by step
Project assembly
Track your results in real time
Application Output via UART Mode
1. Once the code example is loaded, pressing the "FLASH" button initiates the build process, and programs it on the created setup.
2. After the programming is completed, click on the Tools icon in the upper-right panel, and select the UART Terminal.
3. After opening the UART Terminal tab, first check the baud rate setting in the Options menu (default is 115200). If this parameter is correct, activate the terminal by clicking the "CONNECT" button.
4. Now terminal status changes from Disconnected to Connected in green, and the data is displayed in the Received data field.
Software Support
Library Description
This library contains API for ccRF Click driver.
Key functions:
ccrf_writeBytes
- Sequential ( burst ) write function.ccrf_readBytes
- Sequential ( burst ) read function.ccrf_defaultConfiguration
- Default configuration function.
Open Source
Code example
This example can be found in NECTO Studio. Feel free to download the code, or you can copy the code below.
/*!
* \file
* \brief ccRF Click example
*
* # Description
* This example demonstrates the use of an ccRF click board by showing
* the communication between the two click boards configured as a receiver and transmitter.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes the driver and logger, performs the click default configuration and
* displays the selected application mode.
*
* ## Application Task
* Depending on the selected mode, it reads all the received data or sends the desired message
* every 2 seconds.
*
* \author MikroE Team
*
*/
#include "board.h"
#include "log.h"
#include "ccrf.h"
// Comment out the line below in order to switch the application mode to receiver
#define DEMO_APP_TRANSMITTER
// Text message to send in the transmitter application mode
#define DEMO_TEXT_MESSAGE "MIKROE - ccRF click board\0"
static ccrf_t ccrf;
static log_t logger;
void application_init ( void )
{
log_cfg_t log_cfg;
ccrf_cfg_t cfg;
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
ccrf_cfg_setup( &cfg );
CCRF_MAP_MIKROBUS( cfg, MIKROBUS_1 );
ccrf_init( &ccrf, &cfg );
ccrf_default_cfg( &ccrf );
#ifdef DEMO_APP_TRANSMITTER
log_printf( &logger, " Application Mode: Transmitter\r\n" );
#else
log_printf( &logger, " Application Mode: Receiver\r\n" );
#endif
log_info( &logger, " Application Task " );
}
void application_task ( void )
{
#ifdef DEMO_APP_TRANSMITTER
ccrf_transmit_packet( &ccrf, DEMO_TEXT_MESSAGE, strlen( DEMO_TEXT_MESSAGE ) );
log_printf( &logger, " The message \"%s\" has been sent!\r\n", ( char * ) DEMO_TEXT_MESSAGE );
Delay_ms( 2000 );
#else
uint8_t data_buf[ 64 ] = { 0 };
uint8_t data_len = sizeof( data_buf );
if ( CCRF_CRC_OK == ccrf_receive_packet( &ccrf, data_buf, &data_len ) )
{
log_printf( &logger, " A new message has received: \"" );
for ( uint16_t cnt = 0; cnt < data_len; cnt++ )
{
log_printf( &logger, "%c", data_buf[ cnt ] );
}
log_printf( &logger, "\"\r\n" );
}
#endif
}
void main ( void )
{
application_init( );
for ( ; ; )
{
application_task( );
}
}
// ------------------------------------------------------------------------ END