8.6.3Calibration of the ADC

Software Overview

8.6.3Calibration of the ADC

CALIBRAT.ASM

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

* TITLE

: TLV1562 ADC Interface routine

*

* FILE

: CALIBRAT.ASM

*

* FUNCTION

: CALIBRAT_INTERNAL_MID_SCALE

*

*

CALIBRAT_SYSTEM_MID_SCALE

*

* CALLS

: N/A

*

* PRECONDITION

: N/A

*

* POSTCONDITION

: N/A

*

* SPECIAL COND.

: N/A

*

* DESCRIPTION

: routine to perform a ADC calibration

*

* AUTHOR

: AAP Application Group, ICKE, Dallas

*

*

CREATED 1998(C) BY TEXAS INSTRUMENTS INCORPORATED.

*

* REFERENCE

: TMS320C54x User’s Guide, TI 1997

*

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

.title

”CALIBRAT”

.mmregs

 

.width

80

.length

55

.version 542

.if (IME_CALIBRATIONSME_CALIBRATION)

.sect ”.data”

CR_CALIBRA .usect ”.variabl”, 1 ; temporary variable, can be changed anywhere during the program

.sect ”.text”

.if (IME_CALIBRATION)

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

*CALIBRAT_INTERNAL_MID_SCALE

*performs an internal calibration of the ADC to offset for internal device errors

*basic idea: do a error calibration in mono interrupt driven mode using CSTART

*for conversion but use the channel & single/differential input information already

*set-up in the CR0_send register from

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

CALIBRAT_INTERNAL_MID_SCALE:

DP

= #AD_DP

; initialize data pointer

* clear calibration related bits in CR0:

 

@CR0_SEND &= #(NO_CALIB_OP^0FFFFh)

; clear bit for no calibration use

@CR0_SEND &= #(CALIB_OP^0FFFFh)

; clear bit for no calibration use

*initialize the send values to setup the two programmable registers of the ADC to calibrate

data(CR_CALIBRA) = @CR0_SEND ; load help register with CR0 content

*use calibrated mode in the following for conversion

@CR0_SEND = #CALIB_OP

; set calibration for further use

Interfacing the TLV1562 Parallel ADC to the TMS320C54x DSP

53

Page 59
Image 59
Texas Instruments TLV1562 manual Calibration of the ADC, Calibrat.Asm, Software Overview