Datasheet

29
LTC1417
sn1417 1417fas
TYPICAL APPLICATIONS
U
* E-Clock frequencies, change the above value of $50 to a
* value that ensures the SCK frequency is 2MHz or less.)
GETDATAPSHX
PSHY
PSHA
*
*****************************************
* Setup indecies *
*****************************************
*
LDX #$0 The X register is used as a pointer to the memory
* locations that hold the conversion data
LDY #$1000
*
*****************************************
* Initialize the LTC1417’s CONVST input *
* to a logic high before a conversion *
* start *
*****************************************
*
BSET PORTC,Y %01000000 This sets PORTC, Bit6 output to a logic
* high, forcing CONVST to a logic high
*
*****************************************
* Retrieve the MUX address from memory *
* and send it to the DG408 *
*****************************************
*
LDAA PORTC Capture the contents of PortC
ORAA MUX “Add” the MUX address
STAA PORTC Select the MUX channel
*
*****************************************
* Initiate a LTC1417 conversion *
*****************************************
*
BCLR PORTC,Y %01000000 This sets PORTC, Bit6 output to a logic
* low, initiating a conversion
BSET PORTC,Y %01000000 This resets PORTC, Bit6 output to a logic
* high, returning CONVST to a logic high
*
*****************************************
* The next short loop ensures that the *
* LTC1417’s conversion is finished *
* before starting the SPI data transfer *
*****************************************
*
CONVENDLDAA PORTC Retrieve the contents of port D
ANDA #%10000000 Look at Bit7
* Bit7 = Hi; the LTC1417’s conversion is complete
* Bit7 = Lo; the LTC1417’s conversion is not
* complete
BPL CONVEND Branch to the loop’s beginning while Bit7
* remains high
*
*************************************************************************
* This routine sends data to the LTC1417 and sets its MUX channel. The *
* very first time this routine is entered produces invalid data. Each *
* time thereafter, the data will correspond to the previous active *
* CONVST signal sent to the LTC1417. *
*************************************************************************
*