Post Go back to editing

ADV7842: Changing DE_H_START and START_HS has no effect on the output video signal

Category: Hardware
Product Number: ADV7842

Hi, I'm using an ADV7842 to convert an analog video input into digital output.  The analog signal is a test pattern from an Extron VTG 400.  When going from the VTG 400 to the VGA input of a monitor, the test pattern is properly displayed as shown immediately below:

When going from the VTG 400 to the ADV7842 and then out of the ADV7842 to the DVI input of the same monitor the output looks like this:

I'm trying to fix this by adjusting DE H/V start/end and HSync start/end by adjusting the following CP registers of the ADV7842:

  • DE_H_START: Address 0x8B [3:2]; Address 0x8D [7:0]
  • DE_H_END: Address 0x8B [1:0]; Address 0x8C [7:0]
  • DE_V_START Address 0x8E [7:4]
  • DE_V_END Address 0x8E [3:0]
  • START_HS: Address 0x7C[3:2]; Address 0x7E[7:0]
  • END_HS: Address 0x7C[1:0]; Address 0x7D[7:0]

I have the ADV7842 DE, HSync and VSync output signals hooked up to a scope.

When I adjust DE_H_END, I see the falling edge of the DE signal change as shown below, however, when I adjust DE_H_START, there is no change in the DE signal.  Here is a picture to explain:

Similarly, when I adjust END_HS, the falling edge of the HSYNC square wave will change position, causing the width of the square wave to increase/decrease but changing the START_HS value has no effect.

I've double checked the firmware and it is indeed changing the values of the DE_H_START and START_HS.  I confirmed by reading back the values of the registers after writing to them.

Any suggestions as to why modifying these registers is having no effect on the output would be greatly appreciated.  Thank you.

  • Answering my own question: I had been updating all six registers at once.  It appears that you have to update the register containing the high bits and then the very next write needs to be the register with the low bits for the update to take place.

    For example, to update both DE_H_START and DE_H_END, one must do the following:

    I2CWriteByteToReg(I2C_ADDR_CP, 0x8B, newData[0]);
    I2CWriteByteToReg(I2C_ADDR_CP, 0x8C, newData[1]);
    I2CWriteByteToReg(I2C_ADDR_CP, 0x8B, newData[0]);
    I2CWriteByteToReg(I2C_ADDR_CP, 0x8D, newData[2]);

    ...even tho the second write to the 0x8B register is the same data as before. 

    What I had been doing was this:

    I2CWriteByteToReg(I2C_ADDR_CP, 0x8B, newData[0]);
    I2CWriteByteToReg(I2C_ADDR_CP, 0x8C, newData[1]);
    I2CWriteByteToReg(I2C_ADDR_CP, 0x8D, newData[2]);

    ...which was failing to cause a change to the DE_H_START even though the values I write to the registers end up being the same regardless of which code block from above I run.

    This seems to be a very confusing way to implement this in the chip.  Does the datasheet point this out anywhere?  Did I just miss this?

  • Hi Terence,
    Thank you for the information. Kindly provide the following details for our analysis:
    1.Please share all the register values configured on the ADV7842.
    2.What is the input resolution?
    3.How many black pixels are present in the image on the screen?
    4.Please verify the output by enabling Free Run mode on the ADV7842.
    5.Please confirm whether the I2P process is enabled or disabled.

    Thanks,
    Ebin