Hardware Reference
In-Depth Information
The pin-out should usually be your first step when getting ready to work
with a new device. Following is a breakdown of all the pins and their functions:
Pins P0A, P0W, and P0B: These are the pins for the first digitally con-
trolled potentiometer.
Pins P1A, P1W, and P1B: These are the pins for the second digitally
controlled potentiometer.
VDD: Connects to your 5V supply.
VSS: Connects to ground.
CS: CS is the SS pin for the SPI interface, and the bar above it indicates that it
is active low. (0V means the chip is selected, and 5V means it is not selected.)
SDI and SDO: These pins correspond to serial data in and out, respec-
tively (a.k.a. MOSI and MISO).
SCK: This is the SPI clock line that was explained earlier in the chapter.
SHDN and WP: These stand for shut down and write protect, respectively.
For this chip, it is revealed later in the datasheet that the WP pin is actually
NC (not connected). You can ignore this pin. The SHDN pin is active low,
like the CS pin. When held low, the hardware “disconnects” the wiper
from the internal resistor network. You always want your potentiometer to
be active, so in these examples the SHDN pin is connected directly to 5V.
The next thing worth considering is the resistance of the potentiometer and
wiper. Just like an ordinary potentiometer, there is a fixed resistance between
the A and B terminals of each digital potentiometer. The wiper itself also has
a resistance that you should take into account. Consider the information from
the fifth page of the datasheet (see Figure 9-3).
Figure 9-3: MCP4231 AC/DC characteristics table
Search WWH ::




Custom Search