beautypg.com

Examples of communication flow, Ma st er sl ave – Vaisala HMM105 User Manual

Page 9

background image

Chapter 2 _______________________________________________________________ I2C Interface

VAISALA _____________________________________________________________________ 7

Examples of Communication Flow

The basic data transfer communication flows are presented in the

following figures. Each arrow represents an I

2

C read or write operation

The examples are simplified presentations. For actual message content,

see section Commandson page 11.

For example, Figure 3 below shows the following message sequence:

1.

The master invokes the Get_Parameter command to read the RH

parameter using an I

2

C write operation. This command prepares the

slave to wait for a read operation from the master.

2.

The master begins an I

2

C read operation to read the results of the

Get_Parameter RH command. The slave sends the requested RH

result and an ACK signal to the master.

1401-020

Figure 3

Get_Parameter with ACK

1401-032

Figure 4

Set_Parameter with ACK

Ma

st

er

Sl

ave

Get_Parameter,RH_ID

I2C write

Get_Parameter,RH_ID,54.32, ACK

I2C read

Ma

st

er

Sl

ave

Set_Parameter,Pressure_ID,1013.25

I2C Write

Set_Parameter,Pressure_ID,ACK

I2C Read