TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 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 (136708 times)
  2. FAT32 Library (69917 times)
  3. Network Ethernet Library (55932 times)
  4. USB Device Library (46258 times)
  5. Network WiFi Library (41883 times)
  6. FT800 Library (41144 times)
  7. GSM click (28979 times)
  8. PID Library (26408 times)
  9. mikroSDK (26355 times)
  10. microSD click (25351 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: 3319 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

MICRF RX click

0

MICRF RX Click is a compact add-on board for high-sensitivity applications, including remote keyless entry, tire pressure monitoring systems, and remote actuation systems. This board features the MICRF220, an ASK/OOK 315MHz receiver with RSSI and squelch capabilities from Microchip to offer top-notch RF performance. This super-heterodyne, image-reject RF receiver provides a -110dBm sensitivity at 1kbps and a 0.1% Bit Error Rate (BER), supporting adjustable demodulator filter bandwidths for bit rates up to 14.4kbps.

[Learn More]

Power Bank 2 click

5

The PowerBank 2 Click is a Click board equipped with the RT9480, highly integrated and easy to use power solution for Li-ion power bank and other powered handheld applications. It’s usually called EZPBS (Easy to Use PowerBank Solution).

[Learn More]

Thermo 13 click

5

Thermo 13 Click is a Click board equipped with the sensor IC, which can digitize temperature measurements between -30°C and +95°C so that the temperature measurement data can be processed by the host MCU.

[Learn More]