User manual

MCP4728 Evaluation Board User’s Guide
DS51837A-page 16 © 2009 Microchip Technology Inc.
1.3.2.4 EXAMPLE 2: SELECTING GAIN OF EACH DAC CHANNEL
You can select the Gain of each channel individually. Figure 1-11 shows an example of
writing a new script file on the PICkit Serial PC GUI for selecting the gain option. In this
example, Gain of 1 is selected.
.
FIGURE 1-11: Writing Script file to select V
REF
of each DAC channel. In this example, Gain of 1 is
selected for all DAC channels.
Parameters in the Script Detail column:
1. To change value:
Click this box and
type a new value
2. To delete or Insert box:
Select the box and
right click the mouse
button for options
available
3. Make sure the listed
parameters in “script
Detail” are in the exact
order as shown here.
Script Detail
I2CSTART *
I2CWRTBYT *
02 -----> This means there are two bytes to send.
C0 -----> Address byte = 1100-0000 (See Note).
C0 ---- > Selecting the gain of each channel
I2CSTOP *
(0: Gain of 1, 1: gain of 2)
Note: All parameters above must be listed in order. The parameter above with *
are not modifiable. The MCP4728 device on the evaluation board has I
2
C
address bits (A2, A1, A0) = (0,0,0).