ENGLISH 简体中文 日本語 한국어  


애플리케이션 노트  3439

PIC'ing the MAX5591: Interfacing a PIC Microcontroller to the MAX5591 Fast-Settling DAC

Abstract: A tutorial is presented on interfacing a PIC18F442 microcontroller to the MAX5591 fast-settling DAC, with an example program.

MAX5591 Overview

The MAX5591 is a 12-bit, fast-settling DAC featuring a 3-Wire SPI™ serial interface. The MAX5591 interface is capable of supporting SPI up to 20MHz, with a maximum settling time of 3µs. This application note contains descriptions of an application circuit and all the firmware required to interface the fastest line of PIC microcontrollers (the PIC18F core) to the MAX5591. 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 utilizes the MAX5591EVKIT, which consists of the MAX5591, an ultra-high-precision voltage reference (MAX6126), two push-button switches, gain-setting resistors, and a proven PCB layout. The PIC18F442 is not present on the MAX5591EVKIT board, but it was added to the system here to complete the application schematic shown in Figure 1. The /CS\, SCLK, DIN and DOUT pads on the MAX5591EVKIT allow an easy connection for the SPI serial interface.

Figure 1a.
For Larger Image


Figure 1. MAX5591 application schematic.
Figure 1. MAX5591 application schematic.

Analog and Digital Ground Planes

It is good practice to separate the analog and digital ground planes. An example of this is shown in Figure 2. Both ground planes should be connected together through a ferrite bead. Using a ferrite bead such as the TDK MMZ1608B601C to connect both grounds prevents the microcontroller's system clock and its harmonics from feeding into the analog ground. Knowing that the system clock of the PIC18F442 is 40MHz, the MMZ1608B601C was chosen for its specific impedance vs. frequency characteristics. Figure 3 shows the impedance vs. frequency curve for the MMZ1608B601C.

Figure 2. Separating analog and digital grounds.
Figure 2. Separating analog and digital grounds.

Figure 3. Impedance vs. frequency curve for the TDK MMZ1608B601C ferrite bead.
Figure 3. Impedance vs. frequency curve for the TDK MMZ1608B601C ferrite bead.

Firmware Overview

The example assembly program shown in Listing 1 initializes the MAX5591 using the PIC18F442's internal MSSP SPI peripheral. The PIC18F442's 40MHz system clock allows the MSSP to provide an SPI clock (SCLK) up to 10MHz. Table 1 shows the only configuration word required after power. Once the MAX5591 is initialized, the program constantly loads the DAC output registers with zero scale followed by full scale, as shown in Table 2. This constant loop results in a square wave that demonstrates the fast settling time of the MAX5591.


Download

Listing 1. This assembly example program interfaces to the MAX5591 using the PIC18F442's internal MSSP SPI peripheral.

Table 1. Configuration write command for setting the settling time to 3µs for all eight DACs.
SPI Line C7 C6 C5 C4 C3 C2 C1 C0 D7 D6 D5 D4 D3 D2 D1 D0
DIN 1 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1

Table 2. Load all DAC outputs commands. The first command sets all the DAC outputs to zero scale and the second command sets all the DAC outputs to full scale.
SPI Line C3 C2 C1 C0 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
DIN (1st) 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
DIN (2nd) 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1


의견을 보내주세요!
위 내용이 도움이 되셨나요?
여러분의 의견을 기다립니다 — Maxim은 보내주신 정정이나 제안사항을 반영하고 있습니다. 이 페이지를 평가하고 의견을 보내주십시오.


자동 업데이트
관심있는 분야의 애플리케이션 노트가 나올 때 자동으로 업데이트 받고 싶으세요? 그렇다면 EE-Mail™을 신청하십시오.



추가 정보  APP 3439: Jan 28, 2005
MAX5590 버퍼링된 고속 설정, 8채널, 12/10/8비트 전압 출력 DAC 전체 데이터 시트
(PDF, 892kB)
무료 샘플
MAX5591 버퍼링된 고속 설정, 8채널, 12/10/8비트 전압 출력 DAC 전체 데이터 시트
(PDF, 892kB)
무료 샘플
MAX5592 버퍼링된 고속 설정, 8채널, 12/10/8비트 전압 출력 DAC 전체 데이터 시트
(PDF, 892kB)
무료 샘플
MAX5593 버퍼링된 고속 설정, 8채널, 12/10/8비트 전압 출력 DAC 전체 데이터 시트
(PDF, 892kB)
무료 샘플
MAX5594 버퍼링된 고속 설정, 8채널, 12/10/8비트 전압 출력 DAC 전체 데이터 시트
(PDF, 892kB)
무료 샘플
MAX5595 버퍼링된 고속 설정, 8채널, 12/10/8비트 전압 출력 DAC 전체 데이터 시트
(PDF, 892kB)
무료 샘플
 

다운로드, PDF 형식다운로드, PDF 형식 (84kB)
 AN3439, AN 3439, APP3439, Appnote3439, Appnote 3439



         


      개인정보보호 정책    법적 고지

      Copyright © 2008 by Maxim Integrated Products, Dallas Semiconductor