www.ti.com

WinVCC in Depth

8.5.1.2Command Files

The command file is a text file that can be generated using any common editor; however, it must be saved as plain text. Command files are especially useful for quickly switching between the various system configurations. 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 desired setups. 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 the TVP5154 decoder, 7311 encoder, and/or DM642 for a particular video mode. Each dataset includes a description that is displayed in one row of the dataset descriptions list. The register settings may be located in the command file itself and/or may be stored in separate include file(s) (with an .INC file extension) and be included into the command file using the INCLUDE statement.

8.5.1.3Example Command File

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 file INCLUDE, EncoderNTSC656_RTC.INC

//Program TVP5154 registers

WR_REG,VID_DEC,1,0x7F,0x00 // Reset 5154 microprocessor

WR_REG,VID_DEC,1,0x03,0x0D // Enable YCbCr outputs and syncs

WR_REG,VID_DEC,1,0x15,0x81 // Enable Stable Sync mode

WR_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. The maximum 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 Initialization dialog box when the command file is opened.

The INCLUDE command inserts the contents of an include file (with an .INC file extension) in-line in place 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 decoders VID_ENC for the video encoders THS8200 for the THS8200 device

WinVCC translates the device family mnemonic to the slave address that was selected in the WinVCC Configuration dialog box upon program startup. This eliminates having to edit command files if the alternate slave address must be used.

SLEU069A –February 2006 –Revised July 2006

TVP5154EVM User's Guide

19

Submit Documentation Feedback

Page 19
Image 19
Texas Instruments TVP5154EVM manual Command Files, Example Command File