This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TVP5154 I2C

Other Parts Discussed in Thread: TVP5154

 Todd,
Have a look at the attached captures. I have to program the 0x03 register twice in order to get video out and I don't seem to be able to read back from the register (or from any of them).
I am able to read and write from the encoder that is on the same I2C network.

The sequence of writes is 0xBE, 0x03, 0x0D  then 0xBE, 0x03  then 0xBF, 0xFF.  The last byte of 0xFF should change to the contents of the register 0x03 but it just reads back 0x00 (according to the waveform).

Ideas?


 

  • Hello Patrick,

    The timing for your I2C look right to me.  The TVP5154 has 4 decoders.  To read/write to the TVP5154, the register FEh and FFh have to be written to before read/write.  For example:

    To write to all 4 decoders register 03h value XXh and 15h value YYh , read back 03h of decoder 1, then write ZZh to register 15h of decoder 1:

    write 0Fh to FEh            //select 4 decoders to write

    write XXh to 03

    write YY to 15h

    write 01h to FFh           //select decoder 1 to read

    read register 03h

    write 01h to FEh            //select decoder 1 to write

    write ZZh to 15h

    Hope this help.

    Regards,

    Viet

     

  • Hi Viet,

    It's not stated above, but the assumption is that the device sub-address is written after the device address.  For example, if I was writing 11h to register 03h, it would be:

    I2C data sent as:  TVP Device address, TVP Device sub-address, Register Address, Register Data

    OR

    BEh   0Fh   03h   11h

     

    Thanks, Todd 

  • Hi Todd,

    According to the TVP5154 data sheet in Sect. 5, the I2C write operation should be: BEh, 03h, 11h.  Please double check the data sheet for detail.  I don't know what is subaddress 0Fh in here.

    Regards,

    Viet

  • Viet,

    Sorry, I misunderstood the decoder sub-address from your previous response.  I thought the decoder sub-address had to be included along with the device address for each  read/write command.  After reviewing, I see that the decoder sub-address is really just another register you need to first set up to tell the device which decoder(s) you're selecting before you read/write to a specific register on that decoder. 

    Thanks for the help, Todd

  • Todd,

    Master              Slave

    Start

    BE                    Ack                  //TVP5154 slave addr + W

    FE                    Ack                  //Address of Write Enables register

    0F                    Ack                  //Enable writes to all 4 decoders

    Stop

     

    Start

    BE                    Ack                  //TVP5154 slave addr + W

    03                     Ack                  //Address of Register 0x03

    11                     Ack                  //Data to write to register 0x03

    Stop

    If you do any I2C read, which requires the I2C read enables to be set (address 0xFF) register 0xFE

    will get cleared so the first sequence above would need to be repeated to do writes again.

    Regards,

    Viet