Remarks

TEA5767
Status
Source code GitHub
NuGet package

The TEA5767 FM module is based on the TEA5767GH which is a single-chip, electronically tuned, FM stereo radio for low-voltage applications with fully integrated Intermediate Frequency (IF) selectivity and demodulation.

The TEA5767 is controlled via I2C. It comes with two 1/4" jacks, one for connection to a headphone/speaker and one to connect an antenna (often sold with the module).

Purchasing

You can get a TEA5767 module (with antenna included) from the following supplier(s):

Code Example

The following example shows how to initialize a TEA5767 radio and seek radio stations:

public class MeadowApp : App<F7Micro, MeadowApp>
{
    Tea5767 radio;

    public MeadowApp()
    {
        radio = new Tea5767(Device.CreateI2cBus());

        Scan();
    }

    void Scan() 
    {
        Console.WriteLine("TestTEA5767...");

        for (int i = 0; i < 8; i++)
        {
            Thread.Sleep(1000);

            radio.SearchNextSilent();

            Console.WriteLine($"Current frequency: {radio.GetFrequency()}");
        }

        radio.SelectFrequency(94.5f);
    }
}

Sample projects available on GitHub

Wiring Example

To wire a TEA5767 to your Meadow board, connect the following:

TEA5767 Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

It should look like the following diagram:

Characteristic Locus
Inheritance System.Object > Tea5767
Inherited Members System.Object.ToString() System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone()
Namespace Meadow.Foundation.Audio.Radio
Assembly Tea5767.dll

Syntax

public class Tea5767

Constructors

Tea5767(II2cBus, Byte)

Create a new TEA5767 object using the default parameters

Declaration
public Tea5767(II2cBus i2cBus, byte address = 96)

Parameters

Type Name Description
II2cBus i2cBus
System.Byte address

Address of the bus on the I2C display.

Properties

IsMuted

Declaration
public bool IsMuted { get; set; }

Property Value

Type Description
System.Boolean

Methods

EnableStereo(Boolean)

Declaration
public void EnableStereo(bool enable)

Parameters

Type Name Description
System.Boolean enable

GetFrequency()

Declaration
public double GetFrequency()

Returns

Type Description
System.Double

GetSignalLevel()

Declaration
public byte GetSignalLevel()

Returns

Type Description
System.Byte

IsReady()

Declaration
public bool IsReady()

Returns

Type Description
System.Boolean

IsStereo()

Declaration
public bool IsStereo()

Returns

Type Description
System.Boolean

Mute()

Declaration
public void Mute()

SearchNext()

Declaration
public byte SearchNext()

Returns

Type Description
System.Byte

SearchNextSilent()

Declaration
public byte SearchNextSilent()

Returns

Type Description
System.Byte

SelectFrequency(Single)

Declaration
public void SelectFrequency(float frequency)

Parameters

Type Name Description
System.Single frequency

SetFrequency(Single)

Declaration
public void SetFrequency(float frequency)

Parameters

Type Name Description
System.Single frequency