【问题标题】:spidev on Raspberry Pi not giving any output with DAC7562EVMRaspberry Pi 上的 spidev 没有使用 DAC7562EVM 提供任何输出
【发布时间】:2018-09-21 15:32:48
【问题描述】:

我正在尝试使用 Raspberry Pi 控制 DAC7562EVM。我已连接:

信号 - PI - TI - 信号

MOSI - P1-19 - J2-11 SDI

SCLK - P1-23 - J2-3 SCLK

CEO - P1-24 - J2-1 /SYNCO

GND - P1-25 - J2-4 DGND

此外,JP1 引脚用于将 /LDAC 接地。

到目前为止,我已经在 SDI、SCLK 和 /SYNC0 引脚上使用了示波器,并且可以验证同步引脚不会中断数据传输。此外,我可以看到 DAC 接收到的 8 位序列。

我一直使用的代码如下:

import spidev
spi = spidev.SpiDev()
spi.open(0,0)
spi.mode = 2
spi.max_speed_hz = 1000000
spi.bits_per_word = 8

spi.xfer2([0x20,0x0,0x3]) # Powers on all DACs
spi.xfer2([0x38,0x0,0x0]) # External reference
spi.xfer2([0x30,0x0,0x4]) # /LDAC is low
spi.xfer2([0x17,0x66,0x60]) # Output of 2 V to DAC-A and updates all registers (Vref is 5 V)

spi.close()

我不明白如何判断消息正在发送,但我没有从 DAC 获得任何可辨别的输出。我错过了什么?

DAC7562 数据表:http://www.ti.com/lit/ds/slas719e/slas719e.pdf

DAC7562EVM 手册:http://www.ti.com/lit/ug/sbau183a/sbau183a.pdf

我发现这个答案对 SPI 模式很有帮助,但无法实现其他指令:SPIDEV on raspberry pi for TI DAC8568 not behaving as expected

【问题讨论】:

    标签: python raspberry-pi spi texas-instruments digital-analog-converter


    【解决方案1】:

    我在 TI 评估板上将 SYNC0 引脚从 J2​​-1 更改为 J2-9。

    【讨论】:

      猜你喜欢
      • 2018-04-03
      • 2020-10-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-06
      • 1970-01-01
      • 2020-12-11
      • 1970-01-01
      相关资源
      最近更新 更多