Examples Using the DS3930 as Voltage References and Digital I/O
Abstract: The DS3930 contains six 256-position nonvolatile potentiometers, which makes the DS3930 an ideal device for applications needing multiple voltage references.
The DS3930 also has four general-purpose, nonvolatile I/O pins that can monitor a digital input or supply a digital output.
This application note provides examples using the DS3930 as a voltage reference and digital I/O.
Introduction
The DS3930 contains six 256-position nonvolatile (NV) potentiometers (see Figure 1), which makes the DS3930 an ideal device for applications needing multiple voltage references. All six potentiometers share a common low side. The potentiometers are separated into two groups of three 50kΩ potentiometers in parallel. Each group of three shares a common high side. The potentiometer wiper voltage can vary between 0V and VHI in 256 steps, where VHI is the voltage on HI0-2 or HI3-5.
Figure 1. DS3930 block diagram.
The DS3930 also has four general-purpose, NV I/O pins. These pins can be configured as inputs or outputs. When configured as an input, a voltage can be applied to the I/O pin, then the state of the pin can be monitored with an internal register through the 2-wire interface. When the I/O pin is configured as a digital output, the output state can be internally set either high or low.
This application note provides examples using the DS3930 as a voltage reference and digital I/O.
Voltage Reference
The potentiometers can be configured as voltage references to provide a variable or constant voltage. The high side (HI0-2 or HI3-5) and the low side (LO0-5) should be tied to a voltage between ground and 5.5V (max VCC). Typically, the high side is tied to a power supply and the low side is tied to ground. Each potentiometer has 256 positions to provide fine adjustment of the wiper voltage with registers F0h-F5h. With the high side tied to 5V, for example, each step would change the wiper voltage 19.6mV from 0V to 5V. If the high side is tied to a 3.3V supply, each step is 12.94mV.
When configuring the DS3930 for an application, the circuit should be designed so the current through the wiper is constant and close to 0mA, to produce a more accurate and stable voltage, and does not exceed ±1mA. Also, with the potentiometer configured as a voltage reference (ratiometric), the output is more accurate over temperature compared to using the potentiometer in an end-to-end configuration. The ratiometric temperature coefficient is typically 2 ppm/°C.
Digital I/O
The I/O pins can be configured as digital inputs or outputs. To configure an I/O pin as an input, set Pullup Ctrl and Pin Setting (see Table 1) to 1 (I/O pin output = HI-Z), and apply a voltage between 0V and VCC + 0.5 to the I/O pin. The state of the input can then be monitored in register F7h. To configure an I/O pin as an output, set Pullup Ctrl and Pin Setting to a high or low depending on the desired output, and float the I/O pin. Table 1 shows ow to set the I/O Control register (F6h) to control the I/O pin's output.
Table 1. I/O Pin Truth Table
Pullup Ctrl (I/O Control Register, bits 7:4)
I/O Pin Setting (I/O Control Register, bits 3:0)
I/O Pin Output
0
0
0
0
1
1
1
0
0
1
1
HI-Z
Design Example
The following example shows how to configure the potentiometer's wipers as voltage references and the I/O
pins as digital inputs and outputs. Figure 2 shows how to design a sample application circuit.
Figure 2. DS3930 circuit.
In the sample application circuit, the high side of potentiometers 0-2 (HI0-2) is connected to 5V, and the high side of potentiometers 3-5 (HI3-5) is connected to 3.3V. W0 is used to control a LCD, and W1 controls the speed of a fan. W2 provides the Vbias for a photodiode. W3 and W4 go into a comparator to determine if the reference voltage goes above/below the set value. W5 provides the Vbias for a pressure sensor. See Table 2 for the potentiometer registers and their settings for this example.
Table 2. Voltage References
Wiper
Voltage (V)
Address (hex)
Example Setting (hex)
Application
0
5.0
F0
FF
LCD
1
2.5
F1
80
Fan
2
5.0
F2
FF
Photodiode
3
2.5
F3
C2
Comparator
4
1.25
F4
61
Comparator
5
3.3
F5
FF
Pressure Sensor
Figure 3 shows how to set each bit in the I/O Control register (F6h) for this example. I/O pins 0 and 1 are set as inputs and I/O pins 2 and 3 are set as outputs (I/O2 = low, I/O3 = high). Since I/O0 is an input, the Pullup Ctrl bit should be set high (bit 0), and the I/O Pin Setting bit should be set high (bit 4). I/O2 is a high output, therefore, bit 7 should be low, and bit 3 should be high.
Figure 3. I/O control register configuration.
I/O0 and I/O1 are configured as inputs. The I/O0 input signal monitors Vout3. If the external 2.5V input is above the 2.5V set value from the potentiometer, Vout3 (and I/O0) is high. If the external 2.5V input is below the 2.5V value of the potentiometer, Vout3 (and I/O0) is low. The I/O1 input monitors a switch circuit. The application software can be configured to set a flag if the voltage goes to 0V or VCC.
I/O2 and I/O3 are configured as outputs. I/O2 controls an LED and I/O3 controls a buzzer with a built-in self-drive circuit. I/O2 is set to output a low so the LED will be on. The buzzer will be off since I/O3 is set to output a high.
Conclusion
There are unlimited applications where voltage references and digital I/Os can be used. This application note provides a few examples on how to interface the potentiometer wipers and I/O pins to different types of circuits. For more information on the DS3930, refer to the datasheet. For applications support, contact .
의견을 보내주세요! 위 내용이 도움이 되셨나요? 여러분의 의견을 기다립니다 — Maxim은 보내주신 정정이나 제안사항을 반영하고 있습니다.
이 페이지를 평가하고 의견을 보내주십시오.