下载

Maxim > Design Support > Technical Documents > Application Notes > A/D and D/A Conversion/Sampling Circuits > APP 3497
Maxim > Design Support > Technical Documents > Application Notes > Digital Potentiometers > APP 3497
Keywords: MAX5581, PIC, fast settling DACs, source code, programming, digital analog converters
APPLICATION NOTE 3497
PIC'ing the MAX5581: Interfacing a PIC
Microcontroller with the MAX5581 Fast-Settling
DAC
By: Ted Salazar, Applications Engineering Manager
May 20, 2005
Abstract: This application note shows how to use a PIC® microcontroller with the MAX5581 DAC.
Detailed schematics and source code are provided.
MAX5581 Overview
The MAX5581 is a 12-bit, fast-settling DAC featuring a 3-wire SPI™ serial interface. The MAX5581's
interface can support SPI up to 20MHz with a maximum settling time of 3µs. This application note
presents an application circuit and all the firmware required to interface the fastest line of PIC
microcontrollers (PIC18F core) to the MAX5581 DAC. The example assembly program was written
specifically for the PIC18F442 using the free assembler provided in MPLAB IDE version 6.10.0.0.
Hardware Overview
The application circuit discussed here uses the MAX5581 Evaluation (EV) Kit, which consists of the
MAX5581, an ultra-high-precision voltage reference (MAX6126), two pushbutton switches, gain setting
resistors, and a proven PCB layout. The PIC18F442 is not present on the MAX5581EVKIT board, but was
added to the system to complete the application schematic shown in Figure 1. The /CS\, SCLK, DIN, and
DOUT pads on the MAX5581EVKIT allow an easy connection for the SPI serial interface.
Page 1 of 13