beautypg.com

Ocean Optics Ocean View Install User Manual

Page 33

background image

3: User Interface

000-20000-310-02-201312

25

Procedure

6. Determine if you will be using a particular pin as an input or an output.

Output -- If you are using the pin to control an external device (i.e., to turn a lamp on and

off) or you plan to read the voltage of the pin with an external device (like a volt meter), then
you are using the pin as an output. Check the Out? box to set that pin into output mode.

Input -- If you are going to supply a voltage to the pin using an external source (like a

signal generator) or you plan on using the voltage on the pin to monitor the high/low state of
an external device (like the on/off state of an electronic shutter), then you are using the pin as
an input. Uncheck the Out? box to set that pin into input mode.

7. If you have determined that the pin will be used as an output, then you need to decide if you will

be using the pin’s alternative (or alt) function to monitor internal device characteristics. Using the
device’s data sheet, you can determine the alt function of any of the GPIO pins. On a USB2000+
spectrometer, for example, GPIO-1 outputs the spectrometer’s master clock when its alt function
is enabled. In the alt output configuration, monitoring this pin using an oscilloscope should show
a 48 MHz signal. Some pins on certain devices may not have any associated alt function.

8. If you need to monitor any of the internal device characteristics, check the Alt? box for the

appropriate GPIO pin. If the Alt? box is left unchecked, then you may manually toggle the output
state of the pin using the Value control. Checking this box will raise the GPIO pin to a high state
that outputs a fixed voltage. Leaving the Value box unchecked will cause the device to output a
low signal, or 0 volts (relative to the ground pin).

--OR--

9. If the pin is to be used as an input, the Value box will act as an indicator rather than a control. If

the voltage applied to the pin by an external source is above the threshold value, then the Value
box in the GPIO table will register a check mark. If the voltage applied to the pin below the
threshold value, then the Value box will not register a check mark.

Note

In Schematic View in the Output Control (Output Control) node, the GPIO table consists of three separate
rows of controls for each GPIO pin in the device: output value, output enable, and alt function. There are
two columns for each row:

- Latest Value -- contains the control/indicator check box

- Data Input -- allows you to choose how the check box will be controlled.

Before using GPIO in the Output Control (Output Control) node, make sure that the GPIO feature in the
Acquisition Parameter Controls panel has been disabled.

The controls perform the same functions as their counterparts in the Acquisition Parameter Controls panel.
The main difference is that the check box state for any row in the table can be controlled manually or by a
scalar node in the schematic diagram. A positive value from the scalar node enables the check box, whereas
a negative value disables the check box.

To have a node in the software control the state of a check box, wire a scalar-producing node into the
output control node. This can be a static scalar (like a Constant (Const) node) or a dynamic scalar (like a
Running Average (RunAvg) node). Once the scalar node is wired into the Output Control, use the drop-
down menu in the Data Input column to select the appropriate control for that row in the GPIO table. If the
drop-down menu is left blank, the check box will be controlled manually.