Typical optical attenuator control example – VXI SM8000 User Manual

Page 58

Advertising
background image

VXI Technology, Inc.

58

SM8000 Series Programming

T

YPICAL

O

PTICAL

A

TTENUATOR

C

ONTROL

E

XAMPLE

The optical attenuator modules are controlled via an I

2

C bus interface. The bus protocol requires

the transmission of the following:

• a Module Address
• a Command Byte
• the number of bytes to send
• the number of bytes to receive
• the proper data byte(s) that are to be written to, or received from, the optical module (the

command byte(s)).


The following sequence should be used to control the modules:

Write

1. Load the Address Register with the module’s address. The default address of the modules as

shipped from the factory is 73 => 49h. (This step may be skipped, see Address Register
description.)


2. Load the Command Register with the number of bytes to be received plus 1, the number of

bytes to be sent, and the proper command.


3. Write/Read the appropriate Relay Register 02 through 08 depending on the module being

controlled.



Read

1. Load the Address Register with the module’s address. The default address of the modules as

shipped from the factory is 73 => 49h. (This step may be skipped, see Address Register
description.)


2. Load the Command Register with the number of bytes to be received plus 1, the number of

bytes to be sent, and the proper command (a query command).


3. Write/Read the appropriate Relay Register 02 through 08 depending on the module being

queried (write a “0”, the data is ignored).


4. Read the appropriate Relay Register 0A through 0C depending on the number of bytes that

are to be received from the module being queried. See Attenuator Command Set.



Note

These read back registers are common to all four of the possible attenuator modules that may be

installed. A subsequent write to any of the Relay Registers 02 through 08 will corrupt these registers.



Advertising