
8.5.1.2 Command Files
8.5.1.3 Example Command File
WinVCC in Depth
The command file is a text file that can be generated using any common editor; however, it must be savedas plain text. Command files are especially useful for quickly switching between the various systemconfigurations. These .CMD files are unrelated to the typical Windows .CMD files.
A default command file is provided on the CD. This command file contains many examples of the desiredsetups. This command file is located at:
c:\Program Files\Texas Instruments\TVP5154EVM\Initialization\
A command file can contain up to 250 datasets. A dataset is a set of register settings to initialize theTVP5154 decoder, 7311 encoder, and/or DM642 for a particular video mode. Each dataset includes adescription that is displayed in one row of the dataset descriptions list. The register settings may belocated in the command file itself and/or may be stored in separate include file(s) (with an .INC fileextension) and be included into the command file using the INCLUDE statement.
An example of one dataset within a command file is shown below.BEGIN_DATASET
DATASET_NAME,”TVP5154, Auto–switch, Stable Sync, Fast-lock, 656 Out”// Initialize video encoder using an include fileINCLUDE, EncoderNTSC656_RTC.INC
// Program TVP5154 registersWR_REG,VID_DEC,1,0x7F,0x00 // Reset 5154 microprocessorWR_REG,VID_DEC,1,0x03,0x0D // Enable YCbCr outputs and syncsWR_REG,VID_DEC,1,0x15,0x81 // Enable Stable Sync modeWR_REG,VID_DEC,1,0x02,0x80 // Enable Fast-lock mode
END_DATASET
Each command file may contain individual write-to-register (WR_REG) commands.•The comment indicator is the double-slash //.•The command file is not case sensitive and ignores all white-space characters.•All numbers can be entered as hexadecimal (beginning with 0x) or as decimal.•Every dataset in a command file begins with BEGIN_DATASET and ends with END_DATASET. Themaximum number of datasets is 250.•The dataset text description is entered between double quotes using the DATASET_NAME command.The enclosed text can be up to 128 characters in length. This text appears in the System Initializationdialog box when the command file is opened.•The INCLUDE command inserts the contents of an include file (with an .INC file extension) in-line inplace of the INCLUDE command. Therefore, the include file must not contain the BEGIN_DATASET,END_DATASET, and DATASET_NAME commands.
Note: All included files must be located in the same directory as the command (CMD) file.
•The write-to-register command is written as:WR_REG, <DeviceFamily>, <Number of data bytes (N)>, <subaddress>, <Data1>, …, <DataN>or
WR_REG, <Literal slave address>, <Number of data bytes (N)>, <subaddress>, <Data1>, …, <DataN>The valid device family mnemonics are:VID_DEC for the video decodersVID_ENC for the video encodersTHS8200 for the THS8200 deviceWinVCC translates the device family mnemonic to the slave address that was selected in the WinVCCConfiguration dialog box upon program startup. This eliminates having to edit command files if thealternate slave address must be used.
SLEU069A – February 2006 – Revised July 2006 TVP5154EVM User's Guide 19Submit Documentation Feedback