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.

[参考译文] ADC128D818SW-Linux:无法获取 ADC 读数。

Guru**** 2513185 points
Other Parts Discussed in Thread: ADC128D818

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/data-converters-group/data-converters/f/data-converters-forum/980981/adc128d818sw-linux-unable-to-get-adc-reading

器件型号:ADC128D818SW-Linux
主题中讨论的其他器件:ADC128D818

您好、社区

我 正在使用 Raspberry Pi 开发板处理 ADC128D818。

我想在没有中断功能的轮询模式下读取 ADC 通道读数。

我指的是以下文档。  

https://www.ti.com/lit/ds/symlink/adc128d818.pdf?ts=1614142931923&ref_url=https%253A%252F%252Fwww.google.com%252F

我将使用部分中提到的应用示例  9.2.2.2.1

以下是我的 ADC 配置设置。

读取配置寄存器并初始化 ADC
[2021-02-24T10:39:53.878+05:30][debug]- platform_read:read_buffer:1D:00:09
[2021-02-24T10:39:53.878+05:30][debug]- platform_write:read_buffer:00:00:01:t02+30[2021:2410_b][2021:04_b_b_042:04:30_b_0780]C




:0480+2021:04:30_b_0780+2021:04:04:04_0780]C:0480+2021:04_0780_0780_0780+2021:04_0780_0780_0780_0780]C:04_0780_0780_0780+2021:2021:04_0780_0780_0780_0780_0780_0780_0780_0780

WRITE_BUFFER:1D:0B:00

将转换速率设置为连续模式。
[2021-02-24T10:39:54.379+05:30][debug]- platform_write:write_buffer:1D:07:01

启用 IN0 IN1和 IN2通道并禁用所有剩余通道
[2021-02-24T10:39:54.379+05:30][debug]- platform_write:Write_buffer:1d_30[2021-02_t30:24T10:t02_enchain]


1D:03:00

设置0x00 IN0 IN1和 IN2通道的上限和下限
[2021-02-24T10:39:54.379+05:30][debug]- platform_write:1D:2A:00
[2021-02-24T10:39:54.379+05:30][debug]-platform:2402+202+202+202+3:3_t43:tbebug_t43:2402_t02_t43:2402_t43:2402_t43:10:2402_t02_t02_tb出于[1:00:2402_tbbuffer :2402_ber+10:2402_ber:24:24:24:24:2402_t43:10:2402_t43:2402_ber:10:2402_t43:2402_t43:2402_t43:2402_t43:24:t:2402_ber:2402_t43:t:2402_t43:t:2402_beber:t



1D:2F:00

开始转换
[2021-02-24T10:39:54.38+05:30][DEBUG]- platform_read:read_buffer:1D:00:08
[2021-02-24T10:39:54.38+05:30][DEBUG]- platform_write:write_buffer:00:09

在输入的所有1d 通道上应用了1.5V 电压。

读取配置寄存
器[2021-02-24T10:39:59.381+05:30][debug]- platform_read:1D:00:09

读取 INT 状态
[2021-02-24T10:39:59.381+05:30][debug]- platform_read:read_buffer:1D:01:00:00

:00:2402_24T10:24381+2021_debuger [2021:2021:02_t22:00_07:2021:2021:2021:2021:2021:2021:2021:04:20_07_07_07_07:20_07_07:240001:00:24000_07:24000_07:20:2021:24000_07:20_07:2021:2021:20_07:20_07:20_07:20_07:20_07:20_07:20_07:20_07:2021:2021:20_07:20_07_07_07:20_07:20_07:20_07:20_07:2021





我正在获取0x00读数。

您能不能帮助我知道、我在这方面有什么问题吗?

如何获得正确的读数?

此致、

Shiv Patil。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Shiv、

    很难调试代码、我建议使用连接到数字总线的示波器。 这将提供固件按预期运行的目视检查和确认。  

    我猜您在通信时会收到预期的从 ADC 到主机的 ACK、您是否验证过?  

    您将上限和下限设置为0、这意味着输入端的任何值都可能触发 INT 引脚。 您能否测试这一点、并查看当使用 INT 引脚时、是否会在存在输入电压时触发该引脚。  

    此致

    Cynthia