###############################################
#
# Digital Microphone Script
# 8ksps
#
###############################################



###############################################
# Software Reset
###############################################
#
# Select Page 0
w 30 00 00
#
# Initialize the device through software reset
w 30 01 01
#
###############################################



###############################################
# Clock and Interface Settings
# ---------------------------------------------
# The codec receives: MCLK = 4.096 MHz,
# BLCK = 512 kHz, WCLK = 8 kHz
###############################################
#
# Select Page 0
w 30 00 00
#
# NADC = 2, MADC = 2, dividers powered on
w 30 12 82 82
#
# AOSR = 128
w 30 14 80
#
###############################################



###############################################
# Configure Power Supplies
###############################################
#
# Select Page 1
w 30 00 01
#
# Disable weak AVDD in presence of external
# AVDD supply
w 30 01 08
#
# Enable Master Analog Power Control
w 30 02 00
#
# Select ADC PTM_R1
w 30 3d ff
#
# Set the input power-up time to 3.1ms (for ADC)
w 30 47 32
#
# Set the REF charging time to 40ms
w 30 7b 01
#
###############################################



###############################################
# Configure ADC Channel
###############################################
#
# Select Page 0
w 30 00 00
#
# Configure MISO as clock output for DIGMIC
w 30 37 0E
#
# LADC and RADC enabled for DIGMIC
# Route SCLK as DIGMIC_DATA
# Power up LADC/RADC
w 30 51 DC
#
# Unmute LADC/RADC
w 30 52 00
#
###############################################
