Hello everybody!
We have problems with the beep generator example of aic3204. Thats the example I found in another thread (last post of thread from J Arbona).
I had to adapt the code so it fits our requirements. You can find our initialization array below.
We are using the spi interface. Writing to and reading registers back works, so spi interface might not be the problem.
Some additional information:
- Ref pin after initialization = 0,9V
- 16MHz osc
Unfortunately I can not hear any signal.
Maybe you can find any fault in the initialization array.
Best Regards,
Oliver
unsigned int beep_array[52] = {
// RESET
0x0000, // Select register page 0
0x0101, // soft reset
// CLOCK SETTINGS
0x0000, // Select register page 0
0x0403, // MCLK -> PLL
0x0591,
0x0605,
0x070E,
0x08B0,
0x0B82,
0x0C87,
0x0D00,
0x0E80,
0x1282,
0x1387,
0x1480,
// DIGITAL INTERFACE
0x1B0C, // I2S, 16-bit, BCLK and WCLK are outputs
0x1D00, // Stereo ADC output is routed to Stereo DAC input
// Configure Processing Blocks
//Select Page 0
0x0000,
//PRB_P25 selected
0x3C19,
//Select Page 44, Enable Adaptive filtering for DAC
0x002c,
0x0104,
//Configure Power Supplies
//Select Page 1
0x0001,
//AVDD supply
0x0108,
//Enable Master Analog Power Control
0x0201,
//Set the input power-up time to 3.1ms (for ADC)
0x4732,
//Set the REF charging time to 40ms
0x7b01,
//Playback Setup
//Select Page 1
0x0001,
//De-pop
0x1425,
//Route LDAC/RDAC to HPL/HPR
0x0c08,
0x0d08,
//Route LDAC/RDAC to LOL/LOR
0x0e08,
0x0f08,
//Power up HPL/HPR and LOL/LOR drivers
0x093C,
//Unmute HPL/HPR driver, 0dB Gain
0x1000,
0x1100,
//Unmute LOL/LOR driver, 0dB Gain
0x1200,
0x1300,
//Select Page 0
0x0000,
//DAC => 0dB
0x4100,
0x4200,
//Power up LDAC/RDAC
0x3fd6,
//Unmute LDAC/RDAC
0x4000,
//BEEP GENERATOR SETTINGS
//Select Page 0
0x0000,
//Time
0x4900,
0x50FF,
0x51FF,
//1kHz
0x4C12,
0x4D2D,
0x4E7E,
0x4FB4,
//Gain = -40dB, Enabled
0x4780,
0x4828
};