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 (137090 times)
  2. FAT32 Library (70234 times)
  3. Network Ethernet Library (56110 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42053 times)
  6. FT800 Library (41384 times)
  7. GSM click (29111 times)
  8. mikroSDK (26560 times)
  9. PID Library (26489 times)
  10. microSD click (25486 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

Brushless 12 click

0

Brushless 12 Click is a compact add-on board suitable for controlling BLDC motors with any MCU. This board features the L6235, DMOS fully integrated 3-phase motor driver with overcurrent protection from STMicroelectronics.

[Learn More]

RS485 6 click

0

RS485 6 Click offers a half-duplex RS-485 communication with integrated surge protection

[Learn More]

2x2 RGB click

0

2x2 RGB Click is a compact add-on board that contains a matrix of 4 “intelligent” RGB elements, forming a 2x2 display screen. This board features the KTD2052A, a 12-channel RGB LED driver from Kinetic Technologies. It is a fully programmable current regulator for up to four RGB LEDs (12 LEDs in total). The LED matrix consists of four LRTB GFTG, a 6-lead in-line MULTILEDs, from ams OSRAM. The LEDs have a 120-degree viewing angle.

[Learn More]