This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS7142: 我们项目使用ADS7142IRUGR这颗料需要一些东西

Part Number: ADS7142


我们项目使用ADS7142IRUGR这颗料,麻烦提供下高通平台的驱动代码,谢谢!

  • 您好,

    非常抱歉,没有高通平台的驱动代码提供给您,在 ADS7142 产品首页 --- 设计和开发---软件开发 处提供了 ADS7142 Device Functional Modes Firmware (Rev. A),希望对您有帮助:https://www.ti.com.cn/cn/lit/zip/sbac201

    另外,我在E2E 英文论坛看到类似的问题,您可以等待并查看 E2E论坛工程师的回复,看那边是否可以提供更好的建议:

    https://e2e.ti.com/support/data-converters-group/data-converters/f/data-converters-forum/1076428/ads7142-drive-code?tisearch=e2e-sitesearch&keymatch=ADS7142#

  • 1.请教下,忙/Rdy和警报这两个脚是不是不需要控制?

    2.这个代码,帮忙确认下,该用哪个模式的?

  • 问题1应该是“请教下,busy/rdy和alert这两个脚是不是不需要控制?”

  • 1、这两个管脚是数字输出管脚,

      BUSY/RDY :当设备按顺序扫描通道时,将该引脚拉高,当顺序完成或中止时,将该引脚拉低。

    ALERT:低电平有效,OD输出。该引脚的状态由数字窗口比较器块控制。外接上拉电阻至 DVDD。

    您说的控制具体是什么意思?

    2、这2个.c文件以 High Precision Mode命名,应该是High Precision 模式。

  • 请帮忙解答一下这个问题

  • 是每通道的16个转换结果的累加值,具体参看datasheet 7.3.8 Accumulator部分。

  • 请问下这个LSB和MSB是什么意思,是代表采集到的ch0和ch1的电压值吗?怎么可以获取到ch0和ch1采集的电压值?

  • 1、LSB(Least Significant Byte)低位字节,MSB Most Significant Byte 高位字节,08h 09h是一个数据,是16位的,分2个字节,一个高位字节在09h一个低位字节在08h;

    2、是ch0和ch1的16个转换结果的累加值;

    3、需要工作在Autonomous模式,具体请查看数据手册 7.3.7 Data Buffer

  • Hi Amy,

    我使用Autonomous stopburst模式,采集ch0电压, 读32个Data Buffer数据,数据0(0x8b)是MSB? 数据1(d1)是LSB?,完整数据是0x8bd1(35793)?

    0x8bd1是采集到的ch0的电压值?这个数据应该还要转化吧,该怎么转化呢?(实际我使用万用表量出来是0.932V)

    下面是我的寄存器设置,请帮忙check下

    [ 57.762777] ads7142: get_adc_data: ads7142 get_adc_data
    [ 57.762824] ads7142: ads7142_write_reg: ads7142_write_reg opcode = 0x8 reg = 0x17 data = 0xa
    [ 57.763185] ads7142: ads7142_write_reg: ads7142_write_reg opcode = 0x8 reg = 0x14 data = 0x1
    [ 57.763389] ads7142: ads7142_write_reg: ads7142_write_reg opcode = 0x8 reg = 0x17 data = 0x0
    [ 57.778066] ads7142: ads7142_write_reg: ads7142_write_reg opcode = 0x8 reg = 0x1f data = 0x1
    [ 57.778301] ads7142: ads7142_write_reg: ads7142_write_reg opcode = 0x8 reg = 0x15 data = 0x1
    [ 57.778501] ads7142: ads7142_write_reg: ads7142_write_reg opcode = 0x8 reg = 0x24 data = 0x3
    [ 57.778936] ads7142: ads7142_read_reg: opcode = 0x10 reg = 0x24 data: 0x3
    [ 57.778943] ads7142: get_adc_data: ads7142 get channelconfig 0x3
    [ 57.778956] ads7142: ads7142_write_reg: ads7142_write_reg opcode = 0x8 reg = 0x1c data = 0x6
    [ 57.779386] ads7142: ads7142_read_reg: opcode = 0x10 reg = 0x1c data: 0x6
    [ 57.779394] ads7142: get_adc_data: ads7142 get opmodeselconfig 0x6
    [ 57.779636] ads7142: ads7142_read_reg: opcode = 0x10 reg = 0x0 data: 0x2
    [ 57.779644] ads7142: get_adc_data: ads7142 get opmodei2cconfig 0x2
    [ 57.779656] ads7142: ads7142_write_reg: ads7142_write_reg opcode = 0x8 reg = 0x20 data = 0x1
    [ 57.780086] ads7142: ads7142_read_reg: opcode = 0x10 reg = 0x20 data: 0x1
    [ 57.780093] ads7142: get_adc_data: ads7142 get autoseqchenconfig 0x1
    [ 57.780106] ads7142: ads7142_write_reg: ads7142_write_reg opcode = 0x8 reg = 0x18 data = 0x0
    [ 57.780535] ads7142: ads7142_read_reg: opcode = 0x10 reg = 0x18 data: 0x0
    [ 57.780543] ads7142: get_adc_data: ads7142 get oscconfig 0x0
    [ 57.780554] ads7142: ads7142_write_reg: ads7142_write_reg opcode = 0x8 reg = 0x19 data = 0x15
    [ 57.780984] ads7142: ads7142_read_reg: opcode = 0x10 reg = 0x19 data: 0x15
    [ 57.780990] ads7142: get_adc_data: ads7142 get nCLKconfig 0x15
    [ 57.781003] ads7142: ads7142_write_reg: ads7142_write_reg opcode = 0x8 reg = 0x28 data = 0x2
    [ 57.781203] ads7142: ads7142_write_reg: ads7142_write_reg opcode = 0x8 reg = 0x2c data = 0x0
    [ 57.781404] ads7142: ads7142_write_reg: ads7142_write_reg opcode = 0x8 reg = 0x1e data = 0x1
    [ 57.781603] ads7142: ads7142_write_reg: ads7142_write_reg opcode = 0x8 reg = 0x1f data = 0x1
    [ 57.782033] ads7142: ads7142_read_reg: opcode = 0x10 reg = 0x1 data: 0x10
    [ 57.782041] ads7142: get_adc_data: ads7142 get databufferstatus 16
    [ 57.782048] ads7142: get_adc_data: ads7142 busy/rdy status 0
    [ 57.783071] ads7142: ads7142_read: i = 0 date = 0x8b
    [ 57.783075] ads7142: ads7142_read: i = 1 date = 0xd1
    [ 57.783078] ads7142: ads7142_read: i = 2 date = 0x8b
    [ 57.783082] ads7142: ads7142_read: i = 3 date = 0xe1
    [ 57.783086] ads7142: ads7142_read: i = 4 date = 0x8b
    [ 57.783089] ads7142: ads7142_read: i = 5 date = 0xe1
    [ 57.783092] ads7142: ads7142_read: i = 6 date = 0x8b
    [ 57.783096] ads7142: ads7142_read: i = 7 date = 0xe1
    [ 57.783099] ads7142: ads7142_read: i = 8 date = 0x8b
    [ 57.783103] ads7142: ads7142_read: i = 9 date = 0xe1
    [ 57.783106] ads7142: ads7142_read: i = 10 date = 0x8b
    [ 57.783110] ads7142: ads7142_read: i = 11 date = 0xe1
    [ 57.783113] ads7142: ads7142_read: i = 12 date = 0x8b
    [ 57.783117] ads7142: ads7142_read: i = 13 date = 0xe1
    [ 57.783120] ads7142: ads7142_read: i = 14 date = 0x8b
    [ 57.783123] ads7142: ads7142_read: i = 15 date = 0xe1
    [ 57.783126] ads7142: ads7142_read: i = 16 date = 0x8b
    [ 57.783130] ads7142: ads7142_read: i = 17 date = 0xf1
    [ 57.783133] ads7142: ads7142_read: i = 18 date = 0x8b
    [ 57.783137] ads7142: ads7142_read: i = 19 date = 0xf1
    [ 57.783140] ads7142: ads7142_read: i = 20 date = 0x8b
    [ 57.783143] ads7142: ads7142_read: i = 21 date = 0xe1
    [ 57.783146] ads7142: ads7142_read: i = 22 date = 0x8b
    [ 57.783150] ads7142: ads7142_read: i = 23 date = 0xf1
    [ 57.783153] ads7142: ads7142_read: i = 24 date = 0x8b
    [ 57.783157] ads7142: ads7142_read: i = 25 date = 0xe1
    [ 57.783160] ads7142: ads7142_read: i = 26 date = 0x8b
    [ 57.783164] ads7142: ads7142_read: i = 27 date = 0xe1
    [ 57.783167] ads7142: ads7142_read: i = 28 date = 0x8b
    [ 57.783171] ads7142: ads7142_read: i = 29 date = 0xd1
    [ 57.783173] ads7142: ads7142_read: i = 30 date = 0x8b
    [ 57.783177] ads7142: ads7142_read: i = 31 date = 0xf1

  • 我明天会看下您的配置

  • 是的,MSB高位在前:

    输出代码可根据数据表 7.3.4 ADC Transfer Function章节说明转换为对应电压;

    关于寄存器,reg =后面是寄存器地址,data =后面是对应的寄存器值,是吗?您先看下您是否可以将采集代码转换为输入电压,以判断是否可以正常AD转换?有问题我再细看您的寄存器配置。

  • 关于寄存器,reg =后面是寄存器地址,data =后面是对应的寄存器值,是吗?

        ----是的

    您先看下您是否可以将采集代码转换为输入电压,以判断是否可以正常AD转换?

        ----按7.3.4 ADC Transfer Function,0x8bd1(35793) 转化后是8.738(35793/4096 ),这个代表0.873V?这个值跟万用表亮出来的值有点偏差。

  • 您的应用是单端输入还是伪差分输入?AVDD电压是多少?