500-003111-000
4-21
LEA
LEA
MOVE.W
BCLR
MOVE.W
CLR.W
LEA
MOVE.W
MOVE.W
SUB.W
BNE.W
MOVE.W
MOVE.W
BTST
BNE
MOVE.W
SUB.W
BPL
NEG.W
SUB.W
BGT
ADD.W
CMP.W
BNE.W
BRA.S
BSET
END
STARTSEQ
DELAY
READ
POS
FAIL
ENDSEQ
#$FBFF0002, A1
$FBFF000C, A5
#$0000, $FBFF000E
#1, TFLAGS
#$75C0, D3
D1
#$FBFF0004, A3
D1, (A3)
#$FF, D4
#$1, D4
DELAY
D3, (A1)
(A1), D5
#15, D5
READ
(A5), D2
D1, D2
POS
D2
#$4, D2
FAIL
#$0001, D1
#$1000, D1
STARTSEQ
ENDSEQ
#1, TFLAGS
GET UUT CSR ADDRESS
A/D DATA ADDRESS
SELECT GAIN = X1
CLEAR LOOPBACK FAIL FLAG
CONTROL WORD D/A CH.00
CLEAR DATA REGISTER
ADDRESS CHANNEL 00
WRITE DATA OUT
SET DELAY
DELAY
END DELAY?
WRITE CONTROL WORD
READ STATUS REGISTER
IS NEW DATA READY?
IF NOT CHECK AGAIN
READ NEW DATA
SUBTRACT WRITE FROM READ
IF POS TRUE DON'T NEGATE
NEGATE NEG TRUE TO POS TRUE
COMPARE TO MAX ERROR VALUE
FAIL IF > MAX ERROR VALUE
INCREMENT DATA REGISTER
DONE ALL DATA?
IF NOT DO MORE DATA
GO TO END SEQUENCE
SET LOOPBACK FAIL FLAG
END SEQUENCE
M3111/F4.8.1-2
Figure 4.8.1-2. Program Example - Loopback Self-Test
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com