Post Go back to editing

ADV7181C and ADV7343 - Configuration

Hi,

We are using ADV7181C and ADV7343 in our design. We want to configure these device for our application. We don't have any Evaluation Board for these decoder and encoder.
Is there any PC software tool for configuring the ADV7181C and ADV7343 Registers without Eval boards? If tools there, please let me know how can I get it for both?

Regards,
Santhosh

Top Replies

  • These devices are configured over an I2C connection.  You will need a USB to I2C adapter such as the Total Phase Aardvark adapter.  All this depends on how your hardware is implemented.

  • Is there any software register configuration utility tool available, so that I can get the register values for required application and later will configure through I2C.
    Required for both ADV7181C and ADV7343.
    Regards,
    Santhosh
  • At this location: https://ez.analog.com/video/w/documents/801/adv739x-design-support-files

    you will find ADV739x_AVES_Files.zip

    which contains 4721.ADV739x_Evaluation_Software.zip

    which in turn contains ADV7403_XC3S400_ADV7393-VER.1.2c.txt.

    that contains multiple format configurations.  Only writes to address 0x54 are needed to program the ADV7393.  I believe all the formats are defined in the data sheet also.

    Here are the support files for the ADV7181C: https://ez.analog.com/video/w/documents/812/adv7181c-design-support-files

    And the script files in this attachment:

    ***************************************
    For Rev B Boards
    ***************************************
    
    
    ##SETTINGS##
    :version 3.2 May 4th 2010:
    End
    
    ##SD CVBS##
    :AUTODETECT CVBS IN NTSC/PAL/SECAM, 8-Bit 422 encoder:
    42 00 00 ; CVBS IN
    42 03 0C ; 8 Bit Mode
    42 04 77 ; Enable SFL
    42 17 41 ; select SH1
    42 1D 47 ; Enable 28MHz Crystal
    42 31 02 ; Clears NEWAV_MODE, SAV/EAV  to suit ADV video encoders
    42 3A 17 ; Set Latch Clock & power down ADC 1 & ADC2 & ADC3
    42 3B 81 ; Enable internal Bias
    42 3D A2 ; MWE Enable Manual Window, Colour Kill Threshold to 2
    42 3E 6A ; BLM optimisation
    42 3F A0 ; BGB
    42 86 0B ; Enable stdi_line_count_mode
    42 F3 01 ; Enable Anti Alias Filter on ADC0
    42 F9 03 ; Set max v lock range
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 7F FF ; ADI Recommended Setting
    42 81 30 ; ADI Recommended Setting
    42 90 C9 ; ADI Recommended Setting
    42 91 40 ; ADI Recommended Setting
    42 92 3C ; ADI Recommended Setting
    42 93 CA ; ADI Recommended Setting
    42 94 D5 ; ADI Recommended Setting
    42 B1 FF ; ADI Recommended Setting
    42 B6 08 ; ADI Recommended Setting
    42 C0 9A ; ADI Recommended Setting
    42 CF 50 ; ADI Recommended Setting
    42 D0 4E ; ADI Recommended Setting
    42 D1 B9 ; ADI Recommended Setting 
    42 D6 DD ; ADI Recommended Setting
    42 D7 E2 ; ADI Recommended Setting
    42 E5 51 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    56 17 02 ; Software Reset
    56 00 FC ; Power up all DAcs and PLL
    56 01 80 ; SD only mode, Data input on Y-bus
    56 80 10 ; SSAF Luma filter enabled, NTSC mode
    56 82 c9 ; Step control on, pixel data valid, pedestal on, PrPb SSAF on,CVBS/YC out.
    56 84 06 ; RTCO/SFL Enable
    56 88 00 ; 8 bit input enabled
    56 87 20 ; Encoder PAL/NTSC auto-detect enabled
    End
    
    ##SDP Y/C##
    :AUTODETECT Y/C IN NTSC/PAL/SECAM, 8 Bit 422 Encoder:
    42 03 0C ; 8 Bit Mode
    42 04 57 ; Enable SFL
    42 1D 47 ; Enable 28MHz Crystal
    42 31 02 ; Clears NEWAV_MODE, SAV/EAV  to suit ADV video encoders
    42 3A 13 ; Set Latch Clock & turn off ADC2 & ADC3
    42 3B 81 ; Enable Internal Bias
    42 3D A2 ; MWE Enable Manual Window, Colour Kill Threshold to 2
    42 3E 6A ; BLM optimisation
    42 3F A0 ; BGB
    42 86 0B ; Enable stdi_line_count_mode
    42 69 03 ; Sets SDM_SEL to 03 for YC/CVBS Auto
    42 F3 03 ; Enable Anti Alias Filters on ADC0 & ADC1
    42 F9 03 ; Set max v lock range
    42 C4 80 ; Enable maual input muxing
    42 C3 C2 ; Enable manual input muxing
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 7F FF ; ADI Recommended Setting
    42 81 30 ; ADI Recommended Setting
    42 90 C9 ; ADI Recommended Setting
    42 91 40 ; ADI Recommended Setting
    42 92 3C ; ADI Recommended Setting
    42 93 CA ; ADI Recommended Setting
    42 94 D5 ; ADI Recommended Setting
    42 B1 FF ; ADI Recommended Setting
    42 B6 08 ; ADI Recommended Setting
    42 C0 9A ; ADI Recommended Setting
    42 CF 50 ; ADI Recommended Setting
    42 D0 4E ; ADI Recommended Setting
    42 D1 B9 ; ADI Recommended Setting 
    42 D6 DD ; ADI Recommended Setting
    42 D7 E2 ; ADI Recommended Setting
    42 E5 51 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    56 17 02 ; Software Reset
    56 00 FC ; Power up all DAcs and PLL
    56 01 80 ; SD only mode, Data input on Y-bus
    56 80 10 ; SSAF Luma filter enabled, NTSC mode
    56 82 c9 ; Step control on, pixel data valid, pedestal on, PrPb SSAF on,CVBS/YC out.
    56 84 06 ; RTCO/SFL Enable
    56 88 00 ; 8 bit input enabled
    56 87 20 ; Encoder PAL/NTSC auto-detect enabled
    End
    
    
    ##SDP YPrPb##
    :AUTODETECT YPbPr In, 8 Bit 422 Encoder:
    42 8D 83 ; Fix for Connect/Disconnect Problem
    42 00 09 ; YPrPb
    42 03 0C ; 8 Bit Mode
    42 1D 47 ; Enable 28MHz Crystal
    42 27 18 ; YC Delay Correction
    42 31 02 ; Clears NEWAV_MODE, SAV/EAV  to suit ADV video encoders
    42 3A 11 ; set latch clock settings to 001b, Power Down ADC3
    42 3B 81 ; Enable internal Bias
    42 3D A2 ; MWE Enable Manual Window
    42 3E 6A ; BLM optimisation
    42 3F A0 ; ADI Recommended
    42 86 0B ; Enable stdi_line_count_mode
    42 B4 F9 ; Fix for Connect/Disconnect Problem
    42 B5 00 ; Fix for Connect/Disconnect Problem
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 F3 07 ; Enable Anti Alias Filters on ADC 0,1,2
    42 F9 03 ; Set max v lock range
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 7F FF ; ADI Recommended Setting
    42 81 30 ; ADI Recommended Setting
    42 90 C9 ; ADI Recommended Setting
    42 91 40 ; ADI Recommended Setting
    42 92 3C ; ADI Recommended Setting
    42 93 CA ; ADI Recommended Setting
    42 94 D5 ; ADI Recommended Setting
    42 7E 73 ; ADI Recommended Setting
    42 B1 FF ; ADI Recommended Setting
    42 B6 08 ; ADI Recommended Setting
    42 C0 9A ; ADI Recommended Setting
    42 CF 50 ; ADI Recommended Setting
    42 D0 4E ; ADI Recommended Setting
    42 D1 B9 ; ADI Recommended Setting
    42 D6 DD ; ADI Recommended Setting
    42 E5 51 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    56 17 02 ; Software Reset
    56 00 FC ; Power up all DAcs and PLL
    56 01 80 ; SD only mode, Data input on Y-bus
    56 80 10 ; SSAF Luma filter enabled, NTSC mode
    56 82 c9 ; Step control on, pixel data valid, pedestal on, PrPb SSAF on,CVBS/YC out.
    56 84 06 ; RTCO/SFL Enable
    56 88 00 ; 8 bit input enabled
    56 87 20 ; Encoder PAL/NTSC auto-detect enabled
    End
    
    
    ##SCART RGB##
    :SCART RGB CP YPrPb 2X1 8 Bit 422 Encoder PAL:
    42 03 0C ; 8 Bit Mode
    42 04 57 ; Enable SFL
    42 06 00 ; 27MHz sample rate
    42 1D 47 ; Enable 28MHz Crystal
    42 31 02 ; Clears NEWAV_MODE, SAV/EAV  to suit ADV video encoders
    42 3A 10 ; Set Latch Clock & Power UP ADC 1 & ADC2 & ADC3& ADC4
    42 3B 61 ; Enable Internal Bias
    42 3D A2 ; MWE Enable Manual Window, Colour Kill Threshold to 2
    42 3E 6A ; BLM optimisation
    42 3F A0 ; BGB
    42 4D EE ; Disable CTI
    42 67 01 ; Format 422
    42 73 D0 ; Manual Gain Channels A,B,C 
    42 74 04 ; Manual Gain Channels A,B,C 
    42 75 01 ; Manual Gain Channels A,B,C 
    42 76 00 ; Manual Gain Channels A,B,C 
    42 77 04 ; Manual Offsets A to 64d & B,C to 512
    42 78 08 ; Manual Offsets A to 64d & B,C to 512
    42 79 02 ; Manual Offsets A to 64d & B,C to 512
    42 7A 00 ; Manual Offsets A to 64d & B,C to 512
    42 86 0B ; Enable stdi_line_count_mode
    42 93 78 ; Clamp optimisation
    42 94 23 ; Clamp optimisation
    42 95 11 ; Clamp optimisation
    42 96 C0 ; Clamp optimisation
    42 C5 00 ; Clamp Mode 0 for FB hc based
    42 ED C4 ; Enable Static Switching Mode and Select RGB Input
    42 F3 0F ; Enable Anti Alias Filter on all ADCs
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 7F FF ; ADI Recommended Setting
    42 81 30 ; ADI Recommended Setting
    42 90 C9 ; ADI Recommended Setting
    42 91 40 ; ADI Recommended Setting
    42 92 3C ; ADI Recommended Setting
    42 93 CA ; ADI Recommended Setting
    42 94 D5 ; ADI Recommended Setting
    42 B6 08 ; ADI Recommended Setting
    42 C0 9A ; ADI Recommended Setting
    42 CF 50 ; ADI Recommended Setting
    42 D0 4E ; ADI Recommended Setting
    42 D1 B9 ; ADI Recommended Setting
    42 D6 DD ; ADI Recommended Setting
    42 D7 E2 ; ADI Recommended Setting
    42 E5 51 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    42 C4 F5 ; Manual Muxing
    42 C3 62 ; Manual Muxing
    42 F3 4F ; Manual Muxing
    56 17 02 ; Software Reset
    56 00 FC ; Power up all DAcs and PLL
    56 01 80 ; SD only mode, Data input on Y-bus
    56 80 10 ; SSAF Luma filter enabled, NTSC mode
    56 82 c9 ; Step control on, pixel data valid, pedestal on, PrPb SSAF on,CVBS/YC out.
    56 84 06 ; RTCO/SFL Enable
    56 88 00 ; 10 bit input enabled
    56 87 20 ; Encoder PAL/NTSC auto-detect enabled
    56 8B 40 ; HS to Pixel shift required
    End
    
    ##FAST BLANK##
    :PAL 10 Bit 422 Encoder:
    42 03 00 ; 10 Bit Mode
    42 17 41 ; select SH1
    42 06 00 ; 27MHz sample rate
    42 1D 47 ; Enable 28MHz Crystal
    42 31 02 ; Clears NEWAV_MODE, SAV/EAV  to suit ADV video encoders
    42 3A 10 ; Set Latch Clock & Power UP ADC 1 & ADC2 & ADC3& ADC4
    42 3B 61 ; Enable Internal Bias
    42 3D A2 ; MWE Enable Manual Window, Colour Kill Threshold to 2
    42 3E 6A ; BLM optimisation
    42 3F A0 ; BGB
    42 67 01 ; Format 422
    42 73 D0 ; Manual Gain Channels A,B,C 
    42 74 04 ; Manual Gain Channels A,B,C 
    42 75 01 ; Manual Gain Channels A,B,C 
    42 76 00 ; Manual Gain Channels A,B,C 
    42 77 04 ; Manual Offsets A to 64d & B,C to 512
    42 78 08 ; Manual Offsets A to 64d & B,C to 512
    42 79 02 ; Manual Offsets A to 64d & B,C to 512
    42 7A 00 ; Manual Offsets A to 64d & B,C to 512
    42 86 0B ; Enable stdi_line_count_mode
    42 C5 00 ; Clamp Mode 0 for FB hc based
    42 ED 12 ; FB_CAP_RES,Enable Dynamic Fast Blank Mode
    42 F3 0F ; Enable Anti Alias Filter on all ADCs
    42 0E 80 ; ADI Recommended Setting
    42 49 01 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 7F FF ; ADI Recommended Setting
    42 81 30 ; ADI Recommended Setting
    42 90 C9 ; ADI Recommended Setting
    42 91 40 ; ADI Recommended Setting
    42 92 3C ; ADI Recommended Setting
    42 93 CA ; ADI Recommended Setting
    42 94 D5 ; ADI Recommended Setting
    42 B6 08 ; ADI Recommended Setting
    42 C0 9A ; ADI Recommended Setting
    42 CF 50 ; ADI Recommended Setting
    42 D0 4E ; ADI Recommended Setting
    42 D1 B9 ; ADI Recommended Setting
    42 D6 DD ; ADI Recommended Setting
    42 D7 E2 ; ADI Recommended Setting
    42 E5 51 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    42 C4 F5 ; Manual Muxing
    42 C3 62 ; Manual Muxing
    42 F3 4F ; Manual Muxing
    56 17 02 ; Software Reset
    56 00 FC ; Power up all DAcs and PLL
    56 01 80 ; SD only mode, Data input on Y-bus
    56 80 10 ; SSAF Luma filter enabled, NTSC mode
    56 82 c9 ; Step control on, pixel data valid, pedestal on, PrPb SSAF on,CVBS/YC out.
    56 84 06 ; RTCO/SFL Enable
    56 88 00 ; 10 bit input enabled
    56 87 20 ; Encoder PAL/NTSC auto-detect enabled
    56 8B 40 ; HS to Pixel shift required
    74 FC FC ; Power down DAC and HDMI (Bus expander address may vary)
    End
    
    
    ##CP YPrPb 525i & 625i##
    :525I YPrPb In 10Bit 422 Encoder:
    42 05 00 ; Prim_Mode =000b for SD-M
    42 06 0A ; VID_STD=1010b for SD 4x1 525i
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 11 ; Set Latch Clock 01b, Power Down ADC3
    42 3B 81 ; Enable internal Bias
    42 3C 52 ; PLL_QPUMP to 010b
    42 6B C1 ; Select 422 10 bit YPrPb out from CP
    42 7B 06 ; clears the bits CP_DUP_AV and AV_Blank_EN 
    42 85 19 ; Turn off SSPD and force SOY. For Eval Board.
    42 86 1B ; Enable stdi_line_count_mode
    42 8F 77 ; FR_LL to 1820 & Enable 28.63MHz LLC
    42 90 1C ; FR_LL to 1820
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 F0 ; default color
    42 C2 80 ; Default color
    42 C5 01 ; CP_CLAMP_AVG_FACTOR[1-0] = 00b
    42 C9 0C ; Enable DDR Mode
    42 F3 07 ; Enable Anti Alias Filters on ADC 0,1,2
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    56 17 02 ; Software Reset 
    56 00 FC ; Power up all DAcs and PLL
    56 01 80 ; SD only mode, Data input on Y-bus
    56 80 10 ; SSAF Luma filter enabled, NTSC mode
    56 82 C9 ; Step control on, pixel data valid, pedestal on, PrPb SSAF on,CVBS/YC out.
    56 84 06 ; RTCO/SFL Enable
    56 88 10 ; 10 bit input enabled
    56 87 20 ; Encoder PAL/NTSC auto-detect enabled
    End
    
    
    ##CP YPrPb 525i & 625i##
    :525I YPrPb In 10Bit 422 HS/VS Encoder:
    42 05 00 ; Prim_Mode =000b for SD-M
    42 06 0A ; VID_STD=1010b for SD 4x1 525i
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 11 ; Set Latch Clock 01b, Power Down ADC3
    42 3B 81 ; Enable internal Bias
    42 3C 52 ; PLL_QPUMP to 010b
    42 6B C1 ; Select 422 10 bit YPrPb out from CP
    42 7B 1C ; Disable AV Codes 
    42 85 1B ; Turn off SSPD and force SOY. Enable DS_Out For Eval Board.
    42 86 1B ; Enable stdi_line_count_mode
    42 8F 77 ; FR_LL to 1820 & Enable 27 MHz LLC
    42 90 1C ; FR_LL to 1820
    42 C5 01 ; CP_CLAMP_AVG_FACTOR[1-0] = 00b
    42 C9 0C ; Enable DDR Mode
    42 F3 07 ; Enable Anti Alias Filters on ADC 0,1,2
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    56 17 02 ; Software Reset
    56 00 FC ; Power up all DAcs and PLL
    56 01 80 ; SD only mode, Data input on Y-bus
    56 80 10 ; SSAF Luma filter enabled, NTSC mode
    56 82 c9 ; Step control on, pixel data valid, pedestal on, PrPb SSAF on,CVBS/YC out.
    56 84 06 ; RTCO/SFL Enable
    56 88 10 ; 10 bit input enabled
    56 87 20 ; Encoder PAL/NTSC auto-detect enabled
    56 8A 0C ; H&v
    56 8B 40 ; HS to Pixel shift required
    End
    
    
    ##CP YPrPb 525i & 625i##
    :525I YPrPb In 12Bit RGB DDR HS/VS HDMI:
    42 05 01 ; PRIM_MODE = 001b COMP
    42 06 00 ; VID_STD for 525i
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28.63636MHz crystal
    42 3A 11 ; Set Latch Clock 01b. Power down ADC3.
    42 3B 81 ; Enable Internal Bias 
    42 3C 53 ; PLL QPUMP to 011b
    42 52 04 ; Setup reg 52 to 66 in CSC for RGB color space
    42 53 00 ; CSC Register
    42 54 78 ; CSC Register
    42 55 23 ; CSC Register
    42 56 8C ; CSC Register
    42 57 C5 ; CSC Register
    42 58 BB ; CSC Register
    42 59 00 ; CSC Register
    42 5A 00 ; CSC Register
    42 5B 28 ; CSC Register
    42 5C 94 ; CSC Register
    42 5D 00 ; CSC Register
    42 5E 05 ; CSC Register
    42 5F DB ; CSC Register
    42 60 00 ; CSC Register
    42 61 00 ; CSC Register
    42 62 00 ; CSC Register
    42 63 01 ; CSC Register
    42 64 05 ; CSC Register
    42 65 25 ; CSC Register
    42 66 DB ; CSC Register
    42 6B 84 ; Enable DE output, swap colours
    42 C9 08 ; Enable DDR
    42 F4 37 ; Set drive strength
    42 73 F0 ; Enable Manual Gain and set CH_A gain
    42 74 0C ; Set CH_A and CH_B Gain
    42 75 03 ; Set CH_B and CH_C Gain
    42 76 00 ; Set CH_C Gain
    42 77 04 ; Set offset to 64d
    42 78 01 ; Set offset to 64d
    42 79 00 ; Set offset to 64d
    42 7A 40 ; Set offset to 64d
    42 7B 1D ; Turn off EAV and SAV Codes. Set BLANK_RGB_SEL. 
    42 85 19 ; Turn off SSPD and force SOY
    42 86 0B ; Enable STDI Line Count Mode
    42 B7 1B ; use internal VS width for fixing VS vibration
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 80 ; default color
    42 C2 F0 ; Default color
    42 0E 80 ; ADI recommended sequence
    42 52 46 ; ADI recommended sequence
    42 54 00 ; ADI recommended sequence
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI recommended sequence
    7A 41 10 ; Power up
    7A 01 03 ; 20N bytes of CTS audio Clk
    7A 03 18 ; 20N bytes of CTS audio Clk
    7A 0A 64 ; Mclk setup,Refresh rate settings.
    7A 0C 0C ; I2S Setup, Format
    7A 15 0A ; 12-bit DDR In
    7A 16 02 ; 12-bit style1 rising edge
    7A 17 08 ; CSC coeffients +-2 (8192_8190)
    7A 44 F8 ; SPDIF enable
    7A 45 C0 ; Clear AV Mute
    7A 46 04 ; Aspect Ratio 16_9
    7A 50 60 ; Audio Channel Count
    7A 51 90 ; Speaker mapping
    7A 96 20 ; Interrupt action for VS
    7A 98 03 ; RSVD
    7A 9E 10 ; RSVD
    7A A0 00 ; RSVD
    7A AF 06 ; set HDMI Mode
    7A BA E0 ; Input Video clk(negedge)
    7A CB 01 ; RSVD
    74 F5 F5 ; Power down DAC (Bus expander address may vary by board)
    56 00 13 ; Power down Encoder 
    End
    
    
    
    ##CP YPrPb 525i & 625i##
    :525I YPrPb In 20Bit 422 HS/VS Encoder:
    42 05 00 ; PRIM_MODE = 001b COMP
    42 06 0A ; VID_STD for 525i
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28.63636MHz crystal
    42 3A 11 ; Set Latch Clock 01b. Power down ADC3.
    42 3B 81 ; Enable Internal Bias 
    42 3C 52 ; PLL QPUMP to 010b
    42 6B 81 ; 
    42 C9 00 ; SDR
    42 73 CF ; Enable Manual Gain and set CH_A gain
    42 74 A3 ; Set CH_A and CH_B Gain - 0FAh
    42 75 E8 ; Set CH_B and CH_C Gain
    42 76 FA ; Set CH_C Gain
    42 7B 1C ; Turn off EAV and SAV Codes.  
    42 85 1B ; Turn off SSPD and force SOY
    42 86 1B ; Enable STDI Line Count Mode
    42 8F 77 ; FR_LL to 1833 & Enable 28.63MHz LLC
    42 90 29 ; FR_LL to 1833
    42 B7 1B ; use internal VS width for fixing VS vibration
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 F0 ; default color
    42 C2 80 ; Default color
    42 F4 37 ; Set drive strength
    42 0E 80 ; ADI recommended sequence
    42 52 46 ; ADI recommended sequence
    42 54 00 ; ADI recommended sequence
    42 57 01 ; ADI recommended sequence
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI recommended sequence
    56 17 02 ; Software Reset
    56 00 FC ; Power up all DAcs and PLL
    56 01 80 ; SD only mode, Data input on Y-bus
    56 80 10 ; SSAF Luma filter enabled, NTSC mode
    56 82 c9 ; Step control on, pixel data valid, pedestal on, PrPb SSAF on,CVBS/YC out.
    56 84 06 ; RTCO/SFL Enable
    56 88 18 ; 20 bit input enabled
    56 86 0A ; 861B timing
    56 87 20 ; Encoder PAL/NTSC auto-detect enabled
    56 8A 0C ; HS/VS 
    56 8B 80 ; HS to Pixel shift required
    End
    
    
    
    
    
    
    ##CP YPrPb 525i & 625i##
    :625I YPrPb In 10Bit 422 Encoder:
    42 05 00 ; Prim_Mode =000b for SD-M
    42 06 0B ; VID_STD=1010b for SD 4x1 525i
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 11 ; Set Latch Clock 01b, Power Down ADC3
    42 3B 81 ; Enable internal Bias
    42 3C 52 ; PLL_QPUMP to 010b
    42 6B C1 ; Select 422 10 bit YPrPb out from CP
    42 7B 06 ; clears the bits CP_DUP_AV and AV_Blank_EN 
    42 85 19 ; Turn off SSPD and force SOY. For Eval Board.
    42 86 1B ; Enable stdi_line_count_mode
    42 8A B0 ; Manual VCO_RANGE=01
    42 8F 77 ; FR_LL to 1820 & Enable 28.63MHz LLC
    42 90 1C ; FR_LL to 1820
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 F0 ; default color
    42 C2 80 ; Default color
    42 C5 01 ; CP_CLAMP_AVG_FACTOR[1-0] = 00b
    42 C9 0C ; Enable DDR Mode
    42 F3 07 ; Enable Anti Alias Filters on ADC 0,1,2
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    56 17 02 ; Software Reset 
    56 00 FC ; Power up all DAcs and PLL
    56 01 80 ; SD only mode, Data input on Y-bus
    56 80 11 ; SSAF Luma filter enabled, NTSC mode
    56 82 C1 ; Step control on, pixel data valid, PrPb SSAF on,CVBS/YC out.
    56 84 06 ; RTCO/SFL Enable
    56 88 10 ; 10 bit input enabled
    56 87 20 ; Encoder PAL/NTSC auto-detect enabled
    End
    
    
    
    
    
    
    ##CP YPrPb 525i & 625i##
    :625I YPrPb In 12Bit RGB DDR HS/VS HDMI:
    42 05 01 ; PRIM_MODE = 001b COMP
    42 06 01 ; VID_STD for 525i
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28.63636MHz crystal
    42 3A 11 ; Set Latch Clock 01b. Power down ADC3.
    42 3B 81 ; Enable Internal Bias 
    42 3C 53 ; PLL QPUMP to 011b
    42 52 04 ; Setup reg 52 to 66 in CSC for RGB color space
    42 53 00 ; CSC Register
    42 54 78 ; CSC Register
    42 55 23 ; CSC Register
    42 56 8C ; CSC Register
    42 57 C5 ; CSC Register
    42 58 BB ; CSC Register
    42 59 00 ; CSC Register
    42 5A 00 ; CSC Register
    42 5B 28 ; CSC Register
    42 5C 94 ; CSC Register
    42 5D 00 ; CSC Register
    42 5E 05 ; CSC Register
    42 5F DB ; CSC Register
    42 60 00 ; CSC Register
    42 61 00 ; CSC Register
    42 62 00 ; CSC Register
    42 63 01 ; CSC Register
    42 64 05 ; CSC Register
    42 65 25 ; CSC Register
    42 66 DB ; CSC Register
    42 6B 84 ; Enable DE output, swap colours
    42 C9 08 ; Enable DDR
    42 F4 37 ; Set drive strength
    42 73 F0 ; Enable Manual Gain and set CH_A gain
    42 74 0C ; Set CH_A and CH_B Gain
    42 75 03 ; Set CH_B and CH_C Gain
    42 76 00 ; Set CH_C Gain
    42 77 04 ; Set offset to 64d
    42 78 01 ; Set offset to 64d
    42 79 00 ; Set offset to 64d
    42 7A 40 ; Set offset to 64d
    42 7B 1D ; Turn off EAV and SAV Codes. Set BLANK_RGB_SEL. 
    42 85 19 ; Turn off SSPD and force SOY
    42 86 0B ; Enable STDI Line Count Mode
    42 B7 1B ; use internal VS width for fixing VS vibration
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 80 ; default color
    42 C2 F0 ; Default color
    42 0E 80 ; ADI recommended sequence
    42 52 46 ; ADI recommended sequence
    42 54 00 ; ADI recommended sequence
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI recommended sequence
    7A 41 10 ; Power up
    7A 01 03 ; 20N bytes of CTS audio Clk
    7A 03 18 ; 20N bytes of CTS audio Clk
    7A 0A 64 ; Mclk setup,Refresh rate settings.
    7A 0C 0C ; I2S Setup, Format
    7A 15 0A ; 12-bit DDR In
    7A 16 02 ; 12-bit style1 rising edge
    7A 17 08 ; CSC coeffients +-2 (8192_8190)
    7A 44 F8 ; SPDIF enable
    7A 45 C0 ; Clear AV Mute
    7A 46 04 ; Aspect Ratio 16_9
    7A 50 60 ; Audio Channel Count
    7A 51 90 ; Speaker mapping
    7A 96 20 ; Interrupt action for VS
    7A 98 03 ; RSVD
    7A 9E 10 ; RSVD
    7A A0 00 ; RSVD
    7A AF 06 ; set HDMI Mode
    7A BA E0 ; Input Video clk(negedge)
    7A CB 01 ; RSVD
    74 F5 F5 ; Power down DAC (Bus expander address may vary by board)
    56 00 13 ; Power down Encoder 
    End
    
    
    ##CP YPrPb 525i & 625i##
    :625I YPrPb In 20Bit 422 HS/VS Encoder:
    42 05 00 ; PRIM_MODE = 000b COMP
    42 06 0B ; VID_STD for 625i
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28.63636MHz crystal
    42 3A 11 ; Set Latch Clock 01b. Power down ADC3.
    42 3B 81 ; Enable Internal Bias 
    42 3C 52 ; PLL QPUMP to 010b
    42 6B 81 ; 422 20bit OUT
    42 C9 00 ; SDR
    42 73 CF ; Enable Manual Gain and set CH_A gain
    42 74 A3 ; Set CH_A and CH_B Gain - 0FAh
    42 75 E8 ; Set CH_B and CH_C Gain
    42 76 FA ; Set CH_C Gain
    42 7B 1C ; Turn off EAV and SAV Codes.  
    42 8A B0 ; Manual VCO_RANGE 01
    42 85 1B ; Turn off SSPD and force SOY
    42 86 1B ; Enable STDI Line Count Mode
    42 8F 77 ; FR_LL to 1833 & Enable 28.63MHz LLC
    42 90 29 ; FR_LL to 1833
    42 B7 1B ; use internal VS width for fixing VS vibration
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 F0 ; default color
    42 C2 80 ; Default color
    42 F4 37 ; Set drive strength
    42 0E 80 ; ADI recommended sequence
    42 52 46 ; ADI recommended sequence
    42 54 00 ; ADI recommended sequence
    42 57 01 ; ADI recommended sequence
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI recommended sequence
    56 17 02 ; Software Reset
    56 00 FC ; Power up all DAcs and PLL
    56 01 80 ; SD only mode, Data input on Y-bus
    56 80 11 ; SSAF Luma filter enabled, PAL mode
    56 82 C1 ; Step control on, pixel data valid, PrPb SSAF on,CVBS/YC out
    56 84 06 ; RTCO/SFL Enable
    56 86 0A ; 861B timing
    56 87 20 ; Encoder PAL/NTSC auto-detect enabled
    56 88 18 ; 20 bit input enabled
    56 8A 0C ; HS/VS 
    56 8B 00 ; 
    56 8C CB ; Subcarrier Frequency PAL
    56 8D 8A ; Subcarrier Frequency PAL
    56 8E 09 ; Subcarrier Frequency PAL
    56 8F 2A ; Subcarrier Frequency PAL
    End
    
    
    
    
    
    ##CP 525p/625p##
    :525p/60Hz YPrPb In 12Bit 444 RGB HS/VS HDMI:
    42 05 01 ; PRIM_MODE = 001b COMP
    42 06 04 ; VID_STD for 525P
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28.63636MHz crystal
    42 3A 11 ; Set Latch Clock 01b. Power down ADC3.
    42 3B 81 ; Enable Internal Bias 
    42 3C 53 ; PLL QPUMP to 011b
    42 52 04 ; Setup reg 52 to 66 in CSC for RGB color space
    42 53 00 ; CSC Register
    42 54 78 ; CSC Register
    42 55 23 ; CSC Register
    42 56 8C ; CSC Register
    42 57 C5 ; CSC Register
    42 58 BB ; CSC Register
    42 59 00 ; CSC Register
    42 5A 00 ; CSC Register
    42 5B 28 ; CSC Register
    42 5C 94 ; CSC Register
    42 5D 00 ; CSC Register
    42 5E 05 ; CSC Register
    42 5F DB ; CSC Register
    42 60 00 ; CSC Register
    42 61 00 ; CSC Register
    42 62 00 ; CSC Register
    42 63 01 ; CSC Register
    42 64 05 ; CSC Register
    42 65 25 ; CSC Register
    42 66 DB ; CSC Register
    42 6B 84 ; Enable DE output, swap colours
    42 C9 08 ; Enable DDR
    42 73 F0 ; Enable Manual Gain and set CH_A gain
    42 74 0C ; Set CH_A and CH_B Gain
    42 75 03 ; Set CH_B and CH_C Gain
    42 76 00 ; Set CH_C Gain
    42 77 04 ; Set offset to 64d
    42 78 01 ; Set offset to 64d
    42 79 00 ; Set offset to 64d
    42 7A 40 ; Set offset to 64d
    42 7B 1D ; Turn off EAV and SAV Codes. Set BLANK_RGB_SEL. 
    42 85 19 ; Turn off SSPD and force SOY
    42 86 0B ; Enable STDI Line Count Mode
    42 BF 06 ; Blue Screen Free Run Color
    42 C0 40 ; default color
    42 C1 80 ; default color
    42 C2 F0 ; Default color
    42 0E 80 ; ADI recommended sequence
    42 52 46 ; ADI recommended sequence
    42 54 00 ; ADI recommended sequence
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI recommended sequence
    7A 41 10 ; Power up
    7A 01 03 ; 20N bytes of CTS audio Clk
    7A 03 18 ; 20N bytes of CTS audio Clk
    7A 0A 64 ; Mclk setup,Refresh rate settings.
    7A 0C 0C ; I2S Setup, Format
    7A 15 0A ; 12-bit DDR In
    7A 16 02 ; 12-bit style1 rising edge
    7A 17 08 ; CSC coeffients +-2 (8192_8190)
    7A 44 F8 ; SPDIF enable
    7A 45 C0 ; Clear AV Mute
    7A 46 04 ; Aspect Ratio 16_9
    7A 50 60 ; Audio Channel Count
    7A 51 90 ; Speaker mapping
    7A 96 20 ; Interrupt action for VS
    7A 98 03 ; RSVD
    7A 9E 10 ; RSVD
    7A A0 00 ; RSVD
    7A AF 06 ; set HDMI Mode
    7A BA E0 ; Input Video clk(negedge)
    7A CB 01 ; RSVD
    74 F5 F5 ; Power down DAC (Bus expander address may vary by board)
    56 00 13 ; Power down Encoder 
    End
    
    
    
    ##CP 525p/625p##
    :525p/60Hz YPrPb In 20Bit 422 EAV/SAV Encoder:
    42 05 01 ; PRIM_MODE = 001b COMP
    42 06 06 ; VID_STD for 525P 2x1
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28.63636MHz crystal
    42 3A 11 ; Set Latch Clock 01b. Power down ADC3.
    42 3B 81 ; Enable Internal Bias 
    42 3C 53 ; PLL QPUMP to 011b
    42 6B 81 ; 422 20bit out 
    42 C9 00 ; SDR mode
    42 73 CF ; Enable Manual Gain and set CH_A gain
    42 74 A3 ; Set CH_A and CH_B Gain - 0FAh
    42 75 E8 ; Set CH_B and CH_C Gain
    42 76 FA ; Set CH_C Gain
    42 7B 1E ; Enable EAV and SAV Codes.  
    42 85 19 ; Turn off SSPD and force SOY
    42 86 0B ; Enable STDI Line Count Mode
    42 8A B0 ; Manual VCO Range=01 
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 F0 ; default color
    42 C2 80 ; Default color
    42 C5 01 ; 
    42 0E 80 ; ADI recommended sequence
    42 52 46 ; ADI recommended sequence
    42 54 00 ; ADI recommended sequence
    42 57 01 ; ADI recommended sequence
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI recommended sequence
    56 17 02 ; Software Reset 
    56 00 1C ; Power up DACs and PLL
    56 02 21 ; YPbPr out / Rev.3 operation 861B
    56 01 10 ; ED/HD-SDR only mode
    56 30 04 ; 525p@60 Frame rate, EAV/SAV
    56 31 01 ; H54X enabled, Pixel data valid
    56 33 6D ; PrPb SSAF, Sync filter enabled, 422 enabled 
    56 39 20 ; ED/HD 861B Timing
    End
    
    
    
    ##CP 525p/625p##
    :525p/60Hz YPrPb In 20Bit 422 HS/VS Encoder:
    42 05 01 ; PRIM_MODE = 001b COMP
    42 06 06 ; VID_STD for 525P 2x1
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28.63636MHz crystal
    42 3A 11 ; Set Latch Clock 01b. Power down ADC3.
    42 3B 81 ; Enable Internal Bias 
    42 3C 53 ; PLL QPUMP to 011b
    42 6B 81 ; 422 20bit out 
    42 C9 00 ; SDR mode
    42 73 CF ; Enable Manual Gain and set CH_A gain
    42 74 A3 ; Set CH_A and CH_B Gain - 0FAh
    42 75 E8 ; Set CH_B and CH_C Gain
    42 76 FA ; Set CH_C Gain
    42 7B 1D ; Turn off EAV and SAV Codes. Set BLANK_RGB_SEL. 
    42 85 19 ; Turn off SSPD and force SOY
    42 86 0B ; Enable STDI Line Count Mode
    42 8A B0 ; Manual VCO Range=01 
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 F0 ; default color
    42 C2 80 ; Default color
    42 C5 01 ; 
    42 0E 80 ; ADI recommended sequence
    42 52 46 ; ADI recommended sequence
    42 54 00 ; ADI recommended sequence
    42 57 01 ; ADI recommended sequence
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI recommended sequence
    56 17 02 ; Software Reset 
    56 00 1C ; Power up DACs and PLL
    56 02 21 ; YPbPr out / Rev.3 operation 861B
    56 01 10 ; ED/HD-SDR only mode
    56 30 00 ; 525p@60 Frame rate, H&V
    56 31 01 ; H54X enabled, Pixel data valid
    56 33 6D ; PrPb SSAF, Sync filter enabled, 422 enabled 
    56 39 20 ; ED/HD 861B Timing
    End
    
    
    ##CP 525p/625p##
    :625p/60Hz YPrPb In 20Bit 422 HS/VS Encoder:
    42 05 01 ; PRIM_MODE = 001b COMP
    42 06 07 ; VID_STD for 625P 2x1
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28.63636MHz crystal
    42 3A 11 ; Set Latch Clock 01b. Power down ADC3.
    42 3B 81 ; Enable Internal Bias 
    42 3C 53 ; PLL QPUMP to 011b
    42 6B 81 ; 422 20bit out 
    42 C9 00 ; SDR mode
    42 73 CF ; Enable Manual Gain and set CH_A gain
    42 74 A3 ; Set CH_A and CH_B Gain - 0FAh
    42 75 E8 ; Set CH_B and CH_C Gain
    42 76 FA ; Set CH_C Gain
    42 7B 1D ; Turn off EAV and SAV Codes. Set BLANK_RGB_SEL. 
    42 85 19 ; Turn off SSPD and force SOY
    42 86 0B ; Enable STDI Line Count Mode
    42 8A B0 ; Manual VCO Range=01 
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 F0 ; default color
    42 C2 80 ; Default color
    42 C5 01 ; 
    42 0E 80 ; ADI recommended sequence
    42 52 46 ; ADI recommended sequence
    42 54 00 ; ADI recommended sequence
    42 57 01 ; ADI recommended sequence
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI recommended sequence
    56 17 02 ; Software Reset 
    56 00 1C ; Power up DACs and PLL
    56 02 21 ; YPbPr out / Rev.3 operation 861B
    56 01 10 ; ED/HD-SDR only mode
    56 30 18 ; 625p@60 Frame rate, H&V
    56 31 01 ; H54X enabled, Pixel data valid
    56 33 6D ; PrPb SSAF, Sync filter enabled, 422 enabled 
    56 39 20 ; ED/HD 861B Timing
    End
    
    
    ##CP 720p##
    :720p/60Hz YPrPb In 16Bit 422 EAV/SAV Out Encoder:
    42 05 01 ; Prim_Mode =001b COMP
    42 06 0A ; VID_STD=1010b for 720P 1x1
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 21 ; set latch clock settings to 010b, Power Down ADC3
    42 3B 81 ; Enable Internal Bias
    42 3C 5D ; PLL_QPUMP to 101b
    42 6B C3 ; Select 422 16 bit YPrPb out from CP
    42 85 19 ; Turn off SSPD and force SOY. For Eval Board.
    42 86 1B ; Enable stdi_line_count_mode
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 F0 ; default color
    42 C2 80 ; Default color
    42 0E 80 ; Enable Hidden Space.
    42 52 46 ; Enable SOG/SOY Clamp Filter
    42 54 00 ; CML Level Change
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; Disable Hidden Space.
    56 17 02 ; Software Reset
    56 00 1C ; Power up DACs and PLL
    56 01 10 ; ED/HD-SDR Only mode
    56 30 2C ; 720p@60 Frame rate, EAV/SAV codes enabled
    56 31 01 ; HD4X enabled, Pixel data valid
    56 33 68 ; PrPb SSAF, SINC filter enabled, 8 bit input mode enabled
    End
    
    
    
    ##CP 720p##
    :720p/60Hz YPrPb In 12Bit 444 RGB HS/VS HDMI:
    42 05 01 ; Prim_Mode =001b COMP
    42 06 0A ;VID_STD=1010b for 720P 1x1
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 21 ; set latch clock settings to 010b, Power Down ADC3
    42 3B 81 ; Enable Internal Bias
    42 3C 5D ; PLL_QPUMP to 101b
    42 52 04 ;setup reg 52 to 66 in CSC for RGB color space
    42 53 00 ; CSC Register
    42 54 78 ; CSC Register
    42 55 23 ; CSC Register
    42 56 8C ; CSC Register
    42 57 C5 ; CSC Register
    42 58 BB ; CSC Register
    42 59 00 ; CSC Register
    42 5A 00 ; CSC Register
    42 5B 28 ; CSC Register
    42 5C 94 ; CSC Register
    42 5D 00 ; CSC Register
    42 5E 05 ; CSC Register
    42 5F DB ; CSC Register
    42 60 00 ; CSC Register
    42 61 00 ; CSC Register
    42 62 00 ; CSC Register
    42 63 01 ; CSC Register
    42 64 05 ; CSC Register
    42 65 25 ; CSC Register
    42 66 DB ; CSC Register
    42 6B 84 ; Enable DE output, swap colours
    42 C9 08 ; Enable DDR
    42 73 F0 ; Enable Manual Gain and set CH_A gain
    42 74 0C ; Set CH_A and CH_B Gain
    42 75 03 ; Set CH_B and CH_C Gain
    42 76 00 ; Set CH_C gain
    42 0E 80 ; Enable Hidden Space.
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; Disable Hidden Space.
    42 77 04 ; Set offset to 64d
    42 78 01 ; Set offset to 64d
    42 79 00 ; Set offset to 64d
    42 7A 40 ; Set offset to 64d
    42 7B 1D ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 7C 93 ; set HS position & polarity
    42 7D 90 ; set HS position
    42 7E 40 ; set HS position
    42 85 19 ;Turn off SSPD and force SOY. For Eval Board.
    42 86 0B ; Enable stdi_line_count_mode
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 80 ; default color
    42 C2 F0 ; Default color
    42 C5 01 ; CP_CLAMP_AVG_FACTOR[1-0] = 00b
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    7A 41 10 ; Power up
    7A 01 03 ; 20N bytes of CTS audio Clk
    7A 03 18 ; 20N bytes of CTS audio Clk
    7A 0A 64 ; Mclk setup,Refresh rate settings.
    7A 0C 0C ; I2S Setup, Format
    7A 15 0A ; 12-bit DDR In
    7A 16 02 ; 12-bit style1 rising edge
    7A 17 08 ; CSC coeffients +-2 (8192_8190)
    7A 44 F8 ; SPDIF enable
    7A 45 C0 ; Clear AV Mute
    7A 46 04 ; Aspect Ratio 16_9
    7A 50 60 ; Audio Channel Count
    7A 51 90 ; Speaker mapping
    7A 96 20 ; Interrupt action for VS
    7A 98 03 ; RSVD
    7A 9E 10 ; RSVD
    7A A0 00 ; RSVD
    7A AF 06 ; set HDMI Mode
    7A BA E0 ; Input Video clk(negedge)
    7A CB 01 ; RSVD
    74 F5 F5 ; Power down DAC (Bus expander address may vary by board)
    56 00 13 ; Power down Encoder 
    End
    
    
    ##CP 720p##
    :720p/60Hz YPrPb In 20Bit 422 HS/VS Encoder:
    42 05 01 ; Prim_Mode =001b COMP
    42 06 0A ; VID_STD=1010b for 720P 1x1
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 21 ; set latch clock settings to 010b, Power Down ADC3
    42 3B 81 ; Enable Internal Bias
    42 3C 5D ; PLL_QPUMP to 101b
    42 6B 81 ; 422 20bit out
    42 C9 00 ; SDR
    42 73 CF ; Enable Manual Gain and set CH_A gain
    42 74 A3 ; Set CH_A and CH_B Gain - 0FAh
    42 75 E8 ; Set CH_B and CH_C Gain
    42 76 FA ; Set CH_C gain
    42 7B 1D ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 7C 00 ; set HS position & polarity
    42 7D 00 ; set HS position
    42 7E 00 ; set HS position
    42 7F 00 ; 
    42 85 19 ; Turn off SSPD and force SOY. For Eval Board.
    42 86 0B ; Enable stdi_line_count_mode
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 F0 ; default color
    42 C2 80 ; Default color
    42 C5 01 ; CP_CLAMP_AVG_FACTOR[1-0] = 00b
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 57 01 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    56 17 02 ; Software Reset 
    56 00 1E ; Power up DACs and PLL
    56 01 10 ; ED/HD-SDR only mode
    56 02 21 ; Rev.3 861B timing mode 
    56 30 28 ; 720p@60 Frame rate, H&V Mode
    56 31 01 ; H54X enabled, Pixel data valid
    56 33 6D ; PrPb SSAF, SINC filter enabled, 10 bit input mode enabled, 422 Enabled
    56 39 20 ; ED/HD 861B Timing
    End
    
    
    
    ##CP 720p##
    :720p/50Hz YPrPb In 20Bit 422 EAV/SAV Encoder:
    42 05 01 ; Prim_Mode =001b COMP
    42 06 0A ; VID_STD=1010b for 720P 1x1
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 21 ; set latch clock settings to 010b, Power Down ADC3
    42 3B 81 ; Enable Internal Bias
    42 3C 5D ; PLL_QPUMP to 101b
    42 6B 81 ; 422 20bit out
    42 C9 00 ; SDR
    42 73 CF ; Enable Manual Gain and set CH_A gain
    42 74 A3 ; Set CH_A and CH_B Gain - 0FAh
    42 75 E8 ; Set CH_B and CH_C Gain
    42 76 FA ; Set CH_C gain
    42 7B 1E ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 7C 00 ; set HS position & polarity
    42 7D 00 ; set HS position
    42 7E 00 ; set HS position
    42 7F 00 ; 
    42 85 19 ; Turn off SSPD and force SOY. For Eval Board.
    42 86 0B ; Enable stdi_line_count_mode
    42 87 E7 ; Reprogram pll_div_ratio for 1080i/50Hz = 1980
    42 88 BC ;
    42 8F 02 ; Reprogram freerun_line_length also to 764 for 28.636MHz xtal 
    42 90 FC ;
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 F0 ; default color
    42 C2 80 ; Default color
    42 C5 01 ; CP_CLAMP_AVG_FACTOR[1-0] = 00b
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 57 01 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    56 17 02 ; Software Reset 
    56 00 1E ; Power up DACs and PLL
    56 01 10 ; ED/HD-SDR only mode
    56 02 21 ; Rev.3 861B timing mode 
    56 30 34 ; 720p@50 Frame rate, EAV/SAV  
    56 31 01 ; H54X enabled, Pixel data valid
    56 33 6D ; PrPb SSAF, SINC filter enabled, 10 bit input mode enabled, 422 Enabled
    56 39 20 ; ED/HD 861B Timing
    End
    
    
    
    
    ##CP 720p##
    :720p/50Hz YPrPb In 20Bit 422 HS/VS Encoder:
    42 05 01 ; Prim_Mode =001b COMP
    42 06 0A ; VID_STD=1010b for 720P 1x1
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 21 ; set latch clock settings to 010b, Power Down ADC3
    42 3B 81 ; Enable Internal Bias
    42 3C 5D ; PLL_QPUMP to 101b
    42 6B 81 ; 422 20bit out
    42 C9 00 ; SDR
    42 73 CF ; Enable Manual Gain and set CH_A gain
    42 74 A3 ; Set CH_A and CH_B Gain - 0FAh
    42 75 E8 ; Set CH_B and CH_C Gain
    42 76 FA ; Set CH_C gain
    42 7B 1D ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 7C 00 ; set HS position & polarity
    42 7D 00 ; set HS position
    42 7E 00 ; set HS position
    42 7F 00 ; 
    42 85 19 ; Turn off SSPD and force SOY. For Eval Board.
    42 86 0B ; Enable stdi_line_count_mode
    42 87 E7 ; Reprogram pll_div_ratio for 1080i/50Hz = 1980
    42 88 BC ;
    42 8F 02 ; Reprogram freerun_line_length also to 764 for 28.636MHz xtal 
    42 90 FC ;
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 F0 ; default color
    42 C2 80 ; Default color
    42 C5 01 ; CP_CLAMP_AVG_FACTOR[1-0] = 00b
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 57 01 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    56 17 02 ; Software Reset 
    56 00 1E ; Power up DACs and PLL
    56 01 10 ; ED/HD-SDR only mode
    56 02 21 ; Rev.3 861B timing mode 
    56 30 30 ; 720p@50 Frame rate, HS/VS  
    56 31 01 ; H54X enabled, Pixel data valid
    56 33 6D ; PrPb SSAF, SINC filter enabled, 10 bit input mode enabled, 422 Enabled
    56 39 20 ; ED/HD 861B Timing
    End
    
    
    
    
    
    ##CP 1080i##
    :1080i/60Hz YPrPb In 20Bit 422 EAV/SAV Encoder:
    42 05 01 ; Prim_Mode =001b COMP
    42 06 0C ; VID_STD=1100b for 1125 1x1
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 21 ; set latch clock settings to 010b, Power Down ADC3
    42 3B 81 ; Enable Internal Bias
    42 3C 5D ; PLL_QPUMP to 101b
    42 6B C1 ; Select 422 20 bit YPrPb out from CP
    42 85 19 ; Turn off SSPD and force SOY. For Eval Board.
    42 86 1B ; Enable stdi_line_count_mode
    42 B7 1B ; use internal VS width for fixing VS vibration
    42 BF 0E ; Default Color
    42 C0 40 ; default color
    42 C1 F0 ; default color
    42 C2 80 ; Default color
    42 0E 80 ; Enable Hidden Space.
    42 52 46 ; Enable SOG/SOY Clamp Filter
    42 54 00 ; CML Level Change
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; Disable Hidden Space.
    56 17 02 ; Software Reset
    56 00 1C ; Power up DACs and PLL
    56 01 10 ; ED/HD-SDR only mode
    56 30 6C ; 1080i@30 Frame rate, EAV/SAV codes enabled
    56 31 01 ; HD4X enabled, Pixel data valid
    56 33 6C ; PrPb SSAF, SINC filter enabled, 20 bit input mode enabled
    End
    
    
    
    
    ##CP 1080i##
    :1080i/60Hz YPrPb In 12Bit 444 RGB HS/VS HDMI:
    42 05 01 ; Prim_Mode =001b COMP
    42 06 0C ;VID_STD for 1080i
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 21 ; set latch clock settings to 010b, Power Down ADC3
    42 3B 81 ; Enable Internal Bias
    42 3C 5D ; PLL_QPUMP to 101b
    42 52 04 ; setup reg 52 to 66 in CSC for RGB color space
    42 53 00 ; CSC Register
    42 54 78 ; CSC Register
    42 55 23 ; CSC Register
    42 56 8C ; CSC Register
    42 57 C5 ; CSC Register
    42 58 BB ; CSC Register
    42 59 00 ; CSC Register
    42 5A 00 ; CSC Register
    42 5B 28 ; CSC Register
    42 5C 94 ; CSC Register
    42 5D 00 ; CSC Register
    42 5E 05 ; CSC Register
    42 5F DB ; CSC Register
    42 60 00 ; CSC Register
    42 61 00 ; CSC Register
    42 62 00 ; CSC Register
    42 63 01 ; CSC Register
    42 64 05 ; CSC Register
    42 65 25 ; CSC Register
    42 66 DB ; CSC Register
    42 6B 84 ; Enable DE output, swap colours
    42 C9 08 ; Enable DDR
    42 73 F0 ; Enable Manual Gain and set CH_A gain
    42 74 0C ; Set CH_A and CH_B Gain
    42 75 03 ; Set CH_B and CH_C Gain
    42 76 00 ; Set CH_C gain
    42 77 04 ; Set offset to 64d
    42 78 01 ; Set offset to 64d
    42 79 00 ; Set offset to 64d
    42 7A 40 ; Set offset to 64d
    42 7B 1D ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 7C 53 ; set HS position
    42 7D 90 ; set HS position
    42 7E 40 ; set HS position
    42 85 19 ; Turn off SSPD and force SOY. For Eval Board.
    42 86 0B ; Enable stdi_line_count_mode
    42 B7 1B ; use internal VS width for fixing VS vibration
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 80 ; default color
    42 C2 F0 ; Default color
    42 C5 01 ; CP_CLAMP_AVG_FACTOR[1-0] = 00b
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    7A 41 10 ; Power up
    7A 01 03 ; 20N bytes of CTS audio Clk
    7A 03 18 ; 20N bytes of CTS audio Clk
    7A 0A 64 ; Mclk setup,Refresh rate settings.
    7A 0C 0C ; I2S Setup, Format
    7A 15 0A ; 12-bit DDR In
    7A 16 02 ; 12-bit style1 rising edge
    7A 17 08 ; CSC coeffients +-2 (8192_8190)
    7A 44 F8 ; SPDIF enable
    7A 45 C0 ; Clear AV Mute
    7A 46 04 ; Aspect Ratio 16_9
    7A 50 60 ; Audio Channel Count
    7A 51 90 ; Speaker mapping
    7A 96 20 ; Interrupt action for VS
    7A 98 03 ; RSVD
    7A 9E 10 ; RSVD
    7A A0 00 ; RSVD
    7A AF 06 ; set HDMI Mode
    7A BA E0 ; Input Video clk(negedge)
    7A CB 01 ; RSVD
    74 F5 F5 ; Power down DAC (Bus expander address may vary by board)
    56 00 13 ; Power down Encoder 
    End
    
    
    ##CP 1080i##
    :1080i/60Hz YPrPb In 20Bit 422 HS/VS Encoder:
    42 05 01 ; Prim_Mode =001b COMP
    42 06 0C ;VID_STD for 1080i
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 21 ; set latch clock settings to 010b, Power Down ADC3
    42 3B 81 ; Enable Internal Bias
    42 3C 5D ; PLL_QPUMP to 101b
    42 6B 81 ; 422 20bit OUT
    42 C9 00 ; SDR
    42 73 CF ; Enable Manual Gain and set CH_A gain
    42 74 A3 ; Set CH_A and CH_B Gain - 0FAh
    42 75 E8 ; Set CH_B and CH_C Gain
    42 76 FA ; Set CH_C gain
    42 7B 1D ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 7C 93 ; set HS position/ HS Polarity - positive
    42 7D D4 ; set HS position
    42 7E 2D ; set HS position
    42 85 19 ; Turn off SSPD and force SOY. For Eval Board.
    42 86 1B ; Enable stdi_line_count_mode
    42 B7 1B ; use internal VS width for fixing VS vibration
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 F0 ; default color
    42 C2 80 ; Default color
    42 C5 01 ; CP_CLAMP_AVG_FACTOR[1-0] = 00b
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 57 01 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    56 17 02 ; Software Reset 
    56 00 1E ; Power up dacs and PLL
    56 01 10 ; ED/HD SDR
    56 02 21 ; Rev.3 861B timing mode 
    56 30 68 ; 1080u@30Hz AV codes disabled
    56 31 01 ; H54x enabled, Pixel Data Valid
    56 33 6C ; PrPb SSAF, Sync filter enabled, 422 enabled - CbCr swap for old Rev.2 silicon
    56 39 20 ; ED/HD 861B Timing
    End
    
    
    
    ##CP 1080i##
    :1080i/50Hz YPrPb In 20Bit 422 EAV/SAV Encoder:
    42 05 01 ; Prim_Mode =001b COMP
    42 06 0C ; VID_STD for 1080i
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 21 ; set latch clock settings to 010b, Power Down ADC3
    42 3B 81 ; Enable Internal Bias
    42 3C 5D ; PLL_QPUMP to 101b
    42 6B 81 ; 422 20bit OUT
    42 C9 00 ; SDR
    42 73 CF ; Enable Manual Gain and set CH_A gain
    42 74 A3 ; Set CH_A and CH_B Gain - 0FAh
    42 75 E8 ; Set CH_B and CH_C Gain
    42 76 FA ; Set CH_C gain
    42 7B 1E ; Enable EAV & SAV CODES 
    42 7C 93 ; set HS position/ HS Polarity - positive
    42 7D D4 ; set HS position
    42 7E 2D ; set HS position
    42 85 19 ; Turn off SSPD and force SOY. For Eval Board.
    42 86 0B ; Enable stdi_line_count_mode
    42 87 EA ; Reprogram pll_div_ratio for 1080i/50Hz = 2640
    42 88 50 
    42 8F 03 ; Reprogram freerun_line_length also to 1018 for 28.636MHz xtal 
    42 90 FA 
    42 B7 1B ; use internal VS width for fixing VS vibration
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 F0 ; default color
    42 C2 80 ; Default color
    42 C5 01 ; CP_CLAMP_AVG_FACTOR[1-0] = 00b
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 57 01 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    56 17 02 ; Software Reset 
    56 00 1E ; Power up dacs and PLL
    56 01 10 ; ED/HD SDR
    56 02 21 ; Rev.3 861B timing mode 
    56 30 74 ; 1080u@25Hz AV codes 
    56 31 01 ; H54x enabled, Pixel Data Valid
    56 33 6D ; PrPb SSAF, Sync filter enabled, 422 enabled - CbCr swap for old Rev.2 silicon
    56 39 20 ; ED/HD 861B Timing
    End
    
    
    
    
    
    ##CP 1080i##
    :1080i/50Hz YPrPb In 20Bit 422 HS/VS Encoder:
    42 05 01 ; Prim_Mode =001b COMP
    42 06 0C ; VID_STD for 1080i
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 21 ; set latch clock settings to 010b, Power Down ADC3
    42 3B 81 ; Enable Internal Bias
    42 3C 5D ; PLL_QPUMP to 101b
    42 6B 81 ; 422 20bit OUT
    42 C9 00 ; SDR
    42 73 CF ; Enable Manual Gain and set CH_A gain
    42 74 A3 ; Set CH_A and CH_B Gain - 0FAh
    42 75 E8 ; Set CH_B and CH_C Gain
    42 76 FA ; Set CH_C gain
    42 7B 1C ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 7C 93 ; set HS position/ HS Polarity - positive
    42 7D D4 ; set HS position
    42 7E 2D ; set HS position
    42 85 19 ; Turn off SSPD and force SOY. For Eval Board.
    42 86 0B ; Enable stdi_line_count_mode
    42 87 EA ; Reprogram pll_div_ratio for 1080i/50Hz = 2640
    42 88 50 
    42 8F 03 ; Reprogram freerun_line_length also to 1018 for 28.636MHz xtal 
    42 90 FA 
    42 B7 1B ; use internal VS width for fixing VS vibration
    42 BF 06 ; Blue Screen Free Run Colour
    42 C0 40 ; default color
    42 C1 F0 ; default color
    42 C2 80 ; Default color
    42 C5 01 ; CP_CLAMP_AVG_FACTOR[1-0] = 00b
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 57 01 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    56 17 02 ; Software Reset 
    56 00 1E ; Power up dacs and PLL
    56 01 10 ; ED/HD SDR
    56 02 21 ; Rev.3 861B timing mode 
    56 30 70 ; 1080u@25Hz AV codes disabled
    56 31 01 ; H54x enabled, Pixel Data Valid
    56 33 6C ; PrPb SSAF, Sync filter enabled, 422 enabled - CbCr swap 
    56 39 20 ; ED/HD 861B Timing
    End
    
    ##CP VGA 640x480##
    :640x480 _@ 60  Autodetecting sync source  25.175MHz Out through HDMI:
    42 05 02 ; Prim_Mode =010b for GR
    42 06 08 ; VID_STD=1000b for 640x480 @ 60
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 11 ; set latch clock settings to 001b, Power Down ADC3
    42 3B 81 ; Enable Internal Bias
    42 3C 5C ; PLL_QPUMP to 100b
    42 6A 00 ; DLL Phase Adjust
    42 6B 84 ; Enable DE output, swap Pr& Pb
    42 C9 08 ; Set DDR_EN
    42 73 90 ; Set man_gain
    42 7B 1D ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 85 03 ; Enable DS_OUT
    42 86 0B ; Enable stdi_line_count_mode
    42 8A 90 ; VCO Range to 00b
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    42 52 80 ; ADI Recommended Setting
    42 57 08 ; ADI Recommended Setting
    42 5B 20 ; ADI Recommended Setting
    42 5C 00 ; ADI Recommended Setting
    42 62 00 ; ADI Recommended Setting
    42 63 01 ; ADI Recommended Setting
    42 67 03 ; ADI Recommended Setting
    42 68 01 ; ADI Recommended Setting
    7A 41 10 ; Power up
    7A 01 03 ; 20N bytes of CTS audio Clk
    7A 03 18 ; 20N bytes of CTS audio Clk
    7A 0A 64 ; Mclk setup,Refresh rate settings.
    7A 0C 0C ; I2S Setup, Format
    7A 15 0A ; 12-bit DDR In
    7A 16 02 ; 12-bit style1 rising edge
    7A 17 08 ; CSC coeffients +-2 (8192_8190)
    7A 44 F8 ; SPDIF enable
    7A 45 C0 ; Clear AV Mute
    7A 46 04 ; Aspect Ratio 16_9
    7A 50 60 ; Audio Channel Count
    7A 51 90 ; Speaker mapping
    7A 96 20 ; Interrupt action for VS
    7A 98 03 ; RSVD
    7A 9E 10 ; RSVD
    7A A0 00 ; RSVD
    7A AF 06 ; set HDMI Mode
    7A BA E0 ; Input Video clk(negedge)
    7A CB 01 ; RSVD
    74 F5 F5 ; Power down DAC (Bus expander address may vary by board)
    54 00 13 ; Power down Encoder 
    End
    
    ##CP VGA 640x480##
    :640x480 _@ 72 Autodetecting sync source  31.5MHz Out through HDMI:
    42 05 02 ; Prim_Mode =010b for GR
    42 06 09 ; VID_STD=1000b for 640x480 @ 72
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 11 ; set latch clock settings to 001b, Power Down ADC3
    42 3B 81 ; Enable Internal Bias
    42 3C 5C ; PLL_QPUMP to 100b
    42 6A 00 ; DLL Phase Adjust
    42 6B 84 ; Enable DE output, swap Pr& Pb
    42 C9 08 ; Set DDR_EN
    42 73 90 ; Set man_gain
    42 7B 1D ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 85 03 ; Enable DS_OUT
    42 86 0B ; Enable stdi_line_count_mode
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    42 52 80 ; ADI Recommended Setting
    42 57 08 ; ADI Recommended Setting
    42 5B 20 ; ADI Recommended Setting
    42 5C 00 ; ADI Recommended Setting
    42 62 00 ; ADI Recommended Setting
    42 63 01 ; ADI Recommended Setting
    42 67 03 ; ADI Recommended Setting
    42 68 01 ; ADI Recommended Setting
    7A 41 10 ; Power up
    7A 01 03 ; 20N bytes of CTS audio Clk
    7A 03 18 ; 20N bytes of CTS audio Clk
    7A 0A 64 ; Mclk setup,Refresh rate settings.
    7A 0C 0C ; I2S Setup, Format
    7A 15 0A ; 12-bit DDR In
    7A 16 02 ; 12-bit style1 rising edge
    7A 17 08 ; CSC coeffients +-2 (8192_8190)
    7A 44 F8 ; SPDIF enable
    7A 45 C0 ; Clear AV Mute
    7A 46 04 ; Aspect Ratio 16_9
    7A 50 60 ; Audio Channel Count
    7A 51 90 ; Speaker mapping
    7A 96 20 ; Interrupt action for VS
    7A 98 03 ; RSVD
    7A 9E 10 ; RSVD
    7A A0 00 ; RSVD
    7A AF 06 ; set HDMI Mode
    7A BA E0 ; Input Video clk(negedge)
    7A CB 01 ; RSVD
    74 F5 F5 ; Power down DAC (Bus expander address may vary by board)
    54 00 13 ; Power down Encoder 
    End
    
    ##CP VGA 640x480##
    :640x480 _@ 75  Autodetecting sync source  31.5MHz Out through HDMI:
    42 05 02 ; Prim_Mode =010b for GR
    42 06 0A ; VID_STD=1000b for 640x480 @ 72
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 11 ; set latch clock settings to 001b, Power Down ADC3
    42 3B 81 ; Enable Internal Bias
    42 3C 5C ; PLL_QPUMP to 100b
    42 6A 00 ; DLL Phase Adjust
    42 6B 84 ; Enable DE output, swap Pr& Pb
    42 C9 08 ; Set DDR_EN
    42 73 90 ; Set man_gain
    42 7B 1D ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 85 03 ; Enable DS_OUT
    42 86 0B ; Enable stdi_line_count_mode
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    42 52 80 ; ADI Recommended Setting
    42 57 08 ; ADI Recommended Setting
    42 5B 20 ; ADI Recommended Setting
    42 5C 00 ; ADI Recommended Setting
    42 62 00 ; ADI Recommended Setting
    42 63 01 ; ADI Recommended Setting
    42 67 03 ; ADI Recommended Setting
    42 68 01 ; ADI Recommended Setting
    7A 41 10 ; Power up
    7A 01 03 ; 20N bytes of CTS audio Clk
    7A 03 18 ; 20N bytes of CTS audio Clk
    7A 0A 64 ; Mclk setup,Refresh rate settings.
    7A 0C 0C ; I2S Setup, Format
    7A 15 0A ; 12-bit DDR In
    7A 16 02 ; 12-bit style1 rising edge
    7A 17 08 ; CSC coeffients +-2 (8192_8190)
    7A 44 F8 ; SPDIF enable
    7A 45 C0 ; Clear AV Mute
    7A 46 04 ; Aspect Ratio 16_9
    7A 50 60 ; Audio Channel Count
    7A 51 90 ; Speaker mapping
    7A 96 20 ; Interrupt action for VS
    7A 98 03 ; RSVD
    7A 9E 10 ; RSVD
    7A A0 00 ; RSVD
    7A AF 06 ; set HDMI Mode
    7A BA E0 ; Input Video clk(negedge)
    7A CB 01 ; RSVD
    74 F5 F5 ; Power down DAC (Bus expander address may vary by board)
    54 00 13 ; Power down Encoder 
    End
    
    ##CP SVGA 800x600##
    :RGB 800x600 _@ 56 36MHz Out through HDMI:
    42 05 02 ; Prim_Mode =010b for GR
    42 06 00 ; VID_STD=0000b for 800x600 _@ 56
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 11 ; set latch clock settings to 001b, Power Down ADC3
    42 3B 81 ; Enable External Bias
    42 3C 5D ; PLL_QPUMP to 101b
    42 6A 00 ; DLL Phase Adjust
    42 6B 84 ; Swap Pr & Pb
    42 C9 08 ; Set DDR_EN
    42 73 90 ; Set man_gain
    42 7B 1D ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 85 03 ; Enable DS_OUT
    42 86 0B ; Enable stdi_line_count_mode
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    42 52 80 ; ADI Recommended Setting
    42 57 08 ; ADI Recommended Setting
    42 5B 20 ; ADI Recommended Setting
    42 5C 00 ; ADI Recommended Setting
    42 62 00 ; ADI Recommended Setting
    42 63 01 ; ADI Recommended Setting
    42 67 03 ; ADI Recommended Setting
    42 68 01 ; ADI Recommended Setting
    7A 41 10 ; Power up
    7A 01 03 ; 20N bytes of CTS audio Clk
    7A 03 18 ; 20N bytes of CTS audio Clk
    7A 0A 64 ; Mclk setup,Refresh rate settings.
    7A 0C 0C ; I2S Setup, Format
    7A 15 0A ; 12-bit DDR In
    7A 16 02 ; 12-bit style1 rising edge
    7A 17 08 ; CSC coeffients +-2 (8192_8190)
    7A 44 F8 ; SPDIF enable
    7A 45 C0 ; Clear AV Mute
    7A 46 04 ; Aspect Ratio 16_9
    7A 50 60 ; Audio Channel Count
    7A 51 90 ; Speaker mapping
    7A 96 20 ; Interrupt action for VS
    7A 98 03 ; RSVD
    7A 9E 10 ; RSVD
    7A A0 00 ; RSVD
    7A AF 06 ; set HDMI Mode
    7A BA E0 ; Input Video clk(negedge)
    7A CB 01 ; RSVD
    74 F5 F5 ; Power down DAC (Bus expander address may vary by board)
    54 00 13 ; Power down Encoder 
    End
    
    ##CP SVGA 800x600##
    :RGB 800x600 _@ 60 40.000MHz Out through HDMI:
    42 05 02 ; Prim_Mode =010b for GR
    42 06 01 ; VID_STD=0000b for 800x600 _@ 56
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 11 ; set latch clock settings to 001b, Power Down ADC3
    42 3B 81 ; Enable External Bias
    42 3C 5D ; PLL_QPUMP to 101b
    42 6A 00 ; DLL Phase Adjust
    42 6B 84 ; Swap Pr & Pb
    42 C9 08 ; Set DDR_EN
    42 73 90 ; Set man_gain
    42 7B 1D ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 85 03 ; Enable DS_OUT
    42 86 0B ; Enable stdi_line_count_mode
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    42 52 80 ; ADI Recommended Setting
    42 57 08 ; ADI Recommended Setting
    42 5B 20 ; ADI Recommended Setting
    42 5C 00 ; ADI Recommended Setting
    42 62 00 ; ADI Recommended Setting
    42 63 01 ; ADI Recommended Setting
    42 67 03 ; ADI Recommended Setting
    42 68 01 ; ADI Recommended Setting
    7A 41 10 ; Power up
    7A 01 03 ; 20N bytes of CTS audio Clk
    7A 03 18 ; 20N bytes of CTS audio Clk
    7A 0A 64 ; Mclk setup,Refresh rate settings.
    7A 0C 0C ; I2S Setup, Format
    7A 15 0A ; 12-bit DDR In
    7A 16 02 ; 12-bit style1 rising edge
    7A 17 08 ; CSC coeffients +-2 (8192_8190)
    7A 44 F8 ; SPDIF enable
    7A 45 C0 ; Clear AV Mute
    7A 46 04 ; Aspect Ratio 16_9
    7A 50 60 ; Audio Channel Count
    7A 51 90 ; Speaker mapping
    7A 96 20 ; Interrupt action for VS
    7A 98 03 ; RSVD
    7A 9E 10 ; RSVD
    7A A0 00 ; RSVD
    7A AF 06 ; set HDMI Mode
    7A BA E0 ; Input Video clk(negedge)
    7A CB 01 ; RSVD
    74 F5 F5 ; Power down DAC (Bus expander address may vary by board)
    54 00 13 ; Power down Encoder 
    End
    
    ##CP SVGA 800x600##
    :RGB 800x600 _@ 72 50.000MHz  Out through HDMI:
    42 05 02 ; Prim_Mode =010b for GR
    42 06 02 ; VID_STD=0000b for 800x600 _@ 56
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 11 ; set latch clock settings to 001b, Power Down ADC3
    42 3B 81 ; Enable External Bias
    42 3C 5C ; PLL_QPUMP to 100b
    42 6A 00 ; DLL Phase Adjust
    42 6B 84 ; Swap Pr & Pb
    42 C9 08 ; Set DDR_EN
    42 73 90 ; Set man_gain
    42 7B 1D ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 85 03 ; Enable DS_OUT
    42 86 0B ; Enable stdi_line_count_mode
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    42 52 80 ; ADI Recommended Setting
    42 57 08 ; ADI Recommended Setting
    42 5B 20 ; ADI Recommended Setting
    42 5C 00 ; ADI Recommended Setting
    42 62 00 ; ADI Recommended Setting
    42 63 01 ; ADI Recommended Setting
    42 67 03 ; ADI Recommended Setting
    42 68 01 ; ADI Recommended Setting
    7A 41 10 ; Power up
    7A 01 03 ; 20N bytes of CTS audio Clk
    7A 03 18 ; 20N bytes of CTS audio Clk
    7A 0A 64 ; Mclk setup,Refresh rate settings.
    7A 0C 0C ; I2S Setup, Format
    7A 15 0A ; 12-bit DDR In
    7A 16 02 ; 12-bit style1 rising edge
    7A 17 08 ; CSC coeffients +-2 (8192_8190)
    7A 44 F8 ; SPDIF enable
    7A 45 C0 ; Clear AV Mute
    7A 46 04 ; Aspect Ratio 16_9
    7A 50 60 ; Audio Channel Count
    7A 51 90 ; Speaker mapping
    7A 96 20 ; Interrupt action for VS
    7A 98 03 ; RSVD
    7A 9E 10 ; RSVD
    7A A0 00 ; RSVD
    7A AF 06 ; set HDMI Mode
    7A BA E0 ; Input Video clk(negedge)
    7A CB 01 ; RSVD
    74 F5 F5 ; Power down DAC (Bus expander address may vary by board)
    54 00 13 ; Power down Encoder 
    End
    
    ##CP SVGA 800x600##
    :RGB 800x600 _@ 75 49.500MHz  Out through HDMI:
    42 05 02 ; Prim_Mode =010b for GR
    42 06 03 ; VID_STD=0000b for 800x600 _@ 56
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 11 ; set latch clock settings to 001b, Power Down ADC3
    42 3B 81 ; Enable External Bias
    42 3C 5C ; PLL_QPUMP to 100b
    42 6A 00 ; DLL Phase Adjust
    42 6B 84 ; Swap Pr & Pb
    42 C9 08 ; Set DDR_EN
    42 73 90 ; Set man_gain
    42 7B 1D ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 85 03 ; Enable DS_OUT
    42 86 0B ; Enable stdi_line_count_mode
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    42 52 80 ; ADI Recommended Setting
    42 57 08 ; ADI Recommended Setting
    42 5B 20 ; ADI Recommended Setting
    42 5C 00 ; ADI Recommended Setting
    42 62 00 ; ADI Recommended Setting
    42 63 01 ; ADI Recommended Setting
    42 67 03 ; ADI Recommended Setting
    42 68 01 ; ADI Recommended Setting
    7A 41 10 ; Power up
    7A 01 03 ; 20N bytes of CTS audio Clk
    7A 03 18 ; 20N bytes of CTS audio Clk
    7A 0A 64 ; Mclk setup,Refresh rate settings.
    7A 0C 0C ; I2S Setup, Format
    7A 15 0A ; 12-bit DDR In
    7A 16 02 ; 12-bit style1 rising edge
    7A 17 08 ; CSC coeffients +-2 (8192_8190)
    7A 44 F8 ; SPDIF enable
    7A 45 C0 ; Clear AV Mute
    7A 46 04 ; Aspect Ratio 16_9
    7A 50 60 ; Audio Channel Count
    7A 51 90 ; Speaker mapping
    7A 96 20 ; Interrupt action for VS
    7A 98 03 ; RSVD
    7A 9E 10 ; RSVD
    7A A0 00 ; RSVD
    7A AF 06 ; set HDMI Mode
    7A BA E0 ; Input Video clk(negedge)
    7A CB 01 ; RSVD
    74 F5 F5 ; Power down DAC (Bus expander address may vary by board)
    54 00 13 ; Power down Encoder 
    End
    
    
    ##CP XGA 1024x768##
    :RGB  1024x768 _@ 60Hz 12-Bit DDR 65.000MHz Out through HDMI:
    42 05 02 ; Prim_Mode =010b for GR
    42 06 0C ; VID_STD=1100b for 1024x768 _@ 60
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 21 ; set latch clock settings to 010b, Power Down ADC3
    42 3B 61 ; Enable Internal Bias
    42 3C 5D ; PLL_QPUMP to 101b
    42 6A 00 ; DLL Phase Adjust
    42 6B 84 ; Swap Pr & Pb
    42 C9 08 ; Set DDR_EN
    42 73 90 ; Set man_gain
    42 7B 1D ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 85 03 ; Enable DS_OUT
    42 86 0B ; Enable stdi_line_count_mode
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    42 52 80 ; ADI Recommended Setting
    42 57 08 ; ADI Recommended Setting
    42 5B 20 ; ADI Recommended Setting
    42 5C 00 ; ADI Recommended Setting
    42 62 00 ; ADI Recommended Setting
    42 63 01 ; ADI Recommended Setting
    42 67 03 ; ADI Recommended Setting
    42 68 01 ; ADI Recommended Setting
    7A 41 10 ; Power up
    7A 01 03 ; 20N bytes of CTS audio Clk
    7A 03 18 ; 20N bytes of CTS audio Clk
    7A 0A 64 ; Mclk setup,Refresh rate settings.
    7A 0C 0C ; I2S Setup, Format
    7A 15 0A ; 12-bit DDR In
    7A 16 02 ; 12-bit style1 rising edge
    7A 17 08 ; CSC coeffients +-2 (8192_8190)
    7A 44 F8 ; SPDIF enable
    7A 45 C0 ; Clear AV Mute
    7A 46 04 ; Aspect Ratio 16_9
    7A 50 60 ; Audio Channel Count
    7A 51 90 ; Speaker mapping
    7A 96 20 ; Interrupt action for VS
    7A 98 03 ; RSVD
    7A 9E 10 ; RSVD
    7A A0 00 ; RSVD
    7A AF 06 ; set HDMI Mode
    7A BA E0 ; Input Video clk(negedge)
    7A CB 01 ; RSVD
    74 F5 F5 ; Power down DAC (Bus expander address may vary by board)
    56 00 13 ; Power down Encoder 
    End
    
    
    ##CP XGA 1024x768##
    :RGB  1024x768 _@ 70Hz 12-bit DDR 75.000MHz Out through HDMI:
    42 05 02 ; Prim_Mode =010b for GR
    42 06 0D ; VID_STD=1101b for 1024x768 _@ 70
    42 C3 46 ; ADC1 to Ain4, ADC0 to Ain6, 
    42 C4 B5 ; ADC2 to Ain5 and enables manual override of mux
    42 1D 47 ; Enable 28MHz Crystal
    42 3A 21 ; set latch clock settings to 010b, Power Down ADC3
    42 3B 61 ; Enable Internal Bias
    42 3C 5E ; PLL_QPUMP to 110b
    42 6A 00 ; DLL Phase Adjust
    42 6B 84 ; Select 444 12 bit YCrCb out from CP
    42 C9 08 ; Set DDR_EN
    42 73 90 ; Set man_gain
    42 7B 1D ; TURN OFF EAV & SAV CODES Set BLANK_RGB_SEL
    42 85 03 ; Enable DS_OUT
    42 86 0B ; Enable stdi_line_count_mode
    42 F4 3F ; Max Drive Strength
    42 0E 80 ; ADI Recommended Setting
    42 52 46 ; ADI Recommended Setting
    42 54 00 ; ADI Recommended Setting
    42 F6 3B ; ADI Recommended Setting
    42 0E 00 ; ADI Recommended Setting
    42 52 80 ; ADI Recommended Setting
    42 57 08 ; ADI Recommended Setting
    42 5B 20 ; ADI Recommended Setting
    42 5C 00 ; ADI Recommended Setting
    42 62 00 ; ADI Recommended Setting
    42 63 01 ; ADI Recommended Setting
    42 67 03 ; ADI Recommended Setting
    42 68 01 ; ADI Recommended Setting
    7A 41 10 ; Power up
    7A 01 03 ; 20N bytes of CTS audio Clk
    7A 03 18 ; 20N bytes of CTS audio Clk
    7A 0A 64 ; Mclk setup,Refresh rate settings.
    7A 0C 0C ; I2S Setup, Format
    7A 15 0A ; 12-bit DDR In
    7A 16 02 ; 12-bit style1 rising edge
    7A 17 08 ; CSC coeffients +-2 (8192_8190)
    7A 44 F8 ; SPDIF enable
    7A 45 C0 ; Clear AV Mute
    7A 46 04 ; Aspect Ratio 16_9
    7A 50 60 ; Audio Channel Count
    7A 51 90 ; Speaker mapping
    7A 96 20 ; Interrupt action for VS
    7A 98 03 ; RSVD
    7A 9E 10 ; RSVD
    7A A0 00 ; RSVD
    7A AF 06 ; set HDMI Mode
    7A BA E0 ; Input Video clk(negedge)
    7A CB 01 ; RSVD
    74 F5 F5 ; Power down DAC (Bus expander address may vary by board)
    56 00 13 ; Power down Encoder 
    End
    

    Writes to address 0x42 are ADV7181C writes