TOP Contributors

  1. MIKROE (2655 codes)
  2. Alcides Ramos (353 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 (136774 times)
  2. FAT32 Library (69977 times)
  3. Network Ethernet Library (55948 times)
  4. USB Device Library (46271 times)
  5. Network WiFi Library (41888 times)
  6. FT800 Library (41183 times)
  7. GSM click (28987 times)
  8. PID Library (26418 times)
  9. mikroSDK (26372 times)
  10. microSD click (25381 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: 3321 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

Fingerprint 2 click

5

Fingerprint 2 Click is a new fingerprint scanner Click board simplified for everyone's use and it's very easy to implement! This add-on board consists of a high-speed Nuvoton processor which carries high-performance fingerprint algorithm developed for on-board A-172-MRQ fingerprint sensor from company ByNew Technology Inc.

[Learn More]

TMR Angle click

5

TMR Angle Click is a Click board perfectly suited for developing applications that range from steering angle applications with the highest functional safety requirements to motors for wipers, pumps and actuators and electric motors in general.

[Learn More]

IrThermo 5v click

0

This example demonstrates reading from Ir thermo sensor MLX90614ESF-AAA Temperature is converted into Celsius degrees and displayed on display.

[Learn More]