标题: 分享一款AS5717数字功放芯片+stm8s做的双声道蓝牙音箱 [打印本页]

作者: wangzhenquan    时间: 2019-10-10 09:49
标题: 分享一款AS5717数字功放芯片+stm8s做的双声道蓝牙音箱
分享一款由TI的TAS5717数字功放芯片做的双声道蓝牙音箱程序,程序完整直接可用,希望能够帮助到初涉数字功放领域的朋友们快速入门。TAS5717数字功放芯片是一款2X10W的高保真度D类功率放大器。
电路原理图如下:


单片机源程序如下:
  1. #include  "stm8s.h"
  2. #include "stm8s_it.h"
  3. #include "stm8s_conf.h"
  4. #include "stm8s_clk.h"
  5. #include "stm8s_tim2.h"
  6. #include "stm8s_gpio.h"
  7. #include "stm8s_flash.h"
  8. #include "i2c.h"
  9. #include "tas5717.h"
  10. #include "global.h"
  11. #include "key.h"



  12. unsigned char I2C_BUFF[10];


  13. void main()
  14. {
  15.         sim();
  16.         PowerOnInit();//上电初始化
  17.   rim();
  18.         while(1)
  19.         {
  20.     if(TIM2_10ms_FLAG)//10ms
  21.                  {
  22.                         TIM2_10ms_FLAG=0;
  23.                   key_can();
  24.                         led_flash();
  25.            }
  26.                  if(TIM2_50ms_FLAG)//50ms
  27.                  {
  28.                         TIM2_50ms_FLAG=0;
  29.                   AUX_check();
  30.                         PH_check();
  31.                         databackups();
  32.            }
  33.                 encoder_can();
  34.                 Keypress();
  35.         }
  36. }





  37. #ifdef USE_FULL_ASSERT
  38.         /**
  39.         * @brief  Reports the name of the source file and the source line number
  40.         *   where the assert_param error has occurred.
  41.         * @param file: pointer to the source file name
  42.         * @param line: assert_param error line source number
  43.         * @retval : None
  44.         */
  45. void assert_failed(u8* file, u32 line)
  46. {
  47.         /* User can add his own implementation to report the file name and line number,
  48.                 ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

  49.         /* Infinite loop */
  50. }
  51. #endif
复制代码

所有资料51hei提供下载:
TAS5717数字功放原码.rar (15.06 MB, 下载次数: 109)



作者: ksn13    时间: 2020-5-8 16:46
感谢,正在调试5717不出声音。可以参考您的代码
作者: bg3sgy    时间: 2020-9-1 00:00
楼主是否有这个数字功放的中文详细资料,修到一台机器用到,感谢。
作者: 不解时候    时间: 2022-6-9 08:37
楼主你好,可否指点下初始化TAS5717需要发哪些I2C数据呀
作者: 不解时候    时间: 2022-6-9 08:42
初始化配置的I2C数据可以发给咱嘛?感谢!




欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1