Experience the nostalgia of classic tunes and the freshness of modern beats with our radio solution, seamlessly delivering a spectrum of musical bliss from both AM and FM bands.
A
A
Hardware Overview
How does it work?
AM/FM 2 Click is based on the Si4732, a broadcast AM/FM/SE/LW/RDS radio receiver from Skyworks. It features TDMA noise immunity, superior radio performance, high-fidelity audio power amplification, advanced AN/FM seek tunning, automatic frequency control (AFC), and automatic gain control (AGC). It also features a digital FM stereo decoder, programmable de-emphasis, advanced audio processing, and seven selectable AM channel filters. The Si4732 integrates an RDS/RBDS processor, which allows embedding of small amounts of digital information in conventional FM radio broadcasts. The Si4732 can receive the FM band broadcast in a range of 64 up to 108MHz and AM band from 520 up to 1710KHz. In addition, the receiver supports the SW band (2.3 – 26.1 MHz) and LW band (153 – 279 KHz). The AM/FM 2 Click uses an SMA connector and
external antenna to receive both AM and LW radio signals, while it also comes with a PTH for usage with a wire antenna. The FM and SW bands use a 3.5mm audio jack and connected earphones as an antenna, although a wire antenna is left as an option over an additional PTH. The Si4732 can receive or transmit the FM signal over the antenna but can not use both modes simultaneously. The audio signal from the output of the Si4732 is brought to the onboard 3.5mm female audio jack over the LM4910, eliminating the need for any external amplifier. There are four selectable digital sample precisions (8, 16, 20, and 24 bits). The sample rate can be set between 320000 and 48000Hz. AM/FM 2 Click uses a standard 2-Wire I2C interface to communicate with the host MCU. The I2C address can be selected over the ADDR SEL jumper with 0 default position. In cases
where the AM reception is too strong, the front-end attenuators can be engaged using the GP1 pin. The radio receiver has interrupt abilities, which can be used over the GP2 pin. Both GP1 and GP2 are turned off over unpopulated R8 and R9 resistor jumpers. To use them, you should solder 0Ω resistors. There is also an additional RST pin for resetting the radio receiver. The LM4910 features a low-power consumption shutdown mode activated over the ENA pin with LOW logic. 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. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Features overview
Development board
Flip&Click PIC32MZ is a compact development board designed as a complete solution that brings the flexibility of add-on Click boards™ to your favorite microcontroller, making it a perfect starter kit for implementing your ideas. It comes with an onboard 32-bit PIC32MZ microcontroller, the PIC32MZ2048EFH100 from Microchip, four mikroBUS™ sockets for Click board™ connectivity, two USB connectors, LED indicators, buttons, debugger/programmer connectors, and two headers compatible with Arduino-UNO pinout. Thanks to innovative manufacturing technology,
it allows you to build gadgets with unique functionalities and features quickly. Each part of the Flip&Click PIC32MZ development kit contains the components necessary for the most efficient operation of the same board. In addition, there is the possibility of choosing the Flip&Click PIC32MZ programming method, using the chipKIT bootloader (Arduino-style development environment) or our USB HID bootloader using mikroC, mikroBasic, and mikroPascal for PIC32. This kit includes a clean and regulated power supply block through the USB Type-C (USB-C) connector. All communication
methods that mikroBUS™ itself supports are on this board, including the well-established mikroBUS™ socket, user-configurable buttons, and LED indicators. Flip&Click PIC32MZ development kit allows you to create a new application in minutes. Natively supported by Mikroe software tools, it covers many aspects of prototyping 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

Architecture
PIC32
MCU Memory (KB)
2048
Silicon Vendor
Microchip
Pin count
100
RAM (Bytes)
524288
You complete me!
Accessories
These standard small stereo earphones offer a high-quality listening experience with their top-notch stereo cable and connector. Designed for universal compatibility, they effortlessly connect to all MIKROE mikromedia and multimedia boards, making them an ideal choice for your electronic projects. With a rated power of 100mW, the earphones provide crisp audio across a broad frequency range from 20Hz to 20kHz. They boast a sensitivity of 100 ± 5dB and an impedance of 32Ω ± 15%, ensuring optimal sound quality. The Φ15mm speaker delivers clear and immersive audio. Cost-effective and versatile, these earphones are perfect for testing your prototype devices, offering an affordable and reliable audio solution to complement your projects.
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic

Step by step
Project assembly
Track your results in real time
Application Output
1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support
Library Description
This library contains API for AM/FM 2 Click driver.
Key functions:
amfm2_seek_station
- AM/FM 2 seek station function.amfm2_tuning_freq
- AM/FM 2 tuning frequency function.amfm2_get_tuning_freq
- AM/FM 2 get tuning frequency function.
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* @file main.c
* @brief AM/FM 2 Click example
*
* # Description
* This example demonstrates the use of the AM/FM 2 Click board™.
* The app represents a radio tuner that supports worldwide AM/FM bands
* and has features such as automatic frequency control, seek station, and volume control.
*
* The demo application is composed of two sections :
*
* ## Application Init
* The initialization of I2C module and log UART.
* After driver initialization, the app sets the default configuration
* and searches and memorizes for a valid frequency of the 5 radio stations.
*
* ## Application Task
* This example demonstrates the use of the AM/FM 2 Click board™.
* The application switches all 5 previously memorized radio frequencies every 10 seconds.
* Results are being sent to the UART Terminal, where you can track their changes.
*
* @author Nenad Filipovic
*
*/
#include "board.h"
#include "log.h"
#include "amfm2.h"
static amfm2_t amfm2;
static log_t logger;
static float mem_station_freq[ 5 ] = { 0 };
static uint8_t rsp_status = 0;
void application_init ( void )
{
log_cfg_t log_cfg; /**< Logger config object. */
amfm2_cfg_t amfm2_cfg; /**< Click config object. */
/**
* 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.
amfm2_cfg_setup( &amfm2_cfg );
AMFM2_MAP_MIKROBUS( amfm2_cfg, MIKROBUS_1 );
if ( I2C_MASTER_ERROR == amfm2_init( &amfm2, &amfm2_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
if ( AMFM2_ERROR == amfm2_default_cfg ( &amfm2 ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
Delay_ms ( 100 );
log_printf( &logger, " Begins searching for a valid frequency...\r\n" );
log_printf( &logger, "--------------------\r\n" );
for ( uint8_t n_cnt = 0; n_cnt < 5; n_cnt++ )
{
if ( AMFM2_OK == amfm2_seek_station( &amfm2, &rsp_status ) )
{
if ( AMFM2_RSP_STATUS_CTS & rsp_status )
{
log_printf( &logger, " The search is done.\r\n" );
if ( AMFM2_OK == amfm2_get_tuning_freq( &amfm2, &mem_station_freq[ n_cnt ] ) )
{
log_printf( &logger, " Frequency: %.2f MHz \r\n", mem_station_freq[ n_cnt ] );
log_printf( &logger, "- - - - - - - - - - \r\n" );
Delay_ms( 100 );
}
}
}
}
log_printf( &logger, "--------------------\r\n" );
Delay_ms( 100 );
if ( AMFM2_OK == amfm2_set_volume( &amfm2, AMFM2_SET_VOLUME_MAX, &rsp_status ) )
{
log_printf( &logger, " Set max volume \r\n" );
Delay_ms( 100 );
}
log_info( &logger, " Application Task " );
log_printf( &logger, "--------------------\r\n" );
Delay_ms( 100 );
}
void application_task ( void )
{
for ( uint8_t n_cnt = 0; n_cnt < 5; n_cnt++ )
{
if ( AMFM2_OK == amfm2_tuning_freq( &amfm2, mem_station_freq[ n_cnt ], &rsp_status ) )
{
log_printf( &logger, " FM Station %d \r\nFrequency: %.2f MHz\r\n",
( uint16_t ) ( n_cnt + 1 ), mem_station_freq[ n_cnt ] );
log_printf( &logger, "--------------------\r\n" );
Delay_ms( 10000 );
}
}
}
void main ( void )
{
application_init( );
for ( ; ; )
{
application_task( );
}
}
// ------------------------------------------------------------------------ END