Remarks

Tea5767
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Audio.Radio.Tea5767

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

Tea5767 radio;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing...");

    radio = new Tea5767(Device.CreateI2cBus());

    return Task.CompletedTask;
}

public async override Task Run()
{
    //scan through avaliable stations
    for (int i = 0; i < 8; i++)
    {
        await Task.Delay(1000);

        radio.SearchNextSilent();

        Resolver.Log.Info($"Current frequency: {radio.GetFrequency()}");
    }

    //set a known station
    radio.SelectFrequency(new Frequency(94.5, Frequency.UnitType.Megahertz));
}

Sample project(s) 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
Namespace Meadow.Foundation.Audio.Radio
Assembly Tea5767.dll

Syntax

public class Tea5767 : object

Constructors

Tea5767(II2cBus, Byte)

Create a new TEA5767 object using the default parameters

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

Parameters

Type Name Description
II2cBus i2cBus

I2Cbus connected to the radio

System.Byte address

Address of the bus on the I2C display.

Properties

IsMuted

Is the audio muted

Declaration
public bool IsMuted { get; set; }

Property Value

Type Description
System.Boolean

Methods

EnableStandby(Boolean)

Enable standby mode

Declaration
public void EnableStandby(bool enable)

Parameters

Type Name Description
System.Boolean enable

EnableStereo(Boolean)

Enable stereo if set to mono

Declaration
public void EnableStereo(bool enable)

Parameters

Type Name Description
System.Boolean enable

GetFrequency()

Get the current radio frequency

Declaration
public Frequency GetFrequency()

Returns

Type Description
Frequency

GetSignalLevel()

Get Signal Level

Declaration
public byte GetSignalLevel()

Returns

Type Description
System.Byte

level as a byte (0-255)

IsReady()

Is the radio ready for operation

Declaration
public bool IsReady()

Returns

Type Description
System.Boolean

IsSearchDown()

Is search mode down

Declaration
public bool IsSearchDown()

Returns

Type Description
System.Boolean

IsSearchUp()

Is search mode up

Declaration
public bool IsSearchUp()

Returns

Type Description
System.Boolean

IsStandby()

Is the radio in standby mode

Declaration
public bool IsStandby()

Returns

Type Description
System.Boolean

IsStereo()

Is the current station stereo

Declaration
public bool IsStereo()

Returns

Type Description
System.Boolean

Mute()

Mute audio if not muted

Declaration
public void Mute()

MuteLeft()

Mute the left channel

Declaration
public void MuteLeft()

MuteRight()

Mute the right channel

Declaration
public void MuteRight()

SearchFromBeginningMuted()

Start searching for station from lowest frequency (87Mhz)

Declaration
public bool SearchFromBeginningMuted()

Returns

Type Description
System.Boolean

true if station found

SearchFromEndMuted()

Start searching for station from highest frequency (108Mhz)

Declaration
public bool SearchFromEndMuted()

Returns

Type Description
System.Boolean

SearchNext()

Search to next station

Declaration
public bool SearchNext()

Returns

Type Description
System.Boolean

SearchNextSilent()

Search to next station and mute while seeking

Declaration
public bool SearchNextSilent()

Returns

Type Description
System.Boolean

SelectFrequency(Frequency)

Select radio frequency

Declaration
public void SelectFrequency(Frequency frequency)

Parameters

Type Name Description
Frequency frequency

the frequency

SetHighCutControlOff()

Disable high cut control

Declaration
public void SetHighCutControlOff()

SetHighCutControlOn()

Enable high cut control

Declaration
public void SetHighCutControlOn()

SetSoftMuteOff()

Turn soft mute off if enabled

Declaration
public void SetSoftMuteOff()

SetSoftMuteOn()

Enable soft mute

Declaration
public void SetSoftMuteOn()

SetStereoNoiseCancellingOff()

Disable stereo noise cancelling

Declaration
public void SetStereoNoiseCancellingOff()

SetStereoNoiseCancellingOn()

Enable stereo noise cancelling

Declaration
public void SetStereoNoiseCancellingOn()

StartSearchFromBeginning()

Start searching for station from lowest frequency (87Mhz)

Declaration
public bool StartSearchFromBeginning()

Returns

Type Description
System.Boolean

true if station found

StartSearchFromEnd()

Start searching for station from highest frequency (108Mhz)

Declaration
public bool StartSearchFromEnd()

Returns

Type Description
System.Boolean

UnmuteLeft()

Unmute the left channel

Declaration
public void UnmuteLeft()

UnuteRight()

Unmute the right channel

Declaration
public void UnuteRight()