Skip to content

axoulc/TAS5720-Arduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to TAS5720 Arduino Library 👋

License: MIT License

Arduino library to configure TI TAS5720(A) Class D amplifier

What is implemented ?

  • I2C communication
  • Configuration of the amplifier
  • Volume control
  • Mute control
  • Power control
  • Errors states

Install

Use the source files

Install it with platform io : https://registry.platformio.org/libraries/axoulc/TAS5720%20Arduino

pio pkg install --library "axoulc/TAS5720 Arduino@^1.1" 

or with the platformio.ini file :

[env:myenv] ;... lib_deps = axoulc/TAS5720 Arduino@^1.1 

Usage

#include <TAS5720.h> TAS5720 amp(Wire, 0x6D, true); uint8_t left = 0, right = 0; void setup() { pinMode(SPEAKER_SD, OUTPUT); // /SPK_SD Pin digitalWrite(SPEAKER_SD, LOW); // Start I2S amp.mute(true); amp.setSerialAudioInterfaceFormat(SAI_I2S); amp.setChannelSelection(RIGHT); amp.setAnalogGain(GAIN_25_DBV); amp.setDigitalBoost(DIGITAL_BOOST_6DB); amp.setVolume(200); // Do Anything you want here digitalWrite(SPEAKER_SD, HIGH); amp.mute(false); // Play some music } void loop() { amp.getVolume(); left = amp.volumeLeft; right = amp.volumeRight; amp.setVolume(++left, ++right); delay(1000); }

Author

👤 Axel Chabot

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2022 Axel Chabot.
This project is MIT licensed.

About

Arduino library to configure TI TAS5720(A) Class D amplifier

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages