主题中讨论的其他器件:TLV320AIC3104、
您好!
有一个文档《 TLV320AIC3104编程更加轻松 》、我将其用作参考。 它在本文档末尾列出了一个启动脚本。 我尝试参考这些内容以便让3105启动并运行。
我将从一个简单的示例开始... 我想、让我"为左右 DAC 加电"、即页0x00寄存器0x25 (37)。 我正在进行硬件复位(将 RESET 下拉至低电平、然后变为高电平)。 然后我将执行软件复位(写入复位寄存器)。
// hardware reset pinMode(RESET_PIN,OUTPUT); digitalWrite(RESET_PIN,HIGH);delay(50); //not reset digitalWrite(RESET_PIN,LOW);delay(100); //reset Serial.println("-----this should fail-----"); writeRegister(wires, dev, Page_00, 0x01, 0b10000000); Serial.println("-----now turning it back on-----"); digitalWrite(RESET_PIN,HIGH);delay(50);//not reset Serial.println("-----Hardware reset complete-----"); // reset to defaults writeRegister(wires, dev, Page_00, 0x01, 0b10000000); // Reset Module | 0b00010001 | 0x11 writeRegister(wires, dev, Page_00, 0x01, 0b00000000); // Reset Module | 0b00010001 | 0x11 if (debugToSerialTLV320AIC3105) Serial.println("-- Software Reset Complete ---"); // wait for device to initialize delay(50); //TEST SIMPLE DAC ENABLE/DISABLE. writeRegister(wires, dev, Page_00, 37, 0b1110000);delay(50); // writeRegister(wires, dev, Page_00, 38, 0b00010100);delay(50); // writeRegister(wires, dev, Page_00, 40, 0b11010101);delay(50); // dumpAllRegisters(wires, dev);
但是、当我运行代码时、结果不会"粘住"、这是不是为了让 I2C 设置在写入时粘住、我首先必须做些什么?
---Starting ---- Debugging to serial AudioControlTLV320AIC3105::enableTLV320AIC3105 -----this should fail----- controlTLV320AIC3105: Received Error During goToPage(): Error = 2 failed to transmit address controlTLV320AIC3105: INFO: Read Page. Page: 0 Reg: 1. Failed to go to read page. Could not go there. Write: Wire:0 TLV320AIC3105:24 P0_R1 P0x00_R0x1 0x80 128 0b10000000 controlTLV320AIC3105: Received Error During goToPage(): Error = 2 failed to transmit address controlTLV320AIC3105: Received Error During writePage(): Error = 2 -----now turning it back on----- -----Hardware reset complete----- Read: Wire:0 TLV320AIC3105:24 P0_R1 P0x00_R0x1 0x0 0 0b0 Write: Wire:0 TLV320AIC3105:24 P0_R1 P0x00_R0x1 0x80 128 0b10000000 Read: Wire:0 TLV320AIC3105:24 P0_R1 P0x00_R0x1 0x0 0 0b0 Read: Wire:0 TLV320AIC3105:24 P0_R1 P0x00_R0x1 0x0 0 0b0 Write: Wire:0 TLV320AIC3105:24 P0_R1 P0x00_R0x1 0x0 0 0b0 Read: Wire:0 TLV320AIC3105:24 P0_R1 P0x00_R0x1 0x0 0 0b0 -- Software Reset Complete --- Read: Wire:0 TLV320AIC3105:24 P0_R37 P0x00_R0x25 0x0 0 0b0 Write: Wire:0 TLV320AIC3105:24 P0_R37 P0x00_R0x25 0x70 112 0b1110000 Read: Wire:0 TLV320AIC3105:24 P0_R37 P0x00_R0x25 0x0 0 0b0 Read: Wire:0 TLV320AIC3105:24 P0_R38 P0x00_R0x26 0x0 0 0b0 Write: Wire:0 TLV320AIC3105:24 P0_R38 P0x00_R0x26 0x14 20 0b10100 Read: Wire:0 TLV320AIC3105:24 P0_R38 P0x00_R0x26 0x0 0 0b0 Read: Wire:0 TLV320AIC3105:24 P0_R40 P0x00_R0x28 0x0 0 0b0 Write: Wire:0 TLV320AIC3105:24 P0_R40 P0x00_R0x28 0xD5 213 0b11010101 Read: Wire:0 TLV320AIC3105:24 P0_R40 P0x00_R0x28 0x0 0 0b0
初始化编解码器的基本步骤是什么? 很抱歉这里的基本问题,我已经与这个做了几天,我正在寻找一些帮助,希望得到这个移动. 谢谢!