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

Remarks

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.

It can be connected to a microcontroller through an I2C interface to digitally control its tuning frequency and other characteristics, giving room for opportunities to digitize some of its operations. It comes with tow headphone jacks, one for connection to a headphone/speaker while the other is for connection to the antenna which usually comes with the module.

Purchasing

You can get TEA5767 module with an antenna include it from the following suppliers:

Code Example

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

using System;
using System.Threading;
using Meadow;
using Meadow.Devices;
using Meadow.Foundation.Audio.Radio;

namespace TEA5767_Sample
{
    public class Program
    {
        static IApp _app; 
        public static void Main()
        {
            _app = new App();
        }
    }

    public class App : AppBase<F7Micro, App>
    {
        public App ()
        {
            Console.WriteLine("Initialize App");

            Console.WriteLine("Create I2C bus");
            var i2cBus = Device.CreateI2cBus();

            Console.WriteLine("Create TEA5767 instance");
            var radio = new TEA5767(i2cBus);

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

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

                radio.SearchNextSilent();

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

            radio.SelectFrequency(94.5f);
        }
    }
}

Circuit Example

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

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

It should look like the following diagram:

Constructors

View Source

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

View Source

IsMuted

Declaration
public bool IsMuted { get; set; }

Property Value

Type Description
System.Boolean

Methods

View Source

EnableStereo(Boolean)

Declaration
public void EnableStereo(bool enable)

Parameters

Type Name Description
System.Boolean enable
View Source

GetFrequency()

Declaration
public double GetFrequency()

Returns

Type Description
System.Double
View Source

GetSignalLevel()

Declaration
public byte GetSignalLevel()

Returns

Type Description
System.Byte
View Source

IsReady()

Declaration
public bool IsReady()

Returns

Type Description
System.Boolean
View Source

IsStereo()

Declaration
public bool IsStereo()

Returns

Type Description
System.Boolean
View Source

Mute()

Declaration
public void Mute()
View Source

SearchNext()

Declaration
public byte SearchNext()

Returns

Type Description
System.Byte
View Source

SearchNextSilent()

Declaration
public byte SearchNextSilent()

Returns

Type Description
System.Byte
View Source

SelectFrequency(Single)

Declaration
public void SelectFrequency(float frequency)

Parameters

Type Name Description
System.Single frequency
View Source

SetFrequency(Single)

Declaration
public void SetFrequency(float frequency)

Parameters

Type Name Description
System.Single frequency