Appendix D Closed Caption Pseudo Code
CX25870/871
Flicker-Free Video Encoder with Ultrascale Technology
Write CCR_START(CCR_START_hex);
//CCR_START[8:0] reg-
ister is
//comprised of bit[4]
of regis-
ter
//0xD4 and bits[7:0]
of
CX870/871
//register 0xD0
}
//Previous Initialization Code only needs to be performed once
by I2C master
//Closed Caption Encoding Operation
ReadBitArray[] = CX870ReadbackFxn(ESTATUS = 01);
//CCSTAT_O will be ReadBitArray[3] after this
function executes
Or
ReadBit = ReadCCSTAT_O();
//CX870/871 has full readback ability of all bits.
//No longer is it necessary to use legacy Bt869
method of reading //back status bits
if (ReadBitArray[3] == 0)
//alternative IF statement could be ‘if (ReadBit
== 0)’
{
//Closed Caption bytes for Field 1 = Odd Field
have already been //encoded and CCSTAT_O has been
cleared
Write CCF1B1(CCdatabyte1); //assumes CCdatabyte1
is in hex format
//already. Encode new
CC data.
Write CCF1B2(Ccdatabyte2); //assumes CCdatabyte2
is in hex format
//already. Encode new
CC data.
//data is not latched until second of the 2 byte data sequence
is written
//this prevents writing of partial data sequence
//for this reason, data must be written in order of Byte 1 and
then Byte 2
//CCSTAT_O will be automatically be set by the CX870/871 until
CC bytes for odd
//field = Field 1 have been encoded
}
else
D-4
Conexant
100381B