TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137072 times)
  2. FAT32 Library (70219 times)
  3. Network Ethernet Library (56094 times)
  4. USB Device Library (46407 times)
  5. Network WiFi Library (42013 times)
  6. FT800 Library (41351 times)
  7. GSM click (29109 times)
  8. mikroSDK (26545 times)
  9. PID Library (26486 times)
  10. microSD click (25483 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

AM/FM click

Rating:

5

Author: MIKROE

Last Updated: 2019-10-21

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: FM

Downloaded: 3364 times

Not followed.

License: MIT license  

AM/FM Click is a RADIO RECEIVER click board that can be used to listen to music from the AM and FM radio bands.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "AM/FM click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "AM/FM click" changes.

Do you want to report abuse regarding "AM/FM click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

AM/FM Click

AM/FM Click

Native view of the AM/FM Click board.

View full image
AM/FM Click

AM/FM Click

Front and back view of the AM/FM Click board.

View full image

Library Description

Library contains function for sending commands and command arguments to device Library contains function for checking states of INT, AND, RST and CS pins Library contains function for receiving status byte of a device Library contains functions for checking states of specific interrupt bits in status byte Library contains function for receiving response bytes from a device Library contains function for device initialization Library contains function for seeking channels Library contains function for setting volume Library contains function for muting/unmuting device Library contains function for tuning frequency up/down Library contains function for getting current channel value Library contains constants for commands, arguments and properties.

Key functions:

  • uint8_t amfm_sendCommand( uint8_t * cmdAndArgsBuf_ ) - sends command and command arguments to device
  • uint8_t amfm_getCts( void ) - checks CTS bit state and returns 0/1 if CTS bit did/did not go HIGH in less than 500 cycles
  • uint8_t amfm_getResponse( uint8_t * respBuf_, uint8_t nBytes_ ) - returns a device response into a respBuf_ after receiving CTS

Examples description

The application is composed of three sections :

  • System Initialization - Initializes I2C, LOG, AN pin as INPUT, INT pin as INPUT, RST pin as OUTPUT, CS pin as OUTPUT
  • Application Initialization - Initializes I2C driver and initializes the device
  • Application Task - Executes aditional functions based on user input
void applicationTask( )
{
    dataReady = UART_Rdy_Ptr( );

if (dataReady != 0)
    {
        receivedData = UART_Rd_Ptr( );

    switch (receivedData)
        {
            case 's' :
            {
                amfm_caseSeek( );
                break;
            }
            case '+' :
            {
                amfm_casePlus( );
                break;
            }
            case '-' :
            {
                amfm_caseMinus( );
                break;
            }
            case 'm' :
            {
                amfm_caseMemorize( );
                break;
            }
            case 'i' :
            {
                amfm_caseMute( );
                break;
            }
            case 'u' :
            {
                amfm_caseTuneUp( );
                break;
            }
            case 'd' :
            {
                amfm_caseTuneDown( );
                break;
            }
            case '1' :
            {
                amfm_caseStation1( );
                break;
            }
            case '2' :
            {
                amfm_caseStation2( );
                break;
            }
            case '3' :
            {
                amfm_caseStation3( );
                break;
            }
            case '4' :
            {
                amfm_caseStation4( );
                break;
            }
            case '5' :
            {
                amfm_caseStation5( );
                break;
            }
            default :
            {
                mikrobus_logWrite( "> > > > > !!! WRONG COMMAND !!!  < < < < <", _LOG_LINE );
                break;
            }
        }
    }
}

Additional Functions :

  • void amfm_caseMemorize( ) - memorizes up to 5 stations
  • void amfm_caseStation1( ) - tunes station 1
  • void amfm_caseStation2( ) - tunes station 2
  • void amfm_caseStation3( ) - tunes station 3
  • void amfm_caseStation4( ) - tunes station 4
  • void amfm_caseStation5( ) - tunes station 5
  • void amfm_caseSeek( ) - seeks next station
  • void amfm_casePlus( ) - increases volume up to max value
  • void amfm_caseMinus( - decreases volume down to min value
  • void amfm_caseMute( ) - mutes the device
  • void amfm_caseTuneUp( ) - increments station frequency for 10 KHz
  • void amfm_caseTuneDown( ) - decrements station frequency for 10 KHz

Other mikroE Libraries used in the example:

  • I2C
  • Conversions
  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

ALSO FROM THIS AUTHOR

Matrix R click

0

Matrix R click is a mikroBUS add-on board with two red 5x7 matrices driven by two MAX7219 8-bit LED Display Drivers. The active area of each matrix is 7.62mm high and 5.08 mm wide. 7x5 is a standard resolution for displaying ASCII characters, so the click is essentially a dual-character display capable of showing letters in more readable typefaces compared to a 14-segment display. The click communicates with the target MCU through the mikroBUS:tm: SPI interface with two separate Chip Select lines for each matrix (CSL for the left, CSR for the right). This board is designed to use a 5V power supply.

[Learn More]

DC Motor 15 click

5

DC Motor 15 Click is a compact add-on board that contains a motor driver with current sense and regulation. This board features the DRV8874, an integrated motor driver with N-channel H-bridge, charge pump, current sensing, and adjustment from Texas Instruments.

[Learn More]

Cap Touch 5 click

0

Cap Touch 5 Click is a capacitive touch sensing Click board™ which features the CY8CMBR3106S-LQXI CapSense® Express™ controller which enables advanced, yet easy-to-implement, capacitive touch sensing user interface solutions.

[Learn More]