大家好、我在启动 DAC 时遇到了一些问题、我已经按照寄存器树进行了操作:
但我n´t 什么。 交易代码中是否有任何错误?
spiWrite(0x02,0b0000000000010000); delay(1); spiWrite(0x06, 0x0000); delay(1); spiWrite(0x07, 0b0000001000011111); delay(1); spiWrite(0x03, 0b0000000000000000); delay(1); spiWrite(0x04, 0b0001000000000000); delay(1); spiWrite(0x05, 0b1111111111111111); delay(1000); } void spiWrite(int address, int value) { // take the SS pin low to select the chip: digitalWrite(8, LOW); delay(100); // send in the address and value via SPI: SPI.transfer(address); //SPI.transfer(value); SPI.transfer16(value); delay(100); // take the SS pin high to de-select the chip: digitalWrite(8, HIGH); delay(100); SPI.endTransaction(); }
输出始终为0V 、降压/升压转换 器分别具有-2.5V 和3.3V 电压、通过 SPI 至 Arduino Uno 板为 EVM 板提供16VDC 电源。
谢谢。