Rainbow Electronics AT73C246 User Manual
Page 136

136
11050A–PMAAC–07-Apr-10
AT73C246
// Start LDO4 @3.3V
TWI_WRITE 0x8C @ VDD4_CTRL
// Digital Audio Interface configuration
// Master clock = 12.288MHz, Master / Slave = slave.
// DAI mode = I2S mode, Word length = 24 bits, FS = 48kHz
TWI_WRITE 0x01 @ DAI_CONTROL
TWI_WRITE 0x63 @ FRAME_CONTROL
// Analog interface configuration
// Mic. config: L & R single ended, Micbias = OFF, Mic. detection = OFF.
// Headphone config: AC coupled,
// Automatic Soft Ramping = ON, ASR timing = 11 (~10ms / step)
TWI_WRITE 0x00 @ MIC_CONTROL
TWI_WRITE 0x27 @ AUDIO_CONTROL
// Analog gain
// Headphone (L & R) gain: -20dB. (LHPBOTH set by default in HP_CONTROL)
// Mic L & R gain: +26 dB.
// Unmute all gains. No power-up is performed.
TWI_WRITE 0xEC @ HPLVOL
TWI_WRITE 0x1A @ MICLVOL
TWI_WRITE 0x1A @ MICRVOL
TWI_WRITE 0x00 @ MUTE
// Enter the custom path configuration mode
TWI_WRITE 0x2F @ AUDIO_CONTROL
// Audio Start
// ENAC = 1, STANDBY = 1. PATH = 0 (Not read by the audio controller)
// At the first start, VMID capacitor is charged.
// Wait (3.tau) = 300ms with 1uF before standby release. (VMID will be
// discharged only when ENAC = 0.)
// From this point Audio Data can be sent over the Digital audio interface.
TWI_WRITE 0x60 @ AUTOSTART.
WAIT 300ms
// Audio path definition: DAC input to Headphone output. The software sets
// the bits: ONDACL, ONDACR, ONHPL, ONHPR and PLAYBACK by writing
// the registers INPUT_CONTROL, OUTPUT_CONTROL, and INPUT_MIXER.
// The changes are not taken immediately into account (ENCONF = 0).
TWI_WRITE 0x40 @ INPUT_CTRL
TWI_WRITE 0x2F @ OUTPUT_CTRL
TWI_WRITE 0x00 @ INPUT_MIXER
// ENCONF pulse: the audio controller takes the requested changes into