Hardware Reference
In-Depth Information
circuit (IC) like this to use on your breadboard, you want to look for the dual
in-line package (DIP) version of the chip. Just a like a regular potentiometer, a
DigiPot has an adjustable wiper that determines the resistance between the wiper
terminal and one of the end terminals. The MCP4231 has two potentiometers
on one chip. Each pot has a resolution of 7 bits, resulting in 129 wiper positions,
(the extra position results from the chip's direct taps to power or ground) which
vary the resistance between 0 and 10kΩ. First, you will use the DigiPot to adjust
LED brightness. After you get it working with LEDs, you will use it to control
speaker volume. When you finish, you will have a platform that you can use to
develop more complicated audio/visual projects.
GatheringInformationfromtheDatasheet
First things first, you always need to consult the datasheet. A quick Google
search for “MCP4231” will turn up the datasheet. You can also find a link to the
datasheet from the Exploring Arduino website: www.exploringarduino.com/
content/ch9 . The datasheet answers the following questions:
What is the pin-out of the IC, and which pins are the control pins?
What is the resistance of the potentiometer in my chip?
Which SPI commands must be sent to control the two digital wipers?
To help you reference this information, Figures 9-2 through 9-4 show some
of the key parts of this datasheet. First, take a look at the pin-out presented on
the first page of the datasheet.
Figure 9-2: MCP4231 Pin-out diagram
Search WWH ::




Custom Search