beautypg.com

Communication flow, Table 14, Invoke message in gmp231 i – Vaisala GMP231 User Manual

Page 54: C interface

background image

User's Guide _______________________________________________________________________

52 ___________________________________________________________________ M211501EN-C

Communication Flow

Basic communication flow always includes I

2

C write and read

commands. First the master writes a command to the slave device, and
then the master reads the results of that command from the slave.

When the master reads data from the slave, there is an ACK/NACK-bit in
the status byte that informs the master whether or not communication
was success. ACK is defined as zero and NACK is defined as one in the
logical level.

NOTE

This ACK/NACK refers to the message level acknowlegdement. I

2

C

protocol includes a separate byte level acknowledgement.


Command messages sent by the master are called invokes. Replies sent
by the slave are called responses. Note that also responses include the
device address.

Table 14

Invoke Message in GMP231 I

2

C Interface

Message Segment Length

Content

Start

I

2

C start condition.

I

2

C address

1 byte

See Table 12 on page 51.

Command

1 byte

Identifier of command.

Device address

1 byte

See Table 13 on page 51.

Frame length

1 byte

Length of invoke message in bytes
(excluding I

2

C address, including CRC).

Minimum invoke frame length is
5 bytes.

Data

Variable length Content and length depending on the

command. May be left out if the
command contains no data in the
invoke message.

Checksum

2 bytes

See section Checksum on page 56.

Stop

I

2

C stop condition