I am trying to initialize the codec to only output for now. Trying to use the line out's, but the line out drivers never power up.
My code initializes the codec as outlined in section 2.4.6 of the reference manual. P0R37 shows the flags for both DAC's are powered up after initialization, but the line output drivers are not (therefore I get no output from the codec). I have been struggling for a while on this, can someone help me out.
Initialization code:
AIC_writeRegister(AIC3106_REG_PAGESELECT, 0);
AIC_writeRegister(AIC3106_REG_RESET, 1);
/* Configure AIC3204 */
//###############################################
//# Clock and Interface Settings
AIC_writeRegister(AIC3106_REG_PAGESELECT, 0);
AIC_writeRegister(11,0b10000001);//Power up the NDAC divider with value 1
AIC_writeRegister(12,0b10000100);//Power up the MDAC divider with value 4
AIC_writeRegister(18,0b10000001);//Power up the NADC divider with value 1
AIC_writeRegister(19,0b10000100);//Power up the MADC divider with value 4
AIC_writeRegister(14,32);// Program the DOSR to 32 for 192ksps
AIC_writeRegister(20,32);// Program the AOSR to 32 for 192ksps
AIC_writeRegister(27,1);//I2s and 16 bit | CHANGE TO DSP AND 32 BIT EVENTUALY (DOUT is high impedance while not used)
AIC_writeRegister(28, 0x00);// Data offset = 0
AIC_writeRegister(60,17);//Set the DAC processing block to PRB_P17
AIC_writeRegister(61,13);//Set the ADC processing block to PRB_P13
//###############################################
//###############################################
//# Program Analog Blocks
AIC_writeRegister(AIC3106_REG_PAGESELECT, 1);//Select Page 1
AIC_writeRegister(1, 8);// Disable crude AVDD generation from DVDD
AIC_writeRegister(2, 1);// Enable Analog Blocks, use LDO power
AIC_writeRegister(10, 0b00111011);//Program Common Mode voltage default is 0.9v
AIC_writeRegister(123, 1);//Reference charges up in 40ms after analog blocks
AIC_writeRegister(14,0b00001000);//rout lol
AIC_writeRegister(15,0b00001000);//rout lor
AIC_writeRegister(18,0);//lol unmute ,0b00011011 for 27 db
AIC_writeRegister(19,0);//lor unmute
AIC_writeRegister(9,0x00001100);//Power up loL and loR drivers
//###############################################
//###############################################
//# Power Up DAC
AIC_writeRegister(AIC3106_REG_PAGESELECT, 0);//Select Page 0
AIC_writeRegister( 64, 2 ); // Left vol=right vol &unmute
AIC_writeRegister(63,0b11010100);//Power up LDAC/RDAC (soft-step one per DAC word)
AIC_writeRegister(64,0);//Unmute LDAC/RDAC
//###############################################
Michael