Sie sind auf Seite 1von 7

R

Chapter 10

Analog Capture Circuit


The Spartan-3A FPGA Starter Kit board includes a two-channel analog capture circuit,
consisting of a programmable scaling pre-amplifier and an analog-to-digital converter
(ADC), as shown in Figure 10-1.

Linear Tech LTC1407A-1 Dual A/D


SPI_SCK: (AA20)
AD_CONV: (Y6)
AD_DOUT: (D16)

Linear Tech LTC6912-1 Dual Amp


SPI_MOSI: (AB14)
AMP_CS: (W6)
SPI_SCK: (AA20)
AMP_SHDN: (W15)
AMP_DOUT: (T7)

6-pin ADC Header (J22)

UG330_c10_01_021407

Figure 10-1: Analog Capture Circuit and Associated Stake Pin Header (J22)
The analog capture circuit consists of a Linear Technology LTC6912-1 programmable preamplifier that scales the incoming analog signal on the J22 header. The output of the preamplifier connects to a Linear Technology LTC1407A-1 ADC. Both the pre-amplifier and
the ADC are serially programmed or controlled by the FPGA.

Spartan-3A FPGA Starter Kit Board User Guide

www.xilinx.com

77

Chapter 10: Analog Capture Circuit

Header J22
DAC_REF_AB
(3.3V)

DAC_REF_CD
(3.3V)

DAC_REF_CD reference voltage is nominally 3.3V.


The reference is supplied by the LP3906 adjustable regulator, IC18.
The voltage is adjustable using the regulators I2C interface.
LTC 6912-1 AMP

VINA

LTC 1407A-1 ADC

VINB

A/D
Channel 0

14

A/D
Channel 1

GND

VCC
(3.3V)

14
REF = 1.65V

Spartan-3A FPGA
(D16)
(T7)

(AB14)

(W6)
(AA20)
(W15)

(Y6)

SPI_MOSI

AMP_CS

3
3
CS/LD A GAIN

SPI_SCK

SCK SPI Control Interface

SCK SPI Control Interface

SHDN

CONV

AMP_SHDN

DIN

0
2

0 1 2

DOUT

B GAIN

...

13

CHANNEL 1

...

13

SDO

CHANNEL 0

AD_CONV

AMP_DOUT
AD_DOUT
UG330_c10_02_032007

Figure 10-2: Detailed View of Analog Capture Circuit

Digital Outputs from Analog Inputs


The analog capture circuit converts the analog voltage on VINA or VINB and converts it to
a 14-bit digital representation, D[13:0], as expressed by Equation 10-1.
D13:0GAIN * VIN 1.65V* 8192
1.25V
The GAIN is the current setting loaded into the programmable pre-amplifier. The various
allowable settings for GAIN and allowable voltages applied to the VINA and VINB inputs
appear in Table 10-2.
The reference voltage for the amplifier and the ADC is 1.65V, generated via a voltage
divider shown in Figure 10-2. Consequently, 1.65V is subtracted from the input voltage on
VINA or VINB.
The maximum range of the ADC is 1.25V, centered around the reference voltage, 1.65V.
Hence, 1.25V appears in the denominator to scale the analog input accordingly.

78

www.xilinx.com

Spartan-3A FPGA Starter Kit Board User Guide

Programmable Pre-Amplifier

Finally, the ADC presents a 14-bit, twos complement digital output. A 14-bit, twos
complement number represents values between -213 and 213-1. Therefore, the quantity is
scaled by 8192, or 213.
See Programmable Pre-Amplifier to control the GAIN settings on the programmable
pre-amplifier.
The reference design files provide more information on converting the voltage applied on
VINA or VINB to a digital representation (see Related Resources, page 83).

Programmable Pre-Amplifier
The LTC6912-1 provides two independent, inverting amplifiers with programmable gain.
The purpose of the amplifier is to scale the incoming voltage on VINA or VINB so that it
maximizes the conversion range of the DAC, namely 1.65 1.25V.

Interface
Table 10-1 lists the interface signals between the FPGA and the amplifier. The SPI_MOSI
and SPI_SCK signals are shared with other devices on the SPI bus. The AMP_CS signal is
the active-Low slave select input to the amplifier.
Table 10-1: AMP Interface Signals
Signal

FPGA Pin

Direction

Description

SPI_MOSI

AB14

FPGAAMP

Serial data: Master Output, Slave Input.


Presents eight-bit programmable gain
settings, as defined in Table 10-2.

AMP_CS

W6

FPGAAMP

Active-Low chip-select. The amplifier gain is


set when the signal returns High.

SPI_SCK

AA20

FPGAAMP

Clock

AMP_SHDN

W15

FPGAAMP

Active-High shutdown, reset

AMP_DOUT

T7

FPGAAMP

Serial data. Echoes previous amplifier gain


settings. Can be ignored in most applications.

Programmable Gain
Each analog channel has an associated programmable gain amplifier (see Figure 10-2).
Analog signals presented on the VINA or VINB inputs on the J7 header are amplified
relative to 1.65V. The 1.65V reference is generated using a voltage divider of the 3.3V
voltage supply.
The gain of each amplifier is programmable from -1 to -100, as shown in Table 10-2.
Table 10-2: Programmable Gain Settings for Pre-Amplifier
A3

A2

A1

A0

Input Voltage Range

B3

B2

B1

B0

Minimum

Maximum

-1

0.4

2.9

-2

1.025

2.275

Gain

Spartan-3A FPGA Starter Kit Board User Guide

www.xilinx.com

79

Chapter 10: Analog Capture Circuit

Table 10-2: Programmable Gain Settings for Pre-Amplifier (Continued)


A3

A2

A1

A0

Input Voltage Range

B3

B2

B1

B0

Minimum

Maximum

-5

1.4

1.9

-10

1.525

1.775

-20

1.5875

1.7125

-50

1.625

1.675

-100

1.6375

1.6625

Gain

SPI Control Interface


Figure 10-3 highlights the SPI-based communications interface with the amplifier. The gain
for each amplifier is sent as an eight-bit command word, consisting of two four-bit fields.
The most-significant bit, B3, is sent first.
AMP_DOUT

Slave: LTC2624-1

0
SPI_MOSI

Spartan-3A
FPGA
Master

A0

A1

A2

A3 B0

B1

B2

B3

AMP_CS
SPI_SCK

A Gain

B Gain
UG330_c10_03_071906

Figure 10-3: SPI Serial Interface to Amplifier


The AMP_DOUT output from the amplifier echoes the previous gain settings. These
values can be ignored for most applications.
The SPI bus transaction starts when the FPGA asserts AMP_CS Low (see Figure 10-4). The
amplifier captures serial data on SPI_MOSI on the rising edge of the SPI_SCK clock signal.
The amplifier presents serial data on AMP_DOUT on the falling edge of SPI_SCK.
AMP_CS
30

50

50

SPI_SCK
30

SPI_MOSI

(from FPGA)
85 max

AMP_DOUT

Previous 7

(from AMP)
All timing is minimum in nanoseconds unless otherwise noted.

UG230_c10_04_022306

Figure 10-4: SPI Timing When Communicating with Amplifier

80

www.xilinx.com

Spartan-3A FPGA Starter Kit Board User Guide

Analog-to-Digital Converter (ADC)

The amplifier interface is relatively slow, supporting only about a 10 MHz clock frequency.

UCF Location Constraints


Figure 10-5 provides the User Constraint File (UCF) constraints for the amplifier interface,
including the I/O pin assignment and I/O standard used.
NET
NET
NET
NET
NET

"SPI_MOSI"
"AMP_CS"
"SPI_SCK"
"AMP_SHDN"
"AMP_DOUT"

LOC
LOC
LOC
LOC
LOC

=
=
=
=
=

"AB14"|
"W6" |
"AA20"|
"W15" |
"T7" |

IOSTANDARD =
IOSTANDARD =
IOSTANDARD =
IOSTANDARD =
IOSTANDARD =

LVTTL |
LVTTL |
LVTTL |
LVTTL |
LVTTL ;

SLEW =
SLEW =
SLEW =
SLEW =

SLOW
SLOW
SLOW
SLOW

|
|
|
|

DRIVE
DRIVE
DRIVE
DRIVE

=
=
=
=

8 ;
4 ;
12 ;
4 ;

Figure 10-5: UCF Location Constraints for the Pre-amplifier Interface (AMP)

Analog-to-Digital Converter (ADC)


The LTC1407A-1 provides two ADCs. Both analog inputs are sampled simultaneously
when the AD_CONV signal is applied.

Interface
Table 10-3 lists the interface signals between the FPGA and the ADC. The SPI_SCK signal
is shared with other devices on the SPI bus. The active-High AD_CONV signal is the
active-Low slave select input to the DAC. The DAC_CLR signal is the active-Low,
asynchronous reset input to the DAC.
Table 10-3: ADC Interface Signals
Signal
SPI_SCK

FPGA Pin
AA20

AD_CONV

Y6

ADC_OUT

D16

Direction

Description

FPGAADC Clock
FPGAADC Active-High, initiates conversion process.
FPGAADC Serial data. Presents the digital representation of the
sample analog values as two 14-bit twos
complement binary values.

SPI Control Interface


Figure 10-6 provides an example SPI bus transaction to the ADC.
When the AD_CONV signal goes High, the ADC simultaneously samples both analog
channels. The results of this conversion are not presented until the next time AD_CONV is
asserted, a latency of one sample. The maximum sample rate is approximately 1.5 MHz.
The ADC presents the digital representation of the sampled analog values as a 14-bit, twos
complement binary value.

Spartan-3A FPGA Starter Kit Board User Guide

www.xilinx.com

81

Chapter 10: Analog Capture Circuit

ADC_OUT
Slave: LTC1407A-1 A/D Converter
D0 D1 D2
D11 D12 D13

Spartan-3A
AD_CONV
FPGA
Master

SPI_SCK

D3

D4

D5

D6

D7

D8

D9 D10

Sample
point

D0 D1
D13

D2

D3

D4

D5

D6

D7

D8

D9 D10 D11 D12

Z
Channel 1

Channel 0

Converted data is presented with a latency of one sample.


The sampled analog value is converted to digital data 32 SPI_SCK cycles after asserting AD_CONV.
The converted values is then presented after the next AD_CONV pulse.
Sample

point

AD_CONV
SPI_SCK
Channel 0
13

ADC_OUT

Channel 1
13

Channel 0
13

UG330_c10_05_032007

Figure 10-6:

Analog-to-Digital Conversion Interface

Figure 10-7 shows detailed transaction timing. The AD_CONV signal is not a traditional
SPI slave select enable. Be sure to provide enough SPI_SCK clock cycles so that the ADC
leaves the ADC_OUT signal in the high-impedance state. As shown in Figure 10-6, use a
34-cycle communications sequence. The ADC 3-states its data output for two clock cycles
before and after each 14-bit data transfer.
4ns min
AD_CONV
19.6ns min

3ns
SPI_SCK

8ns
ADC_OUT

Channel 0

High-Z

13

12

11

AD_CONV
45ns min

30

SPI_SCK

31

32

33

Channel 1
ADC_OUT

34

6ns

High-Z

The A/D converter sets its SDO output line to high impedance after 33 SPI_SCK clock cycles
UG330_c10_06_032007

Figure 10-7: Detailed SPI Timing to ADC

UCF Location Constraints


Figure 10-8 provides the User Constraint File (UCF) constraints for the amplifier interface,
including the I/O pin assignment and I/O standard used.
NET "AD_CONV"
NET "SPI_SCK"
NET "AD_DOUT"

LOC = "Y6"
| IOSTANDARD = LVTTL | SLEW = SLOW | DRIVE = 4 ;
LOC = "AA20" | IOSTANDARD = LVTTL | SLEW = SLOW | DRIVE = 12 ;
LOC = "D16" | IOSTANDARD = LVTTL ;

Figure 10-8: UCF Location Constraints for the ADC Interface

82

www.xilinx.com

Spartan-3A FPGA Starter Kit Board User Guide


UG330 (v1.3) June 21, 2007

Connecting Analog Inputs

Connecting Analog Inputs


Connect AC signals to VINA or VINB via a DC blocking capacitor.

Related Resources
Refer to the following links for additional information:

Xilinx PicoBlaze Soft Processor


http://www.xilinx.com/picoblaze

LTC6912 Dual Programmable Gain Amplifiers with Serial Digital


Interface
http://www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1154,C1009,C1121,P7
596,D5359

LTC1407A-1 Serial 14-bit Simultaneous Sampling ADCs with


Shutdown
http://www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1155,C1001,C1158,P2
420,D1295