1. 配置需求

  • 时钟输入:SCKI(24.576MHz)
  • 模拟输入:VINL2(Stereo left channel),VINR2(Stereo right channel)
  • LRCK:96KHz
  • BCK:6.14MHz

2. 配置通信接口

In software SPI/I2C mode, a PCM186x software programmable device can use its on-chip crystal oscillator, if a CMOS clock source is not available.

通信口选择I2C:

2.1. I2C地址

8bit I2C地址(b100101’AD”R/W’, 0x94 or 0x96)

2.2. 通信时序

3. 配置时钟源

If an external, high quality MCLK is available (either on the SCK pin or XTAL), then the PCM186x should be configured to run in Master Mode where possible, with the ADC and serial ports being driven from the MCLK/SCK source. The on-chip DSPs will continue to require clocks from the PLL, as they run from a much higher clock rate.

Clock MUXs and overall configuration can be done in register Page0, 0x20. For the best performance in master mode, where possible, the automatic clock configuration circuitry will configure the clocks as shown in Table 9, depending on if the device is a PCM186x software programmable device. The tables below show data at 48kHz multiples, the ratios for multiples of 44.1kHz are identical, while the absolute MHz values will be multiples of 44.1kHz instead of 48kHz.

This automatic configuration can be bypassed using registers, starting from CLKDET_EN (Page.0, 0x20).

PCM1863工作在软件可编程模式

3.1. 配置时钟源寄存器0x20

  • 设置成主模式
  • 选择外部时钟源SCKI
  • 默认使能CLKDET_EN,打开自动配置模式,因此不需要配置ADC_CLK_SRC、DSP2_CLK_SRC、DSP1_CLK_SRC
  • 配置BCK, LRCK的时钟频率

    如上图所示,在master mode时,配置0x26, 0x27寄存器,可以得到想要的BCK和LRCK的速率。查询Table 9,可得知当输入时钟SCK Frequence是24.576MHz时,可用的采样频率有48K,96K,192K,采样频率等于LRCK速率。

    • LRCK=96KHz=SCKFrequence/CLKDIVMSTSCK(Reg0x26)/CLKDIVMSTBCK(Reg0x27) LRCK = 96KHz=SCK Frequence / CLK_DIV_MST_SCK (Reg 0x26) / CLK_DIV_MST_BCK (Reg 0x27)
    • BCK=6.14M=SCKFrequence/CLKDIVMSTSCK(Reg0x26) BCK = 6.14M = SCK Frequence / CLK_DIV_MST_SCK (Reg 0x26)
    • 将SCK Frequence = 24.576MHz带入上述公式,可得CLK_DIV_MST_SCK = 4,CLK_DIV_MST_BCK=64

3.2. 配置SCK寄存器0x26, 0x27


4. 配置输入和输出

  • PCM1863支持最多4路模拟输入+1路双声道I2S输入,支持1路双声道I2S输出
  • 双声道I2S输入需要和PM1863共用一组I2S时钟

4.1. 配置首要模拟音频信号输入源

  • 本设计使用VINL2和VINR2作为模拟输入源,没有使用模拟麦克风和数字麦克风
  • 关闭mic bias,配置寄存器0x15

  • 配置寄存器0x06,0x07

4.2. 配置次要模拟信号输入源

The secondary ADC has two main purposes in the PCM186x family. The primary purpose is to act as a low power signal detection system, to aid with system wakeup from sleep. TI calls this functionality “Energysense”.

  • 改变SGIDET_CH_Mode的值可以在Energysense和Controlsense这两个模式之间切换,默认配置为Energysense
  • 次要模拟输入的输入范围是0-1.65V
  • 次要模拟输入通道配置为不选择

4.3. 配置I2S信号输入

本设计没有使用I2S输入,可以直接使用寄存器0x08的默认配置:

4.4. 配置I2S信号输出

配置I2S格式,寄存器0x08的默认配置:

4.5. 配置输出mixer

This function allows post ADC mixing, as well as ADC + incoming I2S mix. Volume control functionality can be performed prior to outputting the signal to an I2S DAC or Amplifier.

Gain range is from –100dB to + 18dB (20 bits negative up +18dB, 4.20 format).

As the DSP coefficients are directly written, no soft ramping is available. Use of I2S receive sacrifices 2 digital mic channels due to pin limitations.

Coefficients are written indirectly to virtual memory addresses using the registers on Page 1.

5. 其他配置

  • 配置自动削波抑制:此功能的作用是在检测到削波发生时,自动降低模拟输入的增益,默认是关闭的。
  • 模拟音频输入信号强度检测:可以用作睡眠唤醒(最低可检测到的信号强度是-57dBdBFS)。
  • 未用作音频输入的模拟输入:可用来检测直流电压的改变,其值可以通过读取I2C寄存器获取。
  • GPIO配置:可用作中断输出脚,也可用作一般GPIO脚。

6. 示例代码

const uint8_t IIC_REG_1863[IIC_REG_1863_SIZE][2] =
{
/* Page 0 Configuration */{0x00,0x00},    /* Register page selection = page 0 */{0x05,0x9b},    /* PGA setting: b[7] = 1: Enable mooth change b[6] = 0: Independent  PGA Controlb[5] = 0: Disable clipping detection after digital PGAb[4:3] = 1_1: Attenuation limit of the automatic clipping suppression is -6dBb[2:1] = 01: Start automatic clipping supression after clipping is detected 40 timeb[0] = 1: Enable automatic clipping suppression */{0x06,0x42},    /* ADC1L input selectb[7] = 0: Not change signal polarityb[6] = Reservedb[5:0] = 0000_10: ADC input channel select VIN2L[SE] */{0x07,0x42},    /* ADC1R input selectb[7] = 0: Not change signal polarityb[6] = Reservedb[5:0] = 0000_10: ADC input channel select VIN2R[SE] */{0x08,0x40},    /* ADC2L input selectb[7] = 0: Not change signal polarityb[6] = Reservedb[5:0] = 0000_00: ADC input channel select none */{0x10,0x00},    /* GPIO1/2 configurationb[7] = 0: GPIO1 normal polarityb[6:4] = 000: GPIO1b[3] = 0: GPIO0 normal polarityb[2:0] = 000: GPIO0*/{0x11,0x00},    /* GPIO3/4 configurationb[7] = 0: GPIO3 normal polarityb[6:4] = 000: GPIO3b[3] = 0: GPIO4 normal polarityb[2:0] = 000: GPIO4*/{0x20,0x11},    /* SCK configurationb[7:6] = 00: SCK/Xtal select SCK or Xtalb[5] = 0: Select SCKb[4] = 1: I2S master modeb[3:1] = 000: ADC/DSP clock source select, ignored if auto clock detector enabledb[0] = 1: Enable auto clock detector *//* Page 3 Configuration */{0x00,0x03},    /* Register page selection = page 3 */{0x15,0x00},    /* Mic controlb[4] = 0: Disable mic bias resistor bypassb[0] = 0: Power down mic bias control */{0x00,0x00},    /* Register page selection = page 0 */
};

PCM1863应用笔记相关推荐

  1. 【读书笔记】知易行难,多实践

    前言: 其实,我不喜欢看书,只是喜欢找答案,想通过专业的解答来解决我生活的困惑.所以,我听了很多书,也看了很多书,但看完书,没有很多的实践,导致我并不很深入在很多时候. 分享读书笔记: <高效1 ...

  2. 【运维学习笔记】生命不息,搞事开始。。。

    001生命不息,搞事不止!!! 这段时间和hexesdesu搞了很多事情! 之前是机械硬盘和固态硬盘的测速,我就在那默默的看着他一个硬盘一个机械测来测去. 坐在他后面,每天都能看到这位萌萌的小男孩,各 ...

  3. SSAN 关系抽取 论文笔记

    20210621 https://zhuanlan.zhihu.com/p/353183322 [KG笔记]八.文档级(Document Level)关系抽取任务 共指id嵌入一样 但是实体嵌入的时候 ...

  4. pandas以前笔记

    # -*- coding: utf-8 -*- """ Created on Sat Jul 21 20:06:20 2018@author: heimi "& ...

  5. PyTorch 学习笔记(六):PyTorch hook 和关于 PyTorch backward 过程的理解 call

    您的位置 首页 PyTorch 学习笔记系列 PyTorch 学习笔记(六):PyTorch hook 和关于 PyTorch backward 过程的理解 发布: 2017年8月4日 7,195阅读 ...

  6. 容器云原生DevOps学习笔记——第三期:从零搭建CI/CD系统标准化交付流程

    暑期实习期间,所在的技术中台-效能研发团队规划设计并结合公司开源协同实现符合DevOps理念的研发工具平台,实现研发过程自动化.标准化: 实习期间对DevOps的理解一直懵懵懂懂,最近观看了阿里专家带 ...

  7. 容器云原生DevOps学习笔记——第二期:如何快速高质量的应用容器化迁移

    暑期实习期间,所在的技术中台-效能研发团队规划设计并结合公司开源协同实现符合DevOps理念的研发工具平台,实现研发过程自动化.标准化: 实习期间对DevOps的理解一直懵懵懂懂,最近观看了阿里专家带 ...

  8. 王道考研 计算机网络笔记 第六章:应用层

    本文基于2019 王道考研 计算机网络: 2019 王道考研 计算机网络 个人笔记总结 第一章:王道考研 计算机网络笔记 第一章:概述&计算机网络体系结构 第二章:王道考研 计算机网络笔记 第 ...

  9. 王道考研 计算机网络笔记 第五章:传输层

    本文基于2019 王道考研 计算机网络: 2019 王道考研 计算机网络 个人笔记总结 第一章:王道考研 计算机网络笔记 第一章:概述&计算机网络体系结构 第二章:王道考研 计算机网络笔记 第 ...

最新文章

  1. 我研究了最热门的200种AI工具,却发现这个行业有点饱和
  2. 特斯拉AI日放大招!发布自研超算Dojo芯片,每秒可执行1024亿次计算
  3. vc2010中开始执行不调试灰的_反编译动态调试smali全过程
  4. leetcode 11
  5. Python3 异常: name ‘basestring‘ is not defined
  6. 时序分析基本概念介绍<Slew/Transition>
  7. 计算机round是什么函数,round函数
  8. [整理]苹果审核被拒后,返回崩溃日志应该怎么分析处理
  9. java6 64位_java6下载-java6官方版下载v6.0 最新64位免费版-旋风软件园
  10. java 机器学习资源整理
  11. matlab空间面板门槛,学习笔记——面板门槛模型
  12. android圆形头像边框,利用Android中BitmapShader制作自带边框的圆形头像
  13. angular-busy用法
  14. k8s [kubelet-check] Initial timeout of 40s passed.解决方案
  15. 安全检查如何确保建筑幕墙施工的安全管理呢
  16. win10输入法不显示图标并且只有英文的有效解决方法
  17. 记一次 关于Android studio 编译报错compileDebugJavaWithJavac FAILED
  18. ue虚幻引擎程序化植物生成器设置——如何快速生成大片森林
  19. FutureTask源码解析二
  20. 2021.5.13如何安装APK到手机

热门文章

  1. Nvidia jetson nano,控制风扇开启和关闭。
  2. 服务器日志法网站分析的原理及优缺点
  3. apscheduler使用中的时区问题
  4. C语言:str函数(一)
  5. Java课程设计——文本文件加密与解密软件设计与实现
  6. 玩转docker之mysql容器(常见问题汇总-续更)
  7. 016-状态自尊|管理他人的切入点
  8. 适用智能电表,热能表,气表等段码LCD液晶显示驱动芯片I2C 接口VK2C22A/B,RAM映射44*4, 40*4
  9. 计算机系学生橱窗分析结果怎么写,2015年高职学生职业生涯规划书
  10. php 挂起一个请求一直执行,在后台运行进程挂起PHP pag