10
LTC1292/LTC1297
12927fb
the MPU. The data is right-justified in the two memory
locations (Figure 2). This was made possible by delaying
the falling edge of CS till after the second CLK. ANDing the
first byte with 0F
HEX
clears the four most significant bits.
This operation was not included in the code. It can be
inserted in the data gathering loop or outside the loop
when the data is processed.
U
S
A
O
PP
L
IC
AT
I
WU
U
I FOR ATIO
LABEL MNEMONIC OPERAND COMMENTS
LDAA #$50 CONFIGURATION DATA FOR SPCR
STAA $1028 LOAD DATA INTO SPCR ($1028)
LDAA #$1B CONFIG. DATA FOR PORT D DDR
STAA $1009 LOAD DATA INTO PORT D DDR
LDAA #$00 LOAD DUMMY DIN WORD INTO
ACC A
STAA $50 LOAD DUMMY DIN DATA INTO $50
LOOP LDX #$1000 LOAD INDEX REGISTER X WITH
$1000
LDAB #$00 LOAD ACC B WITH $00
LDAA $50 LOAD DUMMY DIN INTO ACC A
FROM $50
STAA $102A LOAD DUMMY DIN INTO SPI,
START SCK
NOP DELAY CS FALL TIME TO RIGHT
JUSTIFY DATA
MC68HC11 CODE for LTC1292 Interface
STAB $08, X D0 GOES LOW (CS GOES LOW)
NOP 6 NOPS FOR TIMING
LDAA $1029 CHECK SPI STATUS REG
LDAA $102A LOAD LTC1292 MSBs INTO ACC A
STAA $61 STORE MSBs IN $61
STAA $102A LOAD DUMMY DIN INTO SPI,
START SCK
NOPS 6 NOPS FOR TIMING
BSET $08,X,$01 D0 GOES HIGH (CS GOES HIGH)
LDAA $1029 CHECK SPI STATUS REGISTER
LDAA $102A LOAD LTC1292 LSBs IN ACC
STAA $62 STORE LSBs IN $62
JMP LOOP START NEXT CONVERSION
LABEL MNEMONIC OPERAND COMMENTS
BYTE 2
B3B7
B6
B5
B4 B2
B0
B1
B10 B9 B8B11
OO
OO
BYTE 1
D
OUT
FROM LTC1292 STORED ON MC68HC11 RAM
LOCATION #61
LOCATION #62
MSB
LTC1292/7 F02
CLK
D
OUT
LTC1292
CS
ANALOG
INPUTS
DO
SCK
MISO
MC68HC11
Figure 2. Hardware and Software Interface to Motorola MC68HC11 Microcontroller
Figure 3. Data Exchange Between LTC1297 and MC68HC11
For the LTC1297 (Figure 3) a delay must be introduced to
accommodate the setup time, t
suCS
, before the dummy
D
IN
word is sent to the data register. The first 8-bit transfer
clocks B11 through B6 of the A/D conversion result into
the processor. The second 8-bit transfer clocks the re-
maining bits B5 through B0 into the MPU. Note B1 and B2
from the LSB-first data word have also been clocked in.
CLK
CS
D
OUT
MPU
RECEIVED WORD
LTC1292/7 F03
B7
B6
B5 B4
B3 B2
B1
B0
B1
B8
B9
B10
B11
BYTE 2
B8 B7
B6B9
B10
0
?
B11
1ST TRANSFER
2ND TRANSFER
BYTE 1
B0 B1
B2
B1B2
B4
B5
B3
B2
B3
11
LTC1292/LTC1297
12927fb
on two port lines and the D
OUT
signal is read on a third port
line. After a falling CLK edge each data bit is loaded into the
carry bit and then rotated into the accumulator. Once the
first 8 MSBs have been shifted into the accumulator they
are loaded into register R2. The last four bits are shifted in
the same way and loaded into register R3. The output data
is left-justified in registers R2 and R3 (Figure 5).
For the LTC1297 four NOPs need to be inserted in the 8051
code after CS goes low to allow the LTC1297 to wake up
from power shutdown (t
suCS
).
U
S
A
O
PP
L
IC
AT
I
WU
U
I FOR ATIO
LABEL MNEMONIC OPERAND COMMENTS
LDAA #$50 CONFIGURATION DATA FOR SPCR
STAA $1028 LOAD DATA INTO SPCR ($1028)
LDAA #$1B CONFIG. DATA FOR PORT D DDR
STAA $1009 LOAD DATA INTO PORT D DDR
LDAA #$00 LOAD DUMMY DIN WORD INTO
ACC A
STAA $50 LOAD DUMMY DIN DATA INTO $0
LOOP LDX #$1000 LOAD INDEX REGISTER X WITH
$1000
LDAB #$00 LOAD ACC B WITH $00
LDAA $50 LOAD DIN INTO ACC FROM $50
BCLR $08,X,$01 D0 GOES LOW (CS GOES LOW)
NOP 3 NOP FOR t
suCS
TIMING
NOP
NOP
STAA $102A LOAD DUMMY DIN INTO SPI,
START CLK
LABEL MNEMONIC OPERAND COMMENTS
MC68HC11 CODE for LTC1297 Interface
LOOP1 LDAA $1029 CHECK SPI STATUS REG
BPL LOOP1 CHECK IF TRANSFER IS DONE
LDAA $102A LOAD LTC1297 MSBs INTO ACC A
STAA $61 STORE MSBs IN $61
STAA $102A LOAD DUMMY DIN INTO SPI,
START SCK
LOOP2 LDAA $1029 CHECK SPI STATUS RES
BPL LOOP2 CHECK IF TRANSFER IS DONE
BSET $08X,$01 D0 GOES HIGH (CS GOES HIGH)
LDAA $102A LOAD LTC1297 LSBs INTO ACC A
STAA $62 STORE LSBs IN $62
ROR $61 ROTATE RIGHT WITH CARRY
ROR $62 NEEDED TO RIGHT JUSTIFY
ROR $61 THE DATA IN $61 AND $62
ROR $62
JMP LOOP START NEXT CONVERSION
BYTE 2
B3B7
B6
B5
B4 B2
B0
B1
B10 B9 B8B11
OO
OO
BYTE 1
D
OUT
FROM LTC1297 STORED ON MC68HC11 RAM
LOCATION #61
LOCATION #62
MSB
LTC1292/7 F04
CLK
D
OUT
LTC1297
CS
ANALOG
INPUTS
DO
SCK
MISO
MC68HC11
Figure 4. Hardware and Software Interface to Motorola MC68HC11 Microcontroller
The data is right- justified in the two memory locations by
rotating right twice (Figure 4). ANDing the first byte with
0F
HEX
clears the four most significant bits. This operation
was not included in the code. It can be inserted in the data
gathering loop or outside the loop when the data is
processed.
Interfacing to the Parallel Port of the Intel 8051 Family
The Intel 8051 has been chosen to show the interface
between the LTC1292/LTC1297 and parallel port
microprocessors. The signals CS and CLK are generated
12
LTC1292/LTC1297
12927fb
U
S
A
O
PP
L
IC
AT
I
WU
U
I FOR ATIO
Figure 5. Hardware and Software Interface to Intel 8051 Processor
LABEL MNEMONIC OPERAND COMMENTS
MOV P1,#02h BIT 1 PORT 1 SET AS INPUT
CLR P1.3 CLK GOES LOW
SETB P1.4 CS GOES HIGH
CONT CLR P1.4 CS GOES LO
NOP 4 NOP FOR LTC1297 t
suCS
(Wakeup
NOP Time) (Not Needed for LTC1292)
NOP
NOP
SETB P1.3 CLK GOES HIGH
CLR P1.3 CLK GOES LOW
SETB P1.3 CLK GOES HIGH
CLR P1.3 CLK GOES LOW
MOV R4,#08H LOAD COUNTER
LOOP MOV C,P1.1 READ DATA BIT INTO CARRY
RLC A ROTATE DATA BIT INTO ACC
SETB P1.3 CLK GOES HIGH
CLR P1.3 CLK GOES LOW
DJNZ R4,LOOP NEXT BIT
MOV R2,A STORE MSBs IN R2
MOV C,P1.1 READ DATA BIT INTO CARRY
CLR A CLEAR ACC
RLC A ROTATE DATA BIT (B3) INTO ACC
SETB P1.3 CLK GOES HIGH
CLR P1.3 CLK GOES LOW
MOV C,P1.1 READ DATA BIT INTO CARRY
RLC A ROTATE DATA BIT (B2) INTO ACC
SETB P1.3 CLK GOES HIGH
CLR P1.3 CLK GOES LOW
MOV C,P1.1 READ DATA BIT INTO CARRY
RLC A ROTATE DATA BIT (B1) INTO ACC
SETB P1.3 CLK GOES HIGH
CLR P1.3 CLK GOES LOW
MOV C,P1.1 READ DATA BIT INTO CARRY
SETB P1.4 CS GOES HIGH
RRC A ROTATE DATA BIT (B0) INTO ACC
RRC A ROTATE RIGHT INTO ACC
RRC A ROTATE RIGHT INTO ACC
RRC A ROTATE RIGHT INTO ACC
MOV R3,A STORE LSBs IN R3
AJMP CONT START NEXT CONVERSION
LABEL MNEMONIC OPERAND COMMENTS
8051 CODE
Sharing the Serial Interface
The LTC1292/LTC1297 can share the same two-wire
serial interface with other peripheral components or other
LTC1292/LTC1297s (Figure 6). In this case, the CS signals
decide which LTC1292 is being addressed by the MPU.
ANALOG CONSIDERATIONS
Grounding
The LTC1292/LTC1297 should be used with an analog
ground plane and single point grounding techniques. Do
not use wire wrapping techniques to breadboard and
evaluate the device. To achieve the optimum performance
D
OUT
FROM LTC1292/LTC1297 STORED IN 8051 RAM
B3
B2
B0
B1
OO
OO
R3
B7
B6
B5
B4
B10 B9 B8B11
R2
MSB
ANALOG
INPUTS
CLK
D
OUT
LTC1292
LTC1297
CS
P1.4
P1.3
P1.1
8051
LTC1292/7 F05
CS
D
OUT
B11
B7
B8
B9
B10
B4
B5B6
B3
B2
B1
B0
CLK

LTC1292DIN8#PBF

Mfr. #:
Manufacturer:
Analog Devices Inc.
Description:
Analog to Digital Converters - ADC 12-Bit Serial I/O Diff Input ADC
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union