19
LTC1404
1404fa
TYPICAL APPLICATIONS
U
TMS320C50 Code for Circuit
THIS PROGRAM DEMONSTRATES THE LTC1404 INTERFACE TO THE
TMS320C50. FRAME SYNC PULSE IS GENERATED FROM TFSX.
DATA SHIFT CLOCK IS EXTERNALLY GENERATED.
*Initialization*
.mmregs ; Defines global symbolic names
;- - Initialized data memory to zero
.ds 0F00h ; Initialize data to zero
DATA0 .word 0 ; Begin sample data location
DATA1 .word 0 ; .
DATA2 .word 0 ; Location of data
DATA3 .word 0 ; .
DATA4 .word 0 ; .
DATA5 .word 0 ; End sample data location
;- - Set up the ISR vector
.ps 080Ah ; Serial ports interrupts
rint : B RECEIVE ; 0A;
xint : B TRANSMIT ; 0C;
trnt : B TREC ; 0E;
txnt : B TTRANX ; 10;
;- - Setup the reset vector
.ps 0A00h
.entry
START:
*TMS320C50 Initialization*
SETC INTM ; Temporarily disable all interrupts
LDP #0 ; Set data page pointer to zero
OPL #0834h, PMST ; Set up the PMST status and control register
LACC #0
SAMM CWSR ; Set software wait state to 0
SAMM PDWSR ;
*Configure Serial Port*
SPLK #0028h, TSPC ; Set TDM Serial Port
; TDM = 0 Stand Alone mode
; DLB=0 Not loop back
; FO=0 16 Bits
; FSM=1 Burst Mode
; MCM=0 CLKR is generated externally
; TXM=1 FSX as output pin
; Put serial port into reset
; (XRST=RRST=0)
SPLK #00E8h, TSPC ; Take Serial Port out of reset
; (XRST=RRST=1)
SPLK #0FFFFh, IFR ; Clear all the pending interrupts
*Start Serial Communication*
SACL TDXR ; Generate frame sync pulse
SPLK #040h, IMR ; Turn on TRNT receiver interrupt
CLRC INTM ; Enable interrupt
CLRC SXM ; For Unipolar input, set for right shift
; with no sign extension
MAR *, AR7 ; Load the auxiliary register pointer with seven
LAR AR7, #0F00h ; Load the auxiliary register seven with #0F00h
; as the begin address for data storage
WAIT: NOP ; Wait for a receive interrupt
NOP ;
NOP ;
SACL TDXR ; !! Regenerate the frame sync pulse
B WAIT ;
; - - - - - - - end of main program - - - - - - - - - - ;
*Receiver Interrupt Service Routine*
TREC:
LAMM TRCV ; Load the data received from LTC1404
SFR ; Shift right two times
SFR ;
AND #1FFFh, 0 ; ANDed with #1FFFh
; For converting the data to right
; justified format
;
SACL *+, 0 ; Write to data memory pointed by AR7 and
; increase the memory address by one
LACC AR7 ;
SUB #0F05h,0 ; Compare to end sample address #0F05h
BCND
END_TRCV, GEQ
; If the end sample address has exceeded jump
to END_TRCV
;
SPLK #040h, IMR ; Else Re-enable the TRNT receive interrupt
RETE ; Return to main program and enable interrupt
*After Obtained the Data from LTC1404, Program Jump to END_TRCV*
END_TRCV:
SPLK #002h, IMR ; Enable INT2 for program to halt
CLRC INTM
SUCCESS:
B SUCCESS
*Fill the Unused Interrupt with RETE, to avoid program get “lost”*
TTRANX:
RETE
RECEIVE:
RETE
TRANSMIT:
RETE
INT2:
B halt ; Halts the running CPU
20
LTC1404
1404fa
TYPICAL APPLICATIONS
U
LTC1404 Interface to the ADSP2181’s SPORT0 (Frame Sync is Generated from RFS0)
Data Stored in the ADSP2181’s Memory (Normal Mode, SLEN = D)
D2 D1
D0
D3
D4
D6
D7 D5
0
0
0
RDY D11
D10
D9 D8
1404 TA05d
D0 X
X
D1
D2
D4
D5 D3
RDY
X
D11
D10 D9
D8
D7 D6
1404 TA05c
Data from the LTC1404 (Normal Mode)
Logic Analyzer Waveforms Show 1.67µs Throughput Rate (Input Voltage = 1.604V, Output Code = 0110 0100 0100 = 1604
10
)
1404 TA05b
NOTE: WITHOUT THE EXTERNAL CLOCKING SIGNAL, THE ADSP2181 SCLK0 CAN BE PROGRAMMED TO RUN AT 8.3MHz
A
IN
V
SS
V
CC
V
REF
CLK
CONV
D
OUT
GND
SCLKO
RFSO
DR0
LTC1404
ADSP2181
9.6MHz
EXTERNAL CLOCK
UNIPOLAR
INPUT
+
10µF
0.1µF
+
10µF
5V
0.1µF
1
2
3
84
6
7
5
1404 TA05a
21
LTC1404
1404fa
TYPICAL APPLICATIONS
U
THIS PROGRAM DEMONSTRATES THE LTC1404 INTERFACE TO
THE ADSP-2181. FRAME SYNC PULSE IS GENERATED FROM RFS.
DATA SHIFT CLOCK IS EXTERNALLY GENERATED.
/*Section 1: Initialization*/
.module/ram/abs = 0 adspltc; /*define the program module*/
jump start; /*jump over interrupt vectors*/
nop; nop; nop;
rti; rti; rti; rti; /*code vectors here upon IRQ2 int*/
rti; rti; rti; rti; /*code vectors here upon IRQL1 int*/
rti; rti; rti; rti; /*code vectors here upon IRQL0 int*/
rti; rti; rti; rti; /*code vectors here upon SPORT0 TX int*/
ax0 = rx0; /*Section 5*/
dm (0x2000) = ax0; /*begin of SPORT0 receive interrupt*/
rti; /* */
/* */
/*end of SPORT0 receive interrupt*/
rti; rti; rti; rti; /*code vectors here upon /IRQE int*/
rti; rti; rti; rti; /*code vectors here upon BDMA interrupt*/
rti; rti; rti; rti; /*code vectors here upon SPORT1 TX (IRQ1) int*/
rti; rti; rti; rti; /*code vectors here upon SPORT1 RX (IRQ0) int*/
rti; rti; rti; rti; /*code vectors here upon TIMER int*/
rti; rti; rti; rti;
/*code vectors here upon POWER DOWN int*/
/*Section 2: Configure SPORT0*/
start:
/*to configure SPORT0 control reg*/
/*SPORT0 address = 0X3FF6*/
/*RFS is used for frame sync generation*/
/*RFS is internal, TFS is not used*/
/*bit 0-3 = Slen*/
/*F = 15 = 1111*/
/*E = 14 = 1110*/
/*D = 13 = 1101*/
/*bit 4,5 data type right justified zero filled MSB*/
/*bit 6 INVRFS = 0*/
/*bit 7 INVTFS = 0*/
/*bit 8 IRFS=1 receive internal frame sync*/
/*bit 9,10,11 are for TFS (don’t care)*/
/*bit 12 RFSW=0 receive is Normal mode*/
/*bit 13 RTFS=1 receive is framed mode*/
/*bit 14 ISCLK=0 SCLK is external */
/*bit 15 multichannel mode = 0*/
ax0 = 0x2F0D; /*normal mode, bit 12=0*/
/*if alternate mode bit 12=1, ax0=0x3F0E*/
dm (0x3FF6) =ax0;
/*Section 3: configure CLKDIV and RFSDIV, setup interrupts*/
/*Using an external clock source=9.6MHz*/
/*Does not need to configure CLKDIV*/
/*to Configure RFSDIV*/
ax0 = 15; /*set the RFSDIV reg = 15*/
/*=> the frame sync pulse for every 16 SCLK*/
/*if frame sync pulse in every 15 SCLK, ax0=14*/
dm(0x3FF4) =ax0;
/*to setup interrupt*/
ifc= 0x0066; /*clear any extraneous SPORT interrupts*/
icntl= 0; /*IRQXB = level sensitivity*/
/*disable nesting interrupt*/
imask= 0x0020; /*bit 0 = timer int = 0*/
/*bit 1 = SPORT1 or IRQ0B int = 0*/
/*bit 2 = SPORT1 or IRQ1B int = 0*/
/*bit 3 = BDMA int = 0*/
/*bit 4 = IRQEB int = 0*/
/*bit 5 = SPORT0 receive int = 1*/
/*bit 6 = SPORT0 transmit int = 0*/
/*bit 7 = IRQ2B int = 0*/
/*enable SPORT0 receive interrupt*/
/*Section 4: Configure System Control Register and Start Communication*/
/*to configure system control reg*/
ax0 = dm(0x3FFF); /*read the system control reg*/
ay0 = 0xFFF0;
ar = ax0 AND ay0; /*set wait state to zero*/
ay0 = 0x1000;
ar = ar OR ay0; /*bit 12 = 1, enable SPORT0*/
dm(0x3FFF) = ar;
/*frame sync pulse regenerated automatically*/
cntr = 5000;
do waitloop until ce;
nop;
nop;
nop;
nop;
nop;
nop;
waitloop: nop;
rts;
.endmod;
ADSP2181 Code for Circuit

LTC1404CS8#PBF

Mfr. #:
Manufacturer:
Analog Devices Inc.
Description:
Analog to Digital Converters - ADC Complete SO-8, 12-B, 600ksps ADC w/ SD
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union