8.6Source Code

Software Overview

8.6Source Code

The following paragraphs contain the source code.

8.6.1Common Software for all Modes (except C-Callable)

The files shown below contained the actual ’C54x program listings and program examples.

8.6.1.1Constants.asm

***************************************************************************

* TITLE

: TLV1562 ADC Interface routine

*

* FILE

: CONSTANT.ASM

*

* FUNCTION

: N/A

*

* PROTOTYPE

: N/A

*

* CALLS

: N/A

*

* PRECONDITION

: N/A

*

* POSTCONDITION

: N/A

*

* SPECIAL COND.

: N/A

*

* DESCRIPTION

: definition of constant values for interface software

*

* AUTHOR

: AAP Application Group, ICKE, Dallas/Freising

*

*

CREATED 1998(C) BY TEXAS INSTRUMENTS INCORPORATED.

*

* REFERENCE

: TMS320C54x Assembly Language Tools, TI 1997

*

*

TMS320C54x DSKPlus User’s Guide, TI 1997

*

*

Data Aquisation Circuits, TI 1998

*

***************************************************************************

********************************

*SEND WORDS FOR THE ADC TLV1562

********************************

*INDEX MODE 0:

CH1

.set 00000h ;

Channel selection is Channel 1

CH2

.set 00001h ;

Channel selection is Channel 2

CH3

.set 00002h ;

Channel selection is Channel 3

CH4

.set 00003h ;

Channel selection is Channel 4

PAIR_A

.set 00000h ;

Channel selection is Pair A

PAIR_B

.set 00003h ;

Channel selection is Pair B

MONO_INT

.set 00000h

;

Conversion mode selection is Mono Interrupt

DUAL_INT

.set 00004h

;

Conversion mode selection is Dual Interrupt

MONO_CONTINUOUS

.set 00008h ;

Conversion mode selection is Mono Continuous

DUAL_CONTINUOUS

.set 0000Ch ;

Conversion mode selection is Dual Continuous

SINGLE_END

.set 00000h

;

Input type is Single Ended

DIFFERENTIAL

.set 00010h ;

Input type is Differential

CLK_INTERNAL

.set 00000h ;

Conversion clock selection is Internal

CLK_EXTERNAL

.set 00020h ;

Conversion clock selection is External

CALIB_OP

.set 00000h

;

Operate with the calibrated inputs

SYS_OFF_CALIB

.set 00040h ;

do a system offset calibration

INT_OFF_CALIB

.set 00080h ;

do a internal offset calibration

Interfacing the TLV1562 Parallel ADC to the TMS320C54x DSP

41

Page 47
Image 47
Texas Instruments TLV1562 Source Code, Common Software for all Modes except C-Callable, Constants.asm, Software Overview