beautypg.com

2 command protocol on i – DekTec DTM-3200 IP-ASI Converter User Manual

Page 20

background image

DTM-3200 – OEM Ethernet TSoIP Converter

User Manual

20

Figure 6 below shows the structure of a command written through the serial interface. If the

command is a read-command, the data may be omitted. If the category does not require an index,

the index must be omitted.

Figure 6. Command on an RS-XXX serial control interface

All commands successfully sent to the DTM-3200 are answered with a copy of the command

including the data bytes.
When an incorrect checksum is detected, the DTM-3200 will not return an answer. When protocol

errors are detected, e.g. a combination of a valid category with an invalid setting, the R/W byte of

the reply is replaced with the ASCII character ‘E’ and the data is removed from the message.

4.2.2 Command protocol on I

2

C

Field

Format

Description

Start

S

Standard I

2

C start condition

Address

I

2

C address byte 7-bit I

2

C address followed by the I

2

C R/W bit, which is set to

0 and 1 in the command- and response sequence

respectively

Category

1 byte

Selects a “category” of settings

Setting

1 byte

Selects a setting within the selected category

Read/Write 1 byte

0x01 for read and 0x00 for write

Index

2 bytes

(Optional) Provides an extra index parameter, e.g. to

indicate the channel number

6

Data

n bytes

The data written or read. The data length is variable for

each setting. In case of a write operation, the actual data is

returned as a (negative) acknowledgement

Checksum

1 byte

This is the least significant byte of the two's complement of

the sum of the 7-bit I2C slave address and all data-bytes in

the I2C message (excluding the checksum). The I2C R/W bit

is not included, an incorrect value of this bit would cause the

checksum to be not received at all.

End

P

Standard I

2

C stop condition. A repeated start condition can

be used at all times to concatenate multiple I

2

C read / write

actions

6

The DTM-3200 supports a single channel only. Whenever index is used as a channel number, it shall/will be set to 0.