Post Go back to editing

How to use the VGA display use by auto graphic mode

Category: Software
Product Number: ADV7850
Software Version: 1

My flow below,

// Enter auto graphics mode.
I2C_Master_Transmit(0xA0 >> 1, 0x01, 0x02);
I2C_Master_Transmit(0xA0 >> 1, 0x00, 0x07);

// Generate the pixel clock.
iValue = 0x0898;
I2C_Master_Transmit(0xA0 >> 1, 0x16, (uint8_t)(((iValue >> 8) & 0x1F) | BIT7));
I2C_Master_Transmit(0xA0 >> 1, 0x17, (uint8_t)(iValue & 0xFF));

//Configure the expected free run line length.
iValue = 0x01A8;
I2C_Master_Transmit(0xA0 >> 1, 0x8F, (uint8_t)((iValue >> 8) & 0x07));
I2C_Master_Transmit(0xA0 >> 1, 0x90, (uint8_t)(iValue & 0xFF));

//Set the expected number of free run lines per field.
iValue = 1125;
I2C_Master_Transmit(0xA0 >> 1, 0xAB, (uint8_t)((iValue >> 4) & 0xFF));
I2C_Master_Transmit(0xA0 >> 1, 0xAC, (uint8_t)((iValue & 0x0F) << 4));

//Configure the interlaced or progressive parameter.
I2C_Master_Transmit(0x44 >> 1, 0x91, 0x80);

//Set input color space1
iValue = I2C_Master_Recieve(0xA0 >> 1, 0x02);
iValue &= ~0xF0;
iValue |= 0x70;
I2C_Master_Transmit(0xA0 >> 1, 0x02, iValue);

//9. Adjust digital clamping position2
iValue = 0x40;
I2C_Master_Transmit(0x44 >> 1, 0xC8, iValue >> 5);
iValue = I2C_Master_Recieve(0x44 >> 1, 0xC9);
iValue &= ~BIT6;
I2C_Master_Transmit(0x44 >> 1, 0xC9, iValue);
iValue = I2C_Master_Recieve(0x44 >> 1, 0xCA);
iValue &= ~0x0F;
I2C_Master_Transmit(0x44 >> 1, 0xCA, iValue);

I want to use auto mode to output 1920x1080 resolution(1080P).

Also I refer to example 3 in the file 4251.ADV7844_ADV7842_Autographics_Pr0_031109-1.pdf.

But it's not working, what steps am I missing?

Thank you.

Parents Reply Children
  • Hi,

      Today we evaluated the '1920x1080p' resolution in our ADV7850 evaluation board & It is working fine with below connection setup,

         VG-804B (Source) ---> ADV7850 Evaluation board --> VA-1842 Analyzer (Sink).

      If required, Please let me know i will share our UART log for your reference.

      Could you please check our Software driver for VGA configuration for non-standard mode.

      Now We are trying to configure the register for 1080p according to "ADV7842_Autographics_Pr0_031109-1.pdf"

    Thanks,

    Poornima

  • Hi,

    Could you please do the below configuration for 1080p standard and let us know the update,

    // 1920x1080@60 RGB in_ 444 24bit H_V_DE DVI:
    40 FF 80 ; I2C reset
    40 F1 90 ; SDP map
    40 F2 94 ; SDPIO map
    40 F3 84 ; AVLINK
    40 F4 80 ; CEC
    40 F5 7C ; INFOFRAME
    40 F8 4C ; AFE
    40 F9 64 ; KSV
    40 FA 6C ; EDID
    40 FB 68 ; HDMI
    40 FD 44 ; CP
    40 FE 48 ; VDP
    40 00 07 ; autographics
    40 01 82 ; Prim_Mode to graphics input
    40 02 F6 ; Auto input color space, Limited Range RGB Output
    40 03 40 ; 24 bit SDR 444
    40 05 28 ; Disable AV Codes
    40 0C 40 ; Power up Part
    40 15 B0 ; Disable Tristate of Pins except for Audio pins
    40 16 C8 ; manual PLL setting
    40 17 98 ; manual PLL setting
    40 19 80 ; enable LLC DLL
    40 33 40 ; select DLL for LLC clock
    44 73 EA ; Set manual gain of 0x2A8
    44 74 8A ; Set manual gain of 0x2A8
    44 75 A2 ; Set manual gain of 0x2A8
    44 76 A8 ; Set manual gain of 0x2A8
    44 7C C0 ; START HS (part)
    44 7E  00 ; START HS
    44 7C C3 ; END HS (part)
    44 7D FF ; END HS
    44 85 0B ; Disable Autodetectmode for Sync_Source for CH1. Force CH1 to use HS&VS
    44 8B 4F ; DE H END (part)
    44 8C ED ; DE H END
    44 8B 4F ; DE H START (part)
    44 8D 20 ; DE H START
    44 8F 41 ; FR_LL (part)
    44 90 A8 ; FR_LL
    44 91 00 ; Set to progressive mode
    44 AB 46 ; LCOUNT for STDI CH1
    44 AC 50 ; LCOUNT for STDI CH1 (part)
    44 A5 46 ; NOM START VBI
    44 A6 20 ; NOM START VBI (part) NOM END VBI (part)
    44 A7 2A ; NOM END VBI
    44 BE 02 ; HCOUNT ALIGN ADJ
    44 BF 32 ; HCOUNT ALIGN ADJ
    44 C3 39 ; ADI recommended write
    4C 0C 1F ; ADI recommended write
    4C 12 63 ; ADI recommended write
    4C 00 80 ; ADC power Up
    4C 02 00 ; Ain_Sel to 000. (Ain 1,2,3)
    4C C8 33 ; DLL Phase, 110011b
    End

    Thanks,

    Poornima

  • Hi,

    Could you please change example configuration to RGB 32bit because our MB not support RGB 24bit.

    Thanks.

  • We need to use the ADV7850 to support all the resolution settings in the figure below.

  • FormerMember
    0 FormerMember
on Sep 14, 2023 12:11 PM in reply to IvanLee

Hi,

There are only 24, 30 and 36 bit color modes not any 32 bit color modes unless you are talking about ARGB colors in the code.

It is possible to do 24 bit YCbCr 422 with 12 bit depth but I don't think you are talking about this since you mentioned RGB

Besides the ADV7850 only handles analog or HDMI streams, not any digital streams.  

Please clarify the question.

  • Hi Poornima,

    I tried this process, I couldn't output the screen.

    The flow below,

    I2C_Master_Transmit(0x40>>1,0xFF,0x80); //I2C reset
    Delay_ms(10);
    I2C_Master_Transmit(0x40>>1,0xF1,0x90); //SDP map
    I2C_Master_Transmit(0x40>>1,0xF2,0x94); //SDPIO map
    I2C_Master_Transmit(0x40>>1,0xF3,0x84); //AVLINK
    I2C_Master_Transmit(0x40>>1,0xF4,0x80); //CEC
    I2C_Master_Transmit(0x40>>1,0xF5,0x7C); //INFOFRAME
    I2C_Master_Transmit(0x40>>1,0xF8,0x4C); //AFE
    I2C_Master_Transmit(0x40>>1,0xF9,0x64); //KSV
    I2C_Master_Transmit(0x40>>1,0xFA,0x6C); //EDID
    I2C_Master_Transmit(0x40>>1,0xFB,0x68); //HDMI
    I2C_Master_Transmit(0x40>>1,0xFD,0x44); //CP
    I2C_Master_Transmit(0x40>>1,0xFE,0x48); //VDP
    I2C_Master_Transmit(0x40>>1,0x00,0x07); //autographics
    I2C_Master_Transmit(0x40>>1,0x01,0x82); //Prim_Mode to graphics input
    I2C_Master_Transmit(0x40>>1,0x02,0xF6); //Auto input color space, Limited Range RGB Output
    I2C_Master_Transmit(0x40>>1,0x03,0x40); //24 bit SDR 444
    I2C_Master_Transmit(0x40>>1,0x05,0x28); //Disable AV Codes
    I2C_Master_Transmit(0x40>>1,0x0C,0x40); //Power up Part
    I2C_Master_Transmit(0x40>>1,0x15,0xB0); //Disable Tristate of Pins except for Audio pins
    I2C_Master_Transmit(0x40>>1,0x16,0xC8); //manual PLL setting
    I2C_Master_Transmit(0x40>>1,0x17,0x98); //manual PLL setting
    I2C_Master_Transmit(0x40>>1,0x19,0x80); //enable LLC DLL
    I2C_Master_Transmit(0x40>>1,0x33,0x40); //select DLL for LLC clock
    I2C_Master_Transmit(0x44>>1,0x73,0xEA); //Set manual gain of 0x2A8
    I2C_Master_Transmit(0x44>>1,0x74,0x8A); //Set manual gain of 0x2A8
    I2C_Master_Transmit(0x44>>1,0x75,0xA2); //Set manual gain of 0x2A8
    I2C_Master_Transmit(0x44>>1,0x76,0xA8); //Set manual gain of 0x2A8
    I2C_Master_Transmit(0x44>>1,0x7C,0xC0); //START HS (part)
    I2C_Master_Transmit(0x44>>1,0x7E,0x00); //START HS
    I2C_Master_Transmit(0x44>>1,0x7C,0xC3); //END HS (part)
    I2C_Master_Transmit(0x44>>1,0x7D,0xFF); //END HS
    I2C_Master_Transmit(0x44>>1,0x85,0x0B); //Disable Autodetectmode for Sync_Source for CH1. Force CH1 to use HS&VS
    I2C_Master_Transmit(0x44>>1,0x8B,0x4F); //DE H END (part)
    I2C_Master_Transmit(0x44>>1,0x8C,0xED); //DE H END
    I2C_Master_Transmit(0x44>>1,0x8B,0x4F); //DE H START (part)
    I2C_Master_Transmit(0x44>>1,0x8D,0x20); //DE H START
    I2C_Master_Transmit(0x44>>1,0x8F,0x41); //FR_LL (part)
    I2C_Master_Transmit(0x44>>1,0x90,0xA8); //FR_LL
    I2C_Master_Transmit(0x44>>1,0x91,0x00); //Set to progressive mode
    I2C_Master_Transmit(0x44>>1,0xAB,0x46); //LCOUNT for STDI CH1
    I2C_Master_Transmit(0x44>>1,0xAC,0x50); //LCOUNT for STDI CH1 (part)
    I2C_Master_Transmit(0x44>>1,0xA5,0x46); //NOM START VBI
    I2C_Master_Transmit(0x44>>1,0xA6,0x20); //NOM START VBI (part) NOM END VBI (part)
    I2C_Master_Transmit(0x44>>1,0xA7,0x2A); //NOM END VBI
    I2C_Master_Transmit(0x44>>1,0xBE,0x02); //HCOUNT ALIGN ADJ
    I2C_Master_Transmit(0x44>>1,0xBF,0x32); //HCOUNT ALIGN ADJ
    I2C_Master_Transmit(0x44>>1,0xC3,0x39); //ADI recommended write
    I2C_Master_Transmit(0x4C>>1,0x0C,0x1F); //ADI recommended write
    I2C_Master_Transmit(0x4C>>1,0x12,0x63); //ADI recommended write
    I2C_Master_Transmit(0x4C>>1,0x00,0x80); //ADC power Up
    I2C_Master_Transmit(0x4C>>1,0x02,0x00); //Ain_Sel to 000. (Ain 1,2,3)
    I2C_Master_Transmit(0x4C>>1,0xC8,0x33); //DLL Phase, 110011b

  • Hi,

      Please check with below configuration and let us know about it,

    40 FF 80 ; I2C reset

    40 1B 80 ; Tx I2C reset

    40 EC A0 ; VFE map

    40 EB A8 ; Xmem_gamma map

    40 E7 5C ; Audio Codec map

    40 F1 90 ; SDP map

    40 F2 94 ; SDPIO map

    40 F3 84 ; AVLINK

    40 F4 80 ; CEC

    40 F5 7C ; INFOFRAME

    40 F8 4C ; AFE

    40 F9 64 ; KSV

    40 FA 6C ; EDID

    40 FB 68 ; HDMI

    40 FD 44 ; CP

    40 FE 48 ; VDP

    40 E3 92 ; ADI recommended write

    A0 05 28 ; Disable AV Codes

    40 0C 40 ; Power up Part

    40 14 3F ; Max Drive Strength

    40 15 B0 ; Disable Tristate of Pins except for Audio pins

    A0 00 07 ; VID_STD=01000b for VGA60

    A0 01 02 ; Prim_Mode to graphics input

    A0 02 F7 ; Input color space (YPbPr -709 Full Range)

    44 73 EA ; Set manual gain of 0x2A8

    44 74 8A ; Set manual gain of 0x2A8

    44 75 A2 ; Set manual gain of 0x2A8

    44 76 A8 ; Set manual gain of 0x2A8

    44 85 0B ; Disable Autodetectmode for Sync_Source for CH1. Force CH1 to use HS&VS

    44 C3 39 ; ADI recommended write

    40 16 C8 ; manual PLL setting

    40 17 98 ; manual PLL setting

    44 8F 41 ; FR_LL (part)

    44 90 A8 ; FR_LL

    44 91 00 ; Set to progressive mode

    44 AB 46 ; LCOUNT for STDI CH1

    44 AC 50 ; LCOUNT for STDI CH1 (part)

    4C C8 40 ; DLL Phase, 110011b

    4C 00 00 ; ADC power Up

    4C 02 00 ; Ain_Sel to 000. (Ain 1,2,3)

    B8 41 10 ; Power up all circuits

    B8 01 00 ; N[19:0] Set N Value(6144) used for Audio 48kHz

    B8 02 18 ; N[19:0] Set N Value(6144) used for Audio 48kHz

    B8 03 00 ; N[19:0] Set N Value(6144) used for Audio 48kHz

    B8 13 FF ; CS Category code - not defined - 111 XXXXL

    B8 15 20 ; CS I2S Fs - I2S_SF[3:0] - 0010b - Fs = 48KHz VFE_input_id[3:0] - 0000b = 24-bit 444 YPrPb/RGB input separate syncs

    B8 16 61 ; VFE_out_fmt[1:0] = 01b - YCrCb 444 output,VFE_width[1:0] = 10b - 12 bit per ch Input Style 00b VFE_input_cs = 1b - YCrCb input

    B8 3B C0 ; Manual VIC =0x00

    B8 40 80 ; GC_pkt_en = 1b,General Control packet enable

    B8 4C 04 ; GC_CD[3:0] = 0110b - 24 bits per pixel Output

    B8 55 00 ; Y1Y0[1:0] - 10b - Set RGB 444 in AVinfo Frame

    B8 56 08 ; R[3:0] = 1000b - Set active format Aspect - same as aspect ratio

    B8 96 20 ; HPD_INT = 0b HPD Interrupt clear VSYNC_INT = 1b - Vsync interrupt active

    B8 AF 96 ; HDMI_MODE_SEL = 1b - Set HDMI Mode (DVI by default)

    B8 BA 70 ; ADI Recommended write

    B8 D0 44 ; ADI Recommended write

    B8 D1 3C ; ADI Recommended write

    B8 D3 07 ; ADI Recommended write

    B8 D6 02 ; ADI Recommended write

    B8 DB 0B ; ADI recommended write

    B8 E1 FC ; ADI Recommended write

    B8 E3 D0 ; ADI Recommended write

    B8 E8 F0 ; ADI Recommended write

    B8 E9 1C ; ADI Recommended write

    B8 EA 85 ; ADI Recommended write

    B8 EC 7C ; ADI Recommended write

    B8 ED 40 ; ADI Recommended write

    B8 EE 40 ; ADI Recommended write

    B8 EF 45 ; ADI Recommended write

    B8 F3 01 ; ADI Recommended write

    B8 F5 CC ; ADI Recommended write

    B8 F6 08 ; ADI Recommended write

    92 24 43 ; Clock delay adjust

    40 E3 00 ; ADI recommended write

    End

    Thanks,

    Poornima

  • Hi Poornima,

    The result with configuration_1 below:

    The result with configuration_2 below:

    The display results are different, but there are still no normal output screen.

    Thanks.

    I2C_Master_Transmit(0x40>>1,0xFF,0x80); //I2C reset
    Delay_ms(10);
    I2C_Master_Transmit(0x40>>1,0x1B,0x80); //Tx I2C reset
    Delay_ms(10);
    I2C_Master_Transmit(0x40>>1,0xEC,0xA0); //VFE map
    I2C_Master_Transmit(0x40>>1,0xEB,0xA8); //Xmem_gamma map
    I2C_Master_Transmit(0x40>>1,0xE7,0x5C); //Audio Codec map
    I2C_Master_Transmit(0x40>>1,0xE7,0x5C); //Audio Codec map
    I2C_Master_Transmit(0x40>>1,0xF1,0x90); //SDP map
    I2C_Master_Transmit(0x40>>1,0xF2,0x94); //SDPIO map
    I2C_Master_Transmit(0x40>>1,0xF3,0x84); //AVLINK
    I2C_Master_Transmit(0x40>>1,0xF4,0x80); //CEC
    I2C_Master_Transmit(0x40>>1,0xF5,0x7C); //INFOFRAME
    I2C_Master_Transmit(0x40>>1,0xF8,0x4C); //AFE
    I2C_Master_Transmit(0x40>>1,0xF9,0x64); //KSV
    I2C_Master_Transmit(0x40>>1,0xFA,0x6C); //EDID
    I2C_Master_Transmit(0x40>>1,0xFB,0x68); //HDMI
    I2C_Master_Transmit(0x40>>1,0xFD,0x44); //CP
    I2C_Master_Transmit(0x40>>1,0xFE,0x48); //VDP
    I2C_Master_Transmit(0x40>>1,0xE3,0x92); //ADI recommended write
    I2C_Master_Transmit(0xA0>>1,0x05,0x28); //Disable AV Codes
    I2C_Master_Transmit(0x40>>1,0x0C,0x40); //Power up Part
    I2C_Master_Transmit(0x40>>1,0x14,0x3F); //Max Drive Strength
    I2C_Master_Transmit(0x40>>1,0x15,0xB0); //Disable Tristate of Pins except for Audio pins
    I2C_Master_Transmit(0xA0>>1,0x00,0x07); //VID_STD=01000b for VGA60
    I2C_Master_Transmit(0xA0>>1,0x01,0x02); //Prim_Mode to graphics input
    I2C_Master_Transmit(0xA0>>1,0x02,0xF7); //Input color space (YPbPr -709 Full Range)
    I2C_Master_Transmit(0x44>>1,0x73,0xEA); //Set manual gain of 0x2A8
    I2C_Master_Transmit(0x44>>1,0x74,0x8A); //Set manual gain of 0x2A8
    I2C_Master_Transmit(0x44>>1,0x75,0xA2); //Set manual gain of 0x2A8
    I2C_Master_Transmit(0x44>>1,0x76,0xA8); //Set manual gain of 0x2A8
    I2C_Master_Transmit(0x44>>1,0x85,0x0B); //Disable Autodetectmode for Sync_Source for CH1. Force CH1 to use HS&VS
    I2C_Master_Transmit(0x44>>1,0xC3,0x39); //ADI recommended write
    I2C_Master_Transmit(0x40>>1,0x16,0xC8); //manual PLL setting
    I2C_Master_Transmit(0x40>>1,0x17,0x98); //manual PLL setting
    I2C_Master_Transmit(0x44>>1,0x8F,0x41); //FR_LL (part)
    I2C_Master_Transmit(0x44>>1,0x90,0xA8); //FR_LL
    I2C_Master_Transmit(0x44>>1,0x91,0x00); //Set to progressive mode
    I2C_Master_Transmit(0x44>>1,0xAB,0x46); //LCOUNT for STDI CH1
    I2C_Master_Transmit(0x44>>1,0xAC,0x50); //LCOUNT for STDI CH1 (part)
    I2C_Master_Transmit(0x4C>>1,0xC8,0x40); //DLL Phase, 110011b
    I2C_Master_Transmit(0x4C>>1,0x00,0x00); //ADC power Up
    I2C_Master_Transmit(0x4C>>1,0x02,0x00); //Ain_Sel to 000. (Ain 1,2,3)
    I2C_Master_Transmit(0xB8>>1,0x41,0x10); //Power up all circuits
    I2C_Master_Transmit(0xB8>>1,0x01,0x00); //N[19:0] Set N Value(6144) used for Audio 48kHz
    I2C_Master_Transmit(0xB8>>1,0x02,0x18); //N[19:0] Set N Value(6144) used for Audio 48kHz
    I2C_Master_Transmit(0xB8>>1,0x03,0x00); //N[19:0] Set N Value(6144) used for Audio 48kHz
    I2C_Master_Transmit(0xB8>>1,0x13,0xFF); //CS Category code - not defined - 111 XXXXL
    I2C_Master_Transmit(0xB8>>1,0x15,0x20); //CS I2S Fs - I2S_SF[3:0] - 0010b - Fs = 48KHz VFE_input_id[3:0] - 0000b = 24-bit 444 YPrPb/RGB input separate syncs
    I2C_Master_Transmit(0xB8>>1,0x16,0x61); //VFE_out_fmt[1:0] = 01b - YCrCb 444 output,VFE_width[1:0] = 10b - 12 bit per ch Input Style 00b VFE_input_cs = 1b - YCrCb input
    I2C_Master_Transmit(0xB8>>1,0x3B,0xC0); //Manual VIC =0x00
    I2C_Master_Transmit(0xB8>>1,0x40,0x80); //GC_pkt_en = 1b,General Control packet enable
    I2C_Master_Transmit(0xB8>>1,0x4C,0x04); //GC_CD[3:0] = 0110b - 24 bits per pixel Output
    I2C_Master_Transmit(0xB8>>1,0x55,0x00); //Y1Y0[1:0] - 10b - Set RGB 444 in AVinfo Frame
    I2C_Master_Transmit(0xB8>>1,0x56,0x08); //R[3:0] = 1000b - Set active format Aspect - same as aspect ratio
    I2C_Master_Transmit(0xB8>>1,0x96,0x20); //HPD_INT = 0b HPD Interrupt clear VSYNC_INT = 1b - Vsync interrupt active
    I2C_Master_Transmit(0xB8>>1,0xAF,0x96); //HDMI_MODE_SEL = 1b - Set HDMI Mode (DVI by default)
    I2C_Master_Transmit(0xB8>>1,0xBA,0x70); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xD0,0x44); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xD1,0x3C); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xD3,0x07); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xD6,0x02); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xDB,0x0B); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xE1,0xFC); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xE3,0xD0); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xE8,0xF0); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xE9,0x1C); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xEA,0x85); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xEC,0x7C); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xED,0x40); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xEE,0x40); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xEF,0x45); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xF3,0x01); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xF5,0xCC); //ADI Recommended write
    I2C_Master_Transmit(0xB8>>1,0xF6,0x08); //ADI Recommended write
    I2C_Master_Transmit(0x92>>1,0x24,0x43); //Clock delay adjust
    I2C_Master_Transmit(0x40>>1,0xE3,0x00); //ADI recommended write

  • Hi,

       We have given the configuration as per Autographic document ("1080p Component. 1920 X 1080 Active Pixels. 2200 X 1125 Total Pixel. Pixel clock = 148.5MHz").

       Could you please check with our ADV7850 evaluation board.

       Else request our source code project for the EVAL-ADV7850EBZ here & Compare your configuration with our software driver.

    Thanks,

    Poornima

  • Hi,

    We have got the ADV7850 EVM board.

    So, how can I verify the Auto Graphic Mode function?

    I use the sw AVESBlue below:

    How to use auto graphic mode with ADV7850 EVM board?