25
LTC1417
sn1417 1417fas
* (This assumes an E-Clock frequency of 4MHz. For higher
* E-Clock frequencies, change the above value of $50 to a
* value that ensures the SCK frequency is 2MHz or less.)
GETDATAPSHX
PSHY
PSHA
*
*****************************************
* Setup indecies *
*****************************************
*
LDX #$0 The X register is used as a pointer to the memory
* locations that hold the conversion data
LDY #$1000
*
*****************************************
* The next short loop ensures that the *
* LTC1417’s conversion is finished *
* before starting the SPI data transfer *
*****************************************
*
CONVENDLDAA PORTC Retrieve the contents of port D
ANDA #%10000000 Look at Bit7
* Bit7 = Hi; the LTC1417’s conversion is complete
* Bit7 = Lo; the LTC1417’s conversion is not
* complete
BPL CONVEND Branch to the loop’s beginning while Bit7 remains
* low
*
*************************************************************************
* This routine sends data to the LTC1417 and sets its MUX channel. The *
* very first time this routine is entered produces invalid data. Each *
* time thereafter, the data will correspond to the previous active *
* CONVST signal sent to the LTC1417. *
*************************************************************************
*
LDAA #$00 Dummy value for upper byte of 16-bit SPI transfer
BCLR PORTD,Y %00100000 This sets the SS* output bit to a logic
* low, selecting the LTC1417
STAA SPDR Transfer Accum. A contents to SPI register to initiate
* serial transfer
WAITMX1 LDAA SPSR Get SPI transfer status
BPL WAITMX1If the transfer is not finished, read status
LDAA SPDR Load accumulator A with the current byte of LTC1417 data
* that was just received
STAA DIN1 Transfer the LTC1417’s high byte (Bit13 - Bit6) to memory
LDAA MUX Retrieve MUX address
ORAA #$08 Set the MUX’s ENABLE bit
STAA SPDR Transfer Accum. A contents to SPI register to initiate
* serial transfer
WAITMX2 LDAA SPSR Get SPI transfer status
BPL WAITMX2If the transfer is not finished, read status
BSET PORTD,Y %00100000 This sets the SS* output bit to a logic
* high, de-selecting the LTC1417
LDAA SPDR Load accumulator A with the current byte of LTC1417 data
* that was just received
STAA DIN2 Transfer the LTC1417’s low byte (Bit5 - Bit0) to memory
LDD DIN1 Load the contents of DIN1 and DIN2 into the double
* accumulator D
LSRD
LSRD Two logical shifts to the right to right justify the
* 14-bit conversion results
STD DIN1 Place right justified result back in memory
TYPICAL APPLICATIONS
U
26
LTC1417
sn1417 1417fas
*
*****************************************
* Initiate a LTC1417 conversion *
*****************************************
*
BCLR PORTC,Y %00000001 This sets PORTC, Bit0 output to a logic
* low, initiating a conversion
BSET PORTC,Y %00000001 This resets PORTC, Bit0 output to a logic
* high, returning CONVST to a logic high
*
PULA Restore the A register
PULY Restore the Y register
PULX Restore the X register
RTS
TYPICAL APPLICATIONS
U
Figure 22. This Diagram Shows the Relationship Between the Selected LTC1391 MUX Channel and the Conversion Data Retrieved
from the LTC1417 When Using the Sample Program in Listing A. At Any Point in Time, a Two Conversion Delay Exists Between the
Selected MUX Channel and When Its Data Is Retrieved
CONVST
BUSY
RD
MUX
DATA
ADC
DATA
MUX
OUT
CH5CH4CH3CH2CH1
CH3CH2CH1CH0CH7
CH0 CH1 CH2 CH3 CH4
1417 F22
27
LTC1417
sn1417 1417fas
TYPICAL APPLICATIONS
U
Figure 23 uses the DG408 to select one of eight ±2.048V
bipolar signals and apply it to the LTC1417’s analog input.
The circuit is designed to connect to a 68HC11 µC. The
MUX’s parallel input is connected to the controller’s port
C and the LTC1417’s serial interface is accessed through
the controller’s SPI interface.
The sequence to generate a conversion is shown in sample
program Listing B. The first step selects a MUX channel.
This is followed by initiating a conversion and waiting for
BUSY to go high, signifying end of conversion. Once BUSY
goes low, the SPI is used to retrieve the 14-bit conversion
data. The timing relationships between the various control
signals and data transmission are shown in Figure 24.
Figure 23. With an Input Range of ±2.048V for Each of Eight Inputs,
This Data Acquisition System is Configured for Communication with the 68HC11 µC
1417 F23
1µF
10µF
5V
NC
1
2
3
4
5
6
7
8
16
15
14
13
12
11
10
9
LTC1417
5V 5V5V 5V
PORT C, BIT 7
PORT C, BIT 6
PORT C, BIT 2
PORT C, BIT 1
PORT C, BIT 0
SS
MISO
CLK
A
IN
+
A
IN
V
REF
REFCOMP
AGND
EXTCLKIN
SCLK
CLKOUT
V
DD
V
SS
BUSY
CONVST
RD
SHDN
DGND
D
OUT
DG408
S1
S2
S3
S4
S5
S6
S7
S8
13
3
14
2
V
+
V
GND
EN
A2
A1
A0
D
IN1
IN2
IN3
IN4
IN5
IN6
IN7
IN8
1
2
3
4
5
6
7
8
0.1µF
0.1µF
MC68HC11

LTC1417AIGN#TRPBF

Mfr. #:
Manufacturer:
Analog Devices Inc.
Description:
Analog to Digital Converters - ADC L Pwr 14-B, 400ksps Smpl ADC Conv w/ Ser
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union