Texas Instruments TLV1562 User Manual
Page 53
Software Overview
47
Interfacing the TLV1562 Parallel ADC to the TMS320C54x DSP
CR0_SEND .usect ”.variabl”, 1 ; sent value to register CR0 of the ADC
CR1_SEND .usect ”.variabl”, 1 ; sent value to register CR1 of the ADC
ZERO .usect ”.variabl”, 1 ; the value zero to send a ”Zero Dummy”
ADSAMPLE .usect ”.variabl”, 1 ; last read sample from the ADC
* TLC5618 conversation
SERIAL_SEND .usect ”.variabl”, 1 ; serial output send word
* other
TEMP .usect ”.variabl”, 1 ; temporary variable, can be changed anywhere during
; the program
* Address Decoder constants:
CSTART .set 00001h ; activate A1 when CSTART is choosen
ADC .set 00002h ; activate A2 when TLV1562 is choosen
DAC1 .set 00003h ; activate A3 when DAC1 is choosen
DEACTIV .set 00000h ; deactivate the address lines A0, A1 and A2
* set timing mode (use od IRQ, or timer)
POLLING_DRV .set 00001h ; software polls the INT0 pin to wait, until conversion
is done
INT0_DRIVEN .set 00000h ; software uses Interrupt INT0 to organize conversion
NO_INT0_SIG .set 00000h ; INT0 signal not in use, interface is controlled with
timing solution
SAVE_INTO_MEMORY .set 00001h ; store the samples into DSP memory, defined in
”constants.asm”
SEND_OUT_SERIAL .set 00000h ; send the samples always to the serial DAC
SEND_OUT_PARALLEL .set 00001h ; update always the parallel DAC with the last sample
(DAC1)
R10BIT_RESOLUT .set 00001h ; use maximum resolution of 10-bit
R8BIT_RESOLUT .set 00000h ; use 8-bit resolution
R4BIT_RESOLUT .set 00000h ; use fastest mode (4-bit resolution)
INTERNAL_CLOCK .set 00001h ; use the internal clock of the ADC
EXTERNAL_CLOCK .set 00000h ; use the external clock of the ADC
AUTO_PWDN_ENABLE .set 00000h ; ADC goes into power reduced state after conversion
DIFF_INPUT_MODE .set 00001h ; use differential mode instead of single ended inputs
.sect ”.text”
_MAIN:
START:
INITIALIZATION:
* disable IRQ, sign extension mode, ini Stack
INTM = 1 ; disable IRQ
SXM = 0 ; no sign extension mode
; SP = #0280h ; initialize Stack pointer