.elseif NO_INT0_SIG

Software Overview

.elseif NO_INT0_SIG

*instead of using the INT signal, the processor waits

*for 6ADCSYSCLK+49ns and reads then the sample repeat(#32)

nop

 

; wait for 34 processor cycles

.endif

 

 

 

 

* read sample

 

 

 

 

STEP7: @ADSAMPLE = port(ADC)

; read the new sample into the DSP

 

 

 

 

 

XF

= 1

; set RD

.if (SEND_OUT_PARALLEL)

* store sample into the parallel buffer location if choosen

port(DAC1) = @ADSAMPLE

; update DAC output

 

 

 

 

@TEMP = port(ADC)

; activate ADC CS again

.endif

 

 

 

.if (AUTO_PWDN)

*deselect/select the ADC with CS (requirment in Auto power down mode) @TEMP = port(DEACTIVE) ; deselect ADC

@TEMP = port(ADC)

; activate ADC CS again

repeat(#18)

 

nop

; wait for 20 clock cycles [t(APDR)=500ns]

.endif

XF

= 0

; clear RD (step 4)

call

STORE

; handle storing of the samples into memory and serail DAC

.if INT0_DRIVEN

 

return

; return from routine back to IRQ_INT0

.else

 

 

goto

STEP5

; go back to receive next sample

.endif

 

 

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

*STORE:

*saving the samples into memory

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

STORE:

.if SAVE_INTO_MEMORY

* store new sample into DSP data memory

*AR7+ = data(@ADSAMPLE) ; write last sample into memory table

.endif

.if SEND_OUT_SERIAL

* store sample into the serial buffer location

Interfacing the TLV1562 Parallel ADC to the TMS320C54x DSP

51

Page 57
Image 57
Texas Instruments manual Software Overview, elseif NOINT0SIG, Interfacing the TLV1562 Parallel ADC to the TMS320C54x DSP