Information

Analog Shield: Introduction
2. Digital to Analog Converter (DAC) Header
The 2x4 header has the four DAC channels and four pins for the common ground on the board. The 4 ground pins
are on the outside row of the header, while the 4 DAC channels are on the inner row of the header. The DAC
modifies the analog signal produced from an Arduino or chipKIT.
The standard Arduino/chipKIT analogWrite() function produces a pulse-width modulated (PWM) square wave that
approximates the desired overall value over time. PWM is acceptable for many applications, like dimming an LED
or driving a motor, but it is not adequate for more sensitive analog circuits. Once a value is set to a DAC channel,
the channel will produce a steady voltage corresponding to the provided value. Setting values on the channels is
facilitated with the analog.write() function, and the channels are labeled D0-D4. For more detail on the op-amp
circuitry behind the DAC, please refer to the shield schematic.
3. Power Header
The 2x5 header has a positive 5V rail, a negative 5V rail, a positive variable voltage rail, a negative voltage rail, 2.5V
reference voltage rail, and five pins for the common ground on the board. The 5 ground pins are on the outside
row of the header while the 5 power supplies are on the inner row of the header.
The +/-5V rail can vary due to USB power specification. The +/-V
adj
rails can be adjusted using the variable voltage
potentiometer located at the lower right corner of the shield. Adjusting the potentiometer will change the
voltages of the +/-V
adj
rails. There is also a +2.5V rail to be used as a reference voltage.
4. Voltage Select Jumper
The jumper needs to be set for whether the connected board uses IOREF, 3V3, or 5V0 for the I/O for the SPI
interface.
5. Variable Voltage Potentiometer
The potentiometer is can be used to adjust the +/-V
ADJ
power supply rails.
3 Software
Included with the Analog Shield is a simple library that is built to optimize readability and performance. It
attempts to provide a similar interface to the standard Analog read and write functionality already present in the
IDE. Instructions on installing the library are included in the library folder and in the “Analog Shield 02 First Time
Setup” document. After successfully installing the library into the IDE, the library can be invoked with the
command:
#include <analogShield.h>
Once the analogShield library is included, a class variable called analog will be accessible. The analog variable will
allow access to the analogShield library functions.
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 3 of 5