National Instruments Corporation GPIB-1014P User Manual page 128

Table of Contents

Advertisement

Sample Programs
68000
Code
------------------------------------------------------------------------------------------------------------------------------------------------
READ: movb
cmdbuf.L,cmdbuf.L+2 | Put Untalk and Unlisten commands before
movb
#UNT,cmdbuf.L
movb
#UNL,cmdbuf.L+1
addw
#2,cmdct.L
bsr
CMD
movb
#LTN,AUXMR.L
movb
#GTS,AUXMR.L
movw
#datct,d0
movl
#datbuf,a0
bsr
RCV
movb
TCS,AUXMR.L
READ1:
btst#NATN,ADSR
bne
READ1
subw
#1,cmdct
bsr
CMD
movb
#LUN,AUXMR.L
rts
GPIB-1014P User Manual
|
|
Comments
|
| Talker address in the buffer
|
|
| Command routine will address the Talker
| Program GPIB-1014P to be a Listener
| so it can take control synchronously
| later; then go to standby and drop ATN
| Take control
| Preset d0 register with byte count
| Preset a0 register with buffer address
| Receive routine will read data
|
|
| Wait for ATN, indefinitely
|
|
| Prepare to unaddress all Talkers and Listeners
| using CMD
|
| Send Local Unlisten command
|
|
C-12
Appendix C
© National Instruments Corporation

Advertisement

Table of Contents
loading

Table of Contents