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
PIC18F57Q43 Curiosity Nano evaluation kit is a cutting-edge hardware platform designed to evaluate microcontrollers within the PIC18-Q43 family. Central to its design is the inclusion of the powerful PIC18F57Q43 microcontroller (MCU), offering advanced functionalities and robust performance. Key features of this evaluation kit include a yellow user LED and a responsive
mechanical user switch, providing seamless interaction and testing. The provision for a 32.768kHz crystal footprint ensures precision timing capabilities. With an onboard debugger boasting a green power and status LED, programming and debugging become intuitive and efficient. Further enhancing its utility is the Virtual serial port (CDC) and a debug GPIO channel (DGI
GPIO), offering extensive connectivity options. Powered via USB, this kit boasts an adjustable target voltage feature facilitated by the MIC5353 LDO regulator, ensuring stable operation with an output voltage ranging from 1.8V to 5.1V, with a maximum output current of 500mA, subject to ambient temperature and voltage constraints.
Microcontroller Overview
MCU Card / MCU

Architecture
PIC
MCU Memory (KB)
128
Silicon Vendor
Microchip
Pin count
48
RAM (Bytes)
8196
You complete me!
Accessories
Curiosity Nano Base for Click boards is a versatile hardware extension platform created to streamline the integration between Curiosity Nano kits and extension boards, tailored explicitly for the mikroBUS™-standardized Click boards and Xplained Pro extension boards. This innovative base board (shield) offers seamless connectivity and expansion possibilities, simplifying experimentation and development. Key features include USB power compatibility from the Curiosity Nano kit, alongside an alternative external power input option for enhanced flexibility. The onboard Li-Ion/LiPo charger and management circuit ensure smooth operation for battery-powered applications, simplifying usage and management. Moreover, the base incorporates a fixed 3.3V PSU dedicated to target and mikroBUS™ power rails, alongside a fixed 5.0V boost converter catering to 5V power rails of mikroBUS™ sockets, providing stable power delivery for various connected devices.
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" );
// 10 seconds delay
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
}
}
}
int main ( void )
{
/* Do not remove this line or clock might not be set correctly. */
#ifdef PREINIT_SUPPORTED
preinit();
#endif
application_init( );
for ( ; ; )
{
application_task( );
}
return 0;
}
// ------------------------------------------------------------------------ END