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. 条款22: 尽量用“传引用”而不用“传值”
  2. CoFun 1612 单词分组(容斥)
  3. Ubuntu10 上安装Vmware Tools注意
  4. matlab程序的幂法,数值分析课程设计+幂法与反幂法MATLAB
  5. JavaScript的值传递和引用传递
  6. python yield 简单用法_通过实例简单了解python yield使用方法
  7. 尴尬!三星Galaxy S10系列面部识别疑似翻车:连兄妹都分不清
  8. 海量ICLR论文点评公开,用这几个工具可以读得更轻松
  9. 刚刚创业的你 这几点让你的公司不断前进
  10. OpenGL ES和EGL关系(二十五)
  11. Item 1:Always Use Properties Instead of Accessible Date Members
  12. 程序员专用壁纸!!!
  13. VISA+SCPI实现安捷伦或是德信号源+频谱仪程控
  14. STM32驱动_LCD1602
  15. 计算机装系统找不到硬盘分区,u盘装系统找不到硬盘分区的处理方法
  16. 交流异步电机的Modelica模型
  17. APP应用分发平台分析(一)
  18. Panda白话 - G1垃圾收集器 之 Refine线程
  19. 关于Django+Framework的最完整面试题(1)
  20. 计算机专业考博入学考试科目,北京航空航天大学计算机应用技术考博考试科目.doc...

热门文章

  1. 计算机工作理想湿度,计算机理想的工作温度七月的盛夏,碧空中没有一丝云彩,只剩下纯(9)...
  2. python基于flask_sockets实现WebSocket——叁
  3. 再谈宋星博客的留言与seo培训联盟
  4. Word操作之插入图片自动更改大小
  5. 12- 定时器介绍和定时器0定时1ms
  6. python判断手机号运营商_匹配手机号码及运营商校验
  7. qt构建浏览器_如何为组织构建安全的浏览器
  8. Kindle接入HomeAssistant:实现锁屏壁纸显示HA内设备信息并在HA内获取Kindle电量
  9. Linux环境下安装Calibre 源代码编译
  10. Spark创建hive表报错 ROW FORMAT DELIMITED is only compatible with ‘textfile‘, not ‘orc‘