Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How does TNT4882 assert the NRFD line after it has been addressed to listen!!!

Hello,

 I am trying to achieve a Listner/Talker GPIB interface using the TNT4882 ,and the computer side is PCI-GPIB .MAX won't find my TNT4882 when I scan for instruments. I have already successed in using TNT4882 with USB-GPIB and VB6.0,TNT4882 sent or received normaly.But when I use PCI-GPIB and labview ,it doesn't work,MAX won't find my TNT4882 .

I have got that 

"The scan for instruments checks every primary address (pad) and secondary address (sad) to see if there are any instruments there.  It starts at pad 0 and addresses it to listen.  After a short time, it checks to see if the NRFD line has transitioned to accept data as expected.  If the NRFD line does not transition, then the controller knows that there are no instruments at that address. "

My question is that  how does  TNT4882 assert  the NRFD line after it has been addressed to listen? Doesn't TNT4882 automatic management it?

 

Can anybody, please help me  ?
Thanks

 

My codes is as followed:

;TNT4882初始化子程序段
TNT_INI:MOV  A,#22H   ;提取复位Turbo488电路的控制数据
 MOV  DPTR,#CMDR  ;指向命令寄存器地址
 MOVX  @DPTR,A   ;复位TNT4882中的Turbo488电路
;将TNT4882设置成Turbo+7210方式程序段
 MOV  A,#80H
 MOV  DPTR,#SPMR  ;指向连续轮询模式寄存器地址
 MOVX  @DPTR,A
 MOV  DPTR,#AUXMR  ;指向辅助模式寄存器(AUXCR)地址
 MOVX  @DPTR,A   ;软件重启TNT4882
 MOV  A,#99H   ;转换到7210模式
 MOVX  @DPTR,A
 MOV  DPTR,#SPMR  ;将TNT4882设置成Turbo+7210模式
 MOVX  @DPTR,A
;将TNT4882设置成单芯片模式程序段
 MOV  A,#01H   ;将TNT4882设置成单芯片模式
 MOV  DPTR,#HSSEL  ;指向握手选择寄存器地址
 MOVX  @DPTR,A
;使Local Power-On信号有效程序段
 MOV  A,#02H   ;使Local Power-On信号有效
 MOV  DPTR,#AUXMR  ;指向辅助模式寄存器地址
 MOVX  @DPTR,A
;设置TNT4882的GPIB地址程序段
 MOV  A,#31H   ;设置正常双地址模式
 MOV  DPTR,#ADMR  ;指向地址模式寄存器地址
 MOVX  @DPTR,A
 MOV  A,42H   ;提取TNT4882的GPIB地址
 MOV  DPTR,#ADR  ;指向地址寄存器地址
 MOVX  @DPTR,A   ;将GPIB的听、讲地址写入ADR0
 MOV  A,#0E0H      ;设置ADR1的听讲地址无效(即第二个地址无效)
 MOVX  @DPTR,A
;设置初始串行轮询响应程序段
 MOV A,#17H   
 MOV  DPTR,#SPMR  ;指向连续轮询模式寄存器地址
 MOVX  @DPTR,A
;设置初始并行轮询响应程序段
 MOV A,#09H
 MOV  DPTR,#AUXMR  ;指向辅助模式寄存器地址(写AUXMRI)
 MOVX  @DPTR,A
 MOV A,#70H   ;U=1,不响应并行查询
 MOV  DPTR,#AUXMR  ;指向辅助模式寄存器地址(写PPR)
 MOVX  @DPTR,A
;清除或设定中断程序段
 MOV  A,#84H   ;开ATN中断
 MOV  DPTR,#IMR0  ;指向中断寄存器0地址
 MOVX  @DPTR,A
 MOV A,#01H   ;开ADSC中断
 MOV DPTR,#IMR2  ;指向中断寄存器2地址
 MOVX @DPTR,A
 MOV A,#02H   ;置位TLCINT,允许TNT4882内部中断源触发CPU中断
 MOV DPTR,#IMR3  ;指向中断寄存器3地址
 MOVX  @DPTR,A
;设定GPIB握手参数程序段
 MOV A,#00H   ;设置TNT4882为正常三线挂钩模式
 MOV  DPTR,#HIER  ;指向高速使能寄存器地址
 MOVX  @DPTR,A
 MOV  A,#00H   ;设置GPIB握手参数
 MOV  DPTR,#MISC  ;指向多功能寄存器地址
 MOVX  @DPTR,A
 MOV A,#0DH   ;回车符0DH作为数据传输结束标志字符
 MOV DPTR,#EOSR  ;指向数据传输结束标志字符寄存器
 MOVX @DPTR,A
;清除Power-On信号,开始GPIB操作程序段
 MOV  A,#51H   ;坚持立即握手
 MOV  DPTR,#AUXMR  ;指向辅助模式寄存器地址
 MOVX  @DPTR,A
 MOV  A,#00H   ;立即执行Power-On信号,开始GPIB操作
 MOVX  @DPTR,A
 RET

 

0 Kudos
Message 1 of 5
(4,581 Views)
I am using tnt4882 in a project ,now,it works well.if you have trubles,please contect me,my email:feige52031@sina.com,qq:26752749. 飞哥
技术无止境
0 Kudos
Message 2 of 5
(4,550 Views)

Hello,

 

The minimum communication required to get the TNT4882 is shown in the manual.  You seem to be following the process correctly since another GPIB interface is able to recognize the TNT4882 as on the bus.

 

If the other GPIB interface no longer recognizes the instrument, you could make some small changes in the initialization routine. 

 

1.  Step 2.4 seems to happen before step 2.3.  I don't know what would change, but you should follow the exact steps from the manual.

2.  Step 5.A loads primary address 2 and disables it as a talker.  You should also disable the secondary address as shown in the manual.

 

I also recommend checking your GPIB cables and connections to make sure that hardware is not causing this problem.

 

I hope this helps,

Steven T.

0 Kudos
Message 3 of 5
(4,538 Views)
Hello,Steven
Thanks very much for your advice!
1. It's my mistake to make Step 2.4 happen before step 2.3.
;将TNT4882设置成Turbo+7210方式程序段
MOV A,#80H
MOV DPTR,#SPMR ;指向连续轮询模式寄存器地址
MOVX @DPTR,A
MOV DPTR,#AUXMR ;指向辅助模式寄存器(AUXCR)地址
MOVX @DPTR,A ;软件重启TNT4882
MOV A,#99H ;转换到7210模式
MOVX @DPTR,A
MOV DPTR,#SPMR ;将TNT4882设置成Turbo+7210模式
MOVX @DPTR,A

That just because that in that case,I don't have to change DPTR in 51 for another time,I am lazy!
2.I think I have already disable the secondary address as following:
MOV A,42H ;提取TNT4882的GPIB地址
MOV DPTR,#ADR ;指向地址寄存器地址
MOVX @DPTR,A ;将GPIB的听、讲地址写入ADR0
MOV A,#0E0H ;设置ADR1的听讲地址无效(即第二个地址无效)
MOVX @DPTR,A
what other ways can you help me to disable the secondary address?

I have already Browsed the posts related for somedays,and I have not found the reason!
Now,I have some questions:
1.I am trying to programme to make TNT4882 to response to the "*IDN?"command
I wonder that is response to the "*IDN?"command a matter to the equipment search by MAX
2.Should I also be have to programme to make TNT4882 to response to the other IEEE488.2 common commands
3.How does the MAX work when it search equipment? What other things does MAX do after it couldn't detect the NRFD?

I will take your advice ,and let you know what happened!





0 Kudos
Message 4 of 5
(4,531 Views)

Hello,

 

I misread the code in the last post.  You are already disabling the second address correctly.  With the your current code, your instrument should show up in MAX during a 'scan for instruments'.  However it will not yet have a response to "*IDN?" so the name will not show up.  Does your instrument at least show up in MAX now for all GPIB interfaces?

 

1.I am trying to programme to make TNT4882 to response to the "*IDN?"command
I wonder that is response to the "*IDN?"command a matter to the equipment search by MAX

 

Getting the TNT4882 to respond to the *IDN? command is quite a bit more work.  You must implement the data transfer portion of the instrument from chapter 4 of the manual.  There are quite a few steps.  What part has you stuck?


2.Should I also be have to programme to make TNT4882 to response to the other IEEE488.2 common commands

 

It depends on what type of instrument you are making.  I would start with the easy commands like *IDN? and move from there to other scpi commands for clearing the IO FIFOs etc.


3.How does the MAX work when it search equipment? What other things does MAX do after it couldn't detect the NRFD?

If MAX cannot detect an instrument at an address, then it assumes there is no instrument at that location during a scan for instruments.  In that case, no *IDN? is even sent to that address because there were no instruments ready to accept the command.

 

I hope this helps.  Please let me know your current status.

 

Thanks,

Steven T.

0 Kudos
Message 5 of 5
(4,462 Views)