Manual background

 

 

 

 

 

 

Software Overview

nop

 

; wait for some sampling time

 

 

 

 

 

 

 

XF

= 1

; reset CSTART

repeat(#34)

 

 

 

 

 

nop

 

; wait for 34 cycles until conversion has been finished

@TEMP = port(ADC)

; read the sample but don’t care about the content

 

 

 

 

 

IFR

= #1

; reset any old interrupt on pin INT0

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

*set back ADC register CR0/CR1

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

*write CR1 (to reset old CSTART mode initialization, because otherwise, the ADC never sets

*back its int– pin to show a sample is available:

@CR_PROBLEM = #(SW_PWDNNO_AUTO_PWDNNO_2COMPLEMENTNO_DEBUGRES_10_BITRD_CONV_START);

port(ADC) = @CR_PROBLEM

; Address decoder sets CS low,

 

 

 

 

 

 

 

 

 

; WR low and send CR_PROBLEM value to the ADC

NOP

; wait for tW(CSH)=50nS

* write CR1:

 

 

 

 

 

 

 

port(ADC) = @CR1_SEND

; Address decoder sets CS low,

 

 

 

 

 

 

 

; WR low and send CR1 value to the ADC

 

 

 

 

port(DEACTIVE) = @ZERO

; deselect ADC (CS high)

NOP

; wait for tW(CSH)=50ns

* write CR0

 

 

 

 

 

 

 

port(ADC) = @CR0_SEND

; send CR0 value to the ADC

 

 

 

 

port(DEACTIVE) = @ZERO

; deselect ADC (CS high)

NOP

; wait for tW(CSH)=50ns

return

; return from call

.endif

 

 

 

 

 

 

 

.endif

 

 

 

 

 

 

 

Interfacing the TLV1562 Parallel ADC to the TMS320C54x DSP

57

Page 63
Image 63
Texas Instruments manual Software Overview, endif, Interfacing the TLV1562 Parallel ADC to the TMS320C54x DSP