Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-GPIB board, MITE programming

I am working on a driver for an NI PCI GPIB board. I would like to confirm if I am getting valid results from the MITE chip. I get a value of 0x31114013 when I read the MITE chip signature register at offset 0x460. Is this the correct value for the MITE chip on this board? Is there a reference available that says what the correct value should be? Aidan Grey
0 Kudos
Message 1 of 9
(5,456 Views)
I think you might have the upper and lower words swapped. I think you should be reading 0x40133111.

It may not be a good idea to assume what you read from the chip signature register at 0x460 will remain constant across different versions of the same product. I can think of at least three different values that can be read from 0x460 in various PCI-GPIBs. They are all functionally the same but the value in this register can change. If you are reading this register just to test your SW you should be fine. Your finished code shouldn't make any assumptions about the value read from this register.
0 Kudos
Message 2 of 9
(5,453 Views)
It does seem that I had the upper and lower words reversed. However, there are at least three register values where the words are NOT reversed. These are, the board address values at "base0 + PBAR0_OFFSET", "base0 + PBAR1_OFFSET", and the board serial number at "base1 + 0x2004". These value must be left intact. Is there any documentation on this, that would say when a 32 bit data value should be reversed or not? Aidan Grey
0 Kudos
Message 3 of 9
(5,438 Views)
This seems strange. Can you read the PCI vendor/device ID at PBAR0 + 0x300 (do a single 32-bit read).

What processor and operating system are you using?

Can you tell me the part number of the PCI-GPIB you are using? This should be marked somewhere on the board. The part number should start with 183617 or 188513, followed by a letter, a dash, and two more numbers.
0 Kudos
Message 4 of 9
(5,436 Views)
The vendor/device ID comes back as 0xC8011093. I am using dual Pentium II processors, and the operating system is OS/2 version 4.5. I am using the OpenWatcom C compiler version 1.3. There are two such part numbers on the card. The first is 183619B-01, and the second is ASSY183617C-01.
0 Kudos
Message 5 of 9
(5,403 Views)
That is the correct value for the Device/Vendor ID.

Do you have a logic analyzer you could use to see exactly what is happening on the PCI bus? Ideally you could look at the same bus segment that the PCI-GPIB is on.

Have you noticed this behavior with any other register accesses?

Can you read offset 0x470 from the same base address and post the result?

Are you using the same code/driver for all of these register accesses you are doing? Do you have some other utility you can use to read these registers and see if you get the same value?
0 Kudos
Message 6 of 9
(5,399 Views)
I don't have access to a logic analyzer. I don't have any easy way to compare this with other PCI boards either. The value at (base0 + 0x470) is 0x0032009D. What I find puzzling at this point is that reads and writes seem to follow different rules. The physical address and the board serial number seem correct without swapping the upper and lower words. However, when I write the physical addresses in to activate the TNT window, the words must be swapped.
0 Kudos
Message 7 of 9
(5,389 Views)
The value at 0x470 seems to be word-swapped also.

Do you have a software utility that you can read/write registers on the PCI-GPIB, without using your driver? I'd like to remove your driver from the system and see what the behavior is. There are plenty of such utilities for Windows, but I'm not familiar with OS/2 utilities.

Also, can you tell me the manufacturer of the computer you are using, as well as the BIOS version?
0 Kudos
Message 8 of 9
(5,386 Views)
I don't have any easy way to read or write to the MITE registers outside of my driver. I was having problems with the function "nipci_init_tnt_mite" in the GPIB DDK. In order to activate the TNT window, I had to read the board addresses, and then write back the TNT value with the line "MITEout32((base0 + 0xc0), (pbar1 | 0x80)); ". This was failing, until I understood that the TNT address value had to be read one way, and then written back with the words reversed. The initialization is now going through without errors, so I am moving on to the next stage of my driver. However, I was wondering if this behaviour was documented somewhere. As I noted in my previous post, this seems a very puzzling way to do things. It seems like swapping the word values is the default, but if that is the case, why are there so many exceptions. Since the MITEin32 and MITEout32 functions are only used to initialize the board, I am no longer concerned with them. It looks like all further accesses to the board are 8 or 16 bits. Thanks for your help, I didn't have any idea what the correct values for any of the MITE registers might be before you posted.
0 Kudos
Message 9 of 9
(5,313 Views)