Other Parts Discussed in Thread: TLV320AIC3104,
Hello,
There is a document called TLV320AIC3104 Programming Made Easy SLAA403 which I'm using as a reference. It has a startup script listed at the end of the document. I'm trying to refer to that to get the 3105 up and running.
I'm starting with a simple example... I figured, let me "Power up Left and Right DAC’s" which is page 0x00 register 0x25 (37). I'm doing a hardware reset (pull reset low for, then go high). And then I'm doing a software reset (write to the reset register).
// 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);
But when I run the code the result doesn't "stick" is there something that I must do first in order to make the I2C settings stick when writing to them?
---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
What are the basic steps to initializing the codec? Sorry for the basic question here, I've been toying with this for a few days and I'm looking for some help to hopefully get this moving. Thank you!




