TOP Contributors

  1. MIKROE (2751 codes)
  2. Alcides Ramos (372 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139050 times)
  2. FAT32 Library (71588 times)
  3. Network Ethernet Library (56988 times)
  4. USB Device Library (47326 times)
  5. Network WiFi Library (43005 times)
  6. FT800 Library (42295 times)
  7. GSM click (29754 times)
  8. mikroSDK (27873 times)
  9. PID Library (26858 times)
  10. microSD click (26129 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: 3828 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

9DOF 3 Click

0

9DOF 3 Click introduces the BMX055, a small-scale absolute orientation sensor in the class of low-noise 9-axis measurement units, from Bosch Sensortec. It comprises the full functionality of a triaxial, low-g acceleration sensor, a triaxial angular rate sensor and a triaxial geomagnetic sensor. All three sensor components of the BMX055 can be operated and addressed independently from each other. On top, the BMX055 integrates a multitude of features that facilitate its use especially in the area of motion detection applications, such as device orientation measurement, gaming, HMI or menu browser control. 9DOF 3 Click offers both SPI and I2C digital interfaces for easy and fast system integration.

[Learn More]

DC Motor 21 Click

0

DC Motor 21 Click is a compact add-on board that contains a brushed DC motor driver. This board features the A3910, a DC motor driver designed for low voltage power applications from Allegro Microsystems. It is controlled via several GPIO pins and has a wide operating voltage range with an output current capacity of 500mA. In addition to the possibility to be used in the full-bridge configuration to drive a single bidirectional DC motor, it can also be used as a dual half-bridge to drive dual DC motors.

[Learn More]

Pedometer Click

0

Pedometer Click is designed to sense movement, more precisely, to sense and count steps taken by its user.

[Learn More]