2 audio examples – Rainbow Electronics AT73C246 User Manual
Page 134

134
11050A–PMAAC–07-Apr-10
AT73C246
// Write Time @RTC_TIMR (RTC_ADDR = 0x08) (08h 49min 59s)
WRITE_RTC 0x00084959 @RTC_TIMR
// Start RTC @RTC_CR (RTC_ADDR = 0x00)
WRITE_RTC 0x00000000 @RTC_CR
14.2 Audio Examples
14.2.1
Basic Audio Codec Setting Using Automatic Path Control
The following example demonstrates an automatic audio path setting. Assuming that the audio
codec is supplied by the LDO4, the sequence is the following:
• Make the codec interface configuration,
• Set the Digital-IN to Headphone-OUT path,
• Put the audio codec in standby mode,
• Release the standby mode to re-activate the selected path,
• Change the path on-the-fly,
• Shutdown the codec.
// 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
// Audio Start
// ENAC = 1, STANDBY = 1. PATH = 1 (DAC playback)
// At the first start, VMID capacitor is charged.