How to drive a NI PXI-8433 4-RS485 card

Happy new year guys!

Now I want to use several PXI-8464 (4 port RS485/422 card from National Instruments) with QNX 6.3.2.

The ‘pci -v’ display about this card is as follows:

Class = Communication (Other)
Vendor ID = 1093h, National Instruments
Device ID = 70edh, Unknown Unknown
PCI index = 1h
Class Codes = 078000h
Revision ID = 0h
Bus number = 4
Device number = 12
Function num = 0
Status Reg = 280h
Command Reg = 117h
Header type = 0h Single-function
BIST = 0h Build-in-self-test not supported
Latency Timer = 20h
Cache Line Size= 8h un-cacheable
PCI Mem Address = d0303000h 32bit length 4096 enabled
Subsystem Vendor ID = 1093h
Subsystem ID = 70edh
Max Lat = 0ns
Min Gnt = 0ns
PCI Int Pin = INT A
Interrupt line = 9
CPU Interrupt = 9h

Strangely I don’t see the PCI I/O address in above info. So I don’t know how to drive this card with devc-ser8250. Can anybody tell me how to drive it?

Thx
Zoug

That’s probably because it doesn’t use I/O address. Hence it may not be compatible with devc-ser8250

Ooh, that makes sense.
So can I drive this card with any other driver, anyway?

Can anybody tell me what driver I can try?

This card has an onboard Memory which may be a FIFO or similar. check the docu form the card vendor.
You may be able to directly write into the memory given by PCI Mem Address.

If the UART’s are fairly standard, but the card just happens to show a memory mapped interface, it might be fairly easy to convert the QNX driver from source. Of course much more complex things are possible, such as an onboard cpu to handle control of the UART. For this you would most definitely need the specifications to get anywhere.

According to the info I found on NI’s site, this card does not provide 8250 like interface. It seems like it’s a propretary interface. Look around to see if somebody has done a QNX6 driver for this card, or get someone to do a driver for you ( assuming the specs are available, but I think NI is open about this). Or change model of card.

Thanks for all the professional analysis. The local NI engineer can’t provide the spec of this card. I yesterday seeked a PXI-8421 8-port card and this has IO address.
I’ve already driven this card with following commands:
devc-ser8250 -u3 0x3000,9
devc-ser8250 -u4 0x3008,9
devc-ser8250 -u5 0x3010,9

devc-ser8250 -u10 0x3038,9

I looped back the port 3 and port 4. And tried sending a text file between them. However, I can’t see the display by “cat /dev/ser4”. I’m still looking into this.

Seems to me PXI-8421 is also not a generic 8250 device. The docs talk about DMA operation which is not something a 8250 like device support. Plus it only says that it’s compatible with Windows OS. Device that are 8250 will most often state they are compatible with any OS.

I tried sending some data with PXI-8421. I can see the wave from a scope. But I can’t receive data with a loopback ser3 to ser4. I don’t know why.

Hi, I’m back from vacation.

I did the loopback test with the 8-port card PXI-8421(which is able to be driven by devc-ser8250). I have the /dev/ser3 through ser10 by devc-ser8250. I don’t have echo with ‘qtalk’ utility. This I think is the same problem with the earlier test.

Another fact I think is noticeable is when I test this same card with NI’s Windows platform, the RS-422 communication is very good, and the waveform observed from a scope is also nice. When the card is working with a same machine but with QNX, the loopback test never works. Not to mention the communication with other device. And we can see the waveform is not stable in the scope. (I’m quite sure the wiring of the loopback is OK.)

Based on the above fact, I can not find a reasonable cause of the problem. Can you help us to find out the reason? Mario, where do you find the PXI8421 doc about the DMA like content?

If I stick to the PXI-8421 card, what can I do to make it work with QNX?

Hi,
You would not be able to test RS485 with generic OS utilities like cat or qtalk.
In RS485/422 there is an trick related to the control of the Output Transmit / Receive drivers.
Usualy manufacturers are using RTS signal to enable / disable these drives.
You need to toggle RTS from your application when transmit / receive.
->Toggle RTS
->Transmit
->Wait for data to be transitted
->Toggle RTS
->Receive
and so on…
Check with NI what are the active RTS levels for transmit and receive!
Regards,

Thanks koko!
Is the RTS signal you referred to is 2 signal lines (RTS+, RTS-) ? Can this be a problem? I’m not sure. When I did the Windows testing with the same setup, I didn’t wire these 2 lines. The loopback cable consists only 2 lines (Tx+ – Rx+, Tx- – Rx-). And it works OK.

Another fact confusing me is that the signal voltage is up to 40 volts hi, between the Tx+ and Tx-. Is this normal?

The serial chipset is 16C954 for the PXI-8433 , and 16C654 for the PXI-8421. The most advanced chipset by QNX is 16C550 family, however. This might be the reason. Thanks everyone!

RTS is wired internally as chip_enable signal to the buffers for transmit / receive separately, so it enables and disables them alternatively. You wont see RTS on RS484/422 cable.
This way toggling RTS you are attaching to the bus either transmit or receive line!