#  register settings mt9m131
#  PHYTEC 2010, V1.2

######################################################################################################
# Sensor Core Register , adress page 0 #
########################################
0x48,0xF0,0x0000		# page map 0x00 sensor core

#  set MT9M131 MIRROR, context B
#  =============================
#  set flip row and/or column
0x48,0x20,0xFFFC,a     # without flip
#0x48,0x20,0x0001,o     # flip row
#0x48,0x20,0x0002,o     # flip column
#0x48,0x20,0x0003,o     # flip row and column


#...

######################################################################################################
# Sensor Color Pipeline Register , adress page 1 #
##################################################
0x48,0xF0,0x0001		# page map 0x01 color pipeline

#  set MT9M131 AEC on/off
#  ======================
#  set auto exposure bit 14
0x48,0x06,0x4000,o		# enable auto exposure
#0x48,0x06,0xBFFF,a		# disable auto exposure


#  set MT9M131 AWB on/off
#  ======================
#  set auto white balance bit 1
0x48,0x06,0x0002,o		# enable auto white balance
#0x48,0x06,0xFFFD,a		# disable auto white balance


#  set MT9M131 flicker detection on/off
#  ====================================
#  set flicker detection bit 7
#0x48,0x06,0x0080,o		# enable auto flicker detection
#0x48,0x06,0xFF7F,a		# disable auto flicker detection


#  set MT9M131 lens shading correction on/off
#  ====================================
#  set lens shading correction bit 10
#0x48,0x06,0x0400,o		# enable lens shading correction
#0x48,0x06,0xFBFF,a		# disable lens shading correction


#  set MT9M131 TESTPATTERN
#  =======================
#  set testpattern off
0x48,0x48,0x0000     # testpattern off (default)

#  set testpattern
#0x48,0x48,0x0001     # generates horizontal grayscale ramp
#0x48,0x48,0x0002     # generates grayvalue 1
#0x48,0x48,0x0003     # generates grayvalue 2
#0x48,0x48,0x0005     # generates grayvalue 3
#0x48,0x48,0x0006     # generates grayvalue 4
#0x48,0x48,0x0007     # generates color bars
# if set bit7 [xxx xxxx 1xxx xxxx] in 0x48 Forces WB digital gains to 1.0. 

#  set MT9M131 TESTRAMP
#  ====================
#  set test ramp off
0x48,0x9B,0xFFCF,a     # disable testramp (default)

#  set test ramp
#0x48,0x9B,0x0010,o     # testramp by column
#0x48,0x9B,0x0020,o     # testramp by row
#0x48,0x9B,0x0030,o     # testramp by frame


#...

######################################################################################################
# Sensor Camera Control Register , adress page 2 #
##################################################
0x48,0xF0,0x0002		# page map 0x02 camera control


# set MT9M131 AUTO EXPOSURE GAIN ZONE LIMITS
# ==========================================
# set min [0..24] and max [0..24] (zone context define at register 0x82-0x95, page map 0x02)
#0x48,0x37,0x0300     # set max = Zone 24 (Bit[9..5]), min = Zone 0 (Bit[4..0]), default
0x48,0x37,0x0100     # set max = Zone 2,  min = Zone 0, possible for high fps in skip modes 



# ...


######################################################################################################
# Set Default adress page 0 #
#############################
0x48,0xF0,0x0000		# page map 0x00 sensor core