52SLAA040
Software Overview
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 is not able to understand ; endless data-streem (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;
@ADSAMPLE = #(TLC5618_LATCH_ATLC5618_FAST_MODETLC5618_POWER_UP) ; set the mode of the DAC
data(BDXR) = @ADSAMPLE ; send out the sample to the serial DAC SEND_SERIAL_END:
.endif
.if SAVE_INTO_MEMORY

* test for table end, set pointer back if true

TC

= (AR0 ==AR7)

; is AR0 = AR7? (table end reached?)

if (NTC) goto STORE_END

;

* set pointer back to table start

 

AR7

= #(data_loc_A)

; point to first date location of the storage table

.endif

 

 

STORE_END: RETURN

; jump back into data aquisition routine

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

*IRQ_INT0:

*Interrupt routine of the external interrupt input pin INT0

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

IRQ_INT0:

call STEP7

;

initialize the next conversion and store results

return_enable

;

return from IRQ (wake up from the IDLE mode)

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

*BXINT0:

*Interrupt routine of the serial transmit interrupt of the buffered SPI

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

BXINT0:

return_enable

; interrupt is not in use

.sect ”.text”

.copy ”TLC5618.asm”

.end

52SLAA040

Page 58
Image 58
Texas Instruments TLV1562 manual endif, SLAA040