Software Overview
57
Interfacing the TLV1562 Parallel ADC to the TMS320C54x DSP
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_PWDN|NO_AUTO_PWDN|NO_2COMPLEMENT|NO_DEBUG|RES_10_BIT|RD_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
Содержание TLV1562
Страница 6: ...vi SLAA040 ...