Texas Instruments TLV1562 Software Overview, if AUTOPWDNENABLE, endif, if INT0DRIVEN, SLAA040

Models: TLV1562

1 99
Download 99 pages 55.38 Kb
Page 78
Image 78
72SLAA040
; return from routine back to IRQ_INT0
; go back to receive next sample

Software Overview

* read

sample

 

STEP2:

XF

= 0

STEP10: @CH1_ADSAMPLE = port(ADC)

STEP14: @CH2_ADSAMPLE = port(ADC) STEP3:

.if (AUTO_PWDN_ENABLE)

;clear CSTART

;read the new sample into the DSP

;read the new sample into the DSP

;wait for TW(CSTARTL)

*wait 800ns before finishing the sampling (requirment in Auto power down mode) repeat(#38)

nop

 

 

; wait for 40 clock cycles [t(APDR)=1000ns]

.endif

 

 

 

 

 

 

 

 

 

 

 

STEP4: XF

=

1

; wait for TW(CSTARTL) and set CSTART

call

STORE

 

; store the last sample into the table

.if INT0_DRIVEN

return

.else

goto STEP5

.endif

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

*STORE:

*saving the samples into memory

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

STORE:

.if (SEND_OUT_PARALLEL)

*store sample into the parallel buffer location if chosen port(DAC1) = @CH1_ADSAMPLE ; update DAC output with sample one

.endif

.if SAVE_INTO_MEMORY

* store new sample into DSP data memory

*AR7+ = data(@CH1_ADSAMPLE) ; write last sample of channel 1 into memory table *AR6+ = data(@CH2_ADSAMPLE) ; write last sample of channel 2 into memory table

.endif

.if SEND_OUT_SERIAL

* store sample into the serial buffer location

DP

=

#00000h

; point to

page

zero

TC

=

bitf(@SPC,#01000h); test, is the

XRDY

Bit in SPC=1?

if (TC) goto SEND_SERIAL_END ; don’t send something until XDR is empty

;this has been included because the serial DAC TLC5618A isn’t able to understand

;endless data–stream (the CS should not become high before end of sending

;the 16th bit)

DP = #AD_DP

; reset Data page pointer to variables

A= @ADSAMPLE<<2 ; leftshift of the sample for a 12 bit format

@ADSAMPLE = A

;

72SLAA040

Page 78
Image 78
Texas Instruments TLV1562 manual Software Overview, if AUTOPWDNENABLE, endif, if INT0DRIVEN, if SENDOUTPARALLEL, SLAA040