PCI-6503 RLP Mapping.

Hello,
I have a PCI 6503, and I am developing a driver to run the card.  Everything, so far, is going fine.
The driver loads, I have the VID and PID for the device.  PNP finds the board and tells me all about it.  I have the doc ...  "PCI-6503 User Manual" (374938b.pdf) and was doing fine until the appendix B, page 14.
But now I have some concept questions.
The driver is enumerating the resources with memory (and an interrupt) not register ports. I was epxecting registers...
Specifically there are two memory windows,  Then the appendix starts talking about remapping memory.
First....  Isn't that a violation of the PCI PNP spec to redefine resource addresses?    Why would this even be an option?  It says the programmer has to keep track of what resource is being used...  so I have to go into the device manager and look at all the resources, and pick some that are not used?  Which is fine until the PNP manager reassigns some stuff.  Then the machine is dead in the water...
Next... The next page (B15) has a table of 'register' addresses.  But the PCI PNP enumeration didn't give any registers, only memory addresses.  Where do these come from?  (is it a misnomer?)
Then I just get even more lost...  The doc starts talking about BAR0 and BAR1.
Which of ther two memory windows is BAR0 and BAR1? Or are they not it at all?
It says to write to BAR0 + 0x10?  Which memory window is the BAR?
    (my card came up with fdfff000 and fdffe000, which oddly enough has the memory spaces backwards, not contigous)
Step 3 says write the address you want to use to config space "offset 0x14  (BAR1)".  This implies that BAR1 is BAR0 + 0x14.  But if they are those memory windows, than BAR1 is 4096 bytes away from BAR0, not a mere 20 bytes away.
How, if at all, does this translate to accessing through registers (outb...)   Or is access only ever done through memory alone?
Clearly, I am missing some fundemental concept here.  Up to this point, everthing had been fine.
(I have another simpler question on the interrupt...  it can be configured for PORT A or PORTB...  Is that only when they are configured as inputs?  And is that any specific bit in the port, or the entire 8 bit port?  Is that an 'interrupt on change' ? )
And advice is appreciated.
-Scotty

To answer the second question first, I will be developing RLP drivers in the future, because the DAQmx  is inadequate.  Also, at this stage, I am using it as a learning tool for many other programming tasks.
As to the first question...
Okay, I now see that communication to the card is through memory, not ports.  The term 'register' crosses boundaries, as it does not mean 'memory' in the embedded areas I am used to, it means 'input or output port'.
However, I do not understand this MITE concept.  I did, however find this post from over a decade ago, but I still can't get it to work:
http://forums.ni.com/t5/Driver-Development-Kit-DDK/MITE-init-in-Windows-driver-stumped/m-p/2950901#M...
I posted a followup, but I don't know if the original poster is even monitoring it.
My goal at this stage is just to get PORTA outputs to toggle.
Here is what I am doing, and as far as I can tell is what I am supposed to do. I have filled the driver with kernel debug messages, and everything indicates it is doing what I tell it  (but not doing what I want)
Following the example code on that link, I obtain the base address register, which  is translated  (when I used the untranslated value, I got a BSOD,  doh! ).
I stored the address in my device extension structure so I can get to it later...
Using pages B5,  B19 and B20, I disable the interrupts and set everything as outputs:
    WRITE_REGISTER_UCHAR(block->baseAddress + 0x14, 0);      /* 'block' is in my device extension structure */
    WRITE_REGISTER_UCHAR(block->baseAddress + 0x15, 0);
    command = 0x80;                                        /*  ctrl =1,   mode = 00,  all ports are output  */
    WRITE_REGISTER_UCHAR(block->baseAddress + 0x03, command);
Then I have a program that opens the device and just toggles between FF and 00 to port A on a 1 second loop.  The IO code does this:
   WRITE_REGISTER_UCHAR(block->baseAddress, pWriteDataBuffer[0]);
Again, all kernel debug messages indicate that it is working (or doing what I tell it to do)
The voltages on the lines on the output terminal block do not change.  They are (mostly all) +5V, but never change.
So I have to conclude that the register I am writing to is not the correct memory address to change the PORTA output (or any  of the other ports for that matter).  but at least it is not giving me a bugcheck, so I know the driver owns that memory address..
So this is where I have stalled.  I suspect it goes back to my not underanding the MITE concept.  And as a result, do not have the correct base address.  And I can't find any description.
And further advice is appreciated.
-Scott.

Similar Messages

  • Register level programming of interrupts for PCI 6503

    Hi all,
    I'm basically trying to get an interrupt from the card upon a change in the data of one of the ports (for instance port A) so I can catch pulse signals without having to poll the pins manually at a high rate. I can't figure out from the documentation and examples whether this is actually possible using register level programming (can't use the DAQmX libraries because I use InTime OS). I can set the appropriate bits of the Interrupt Registers in order to enable the two interrupts (A and B), but I'm not sure what condition generates these interrupts.
    Additionally, I want to be able to send out a pulse on a pin and have it automatically cleared by the board.
    As far as I can tell both of my requirements mean using the card in strobed mode, but the code examples don't give enough information how to work in this mode. Do i have to use the handshaking mechanism somehow and if so, how is this better for me over using static i/o and manually checking pin values?
    Any help or referrence would be greatly appreciated.
    Thank you in advance
    Orr

    Hi Orr,
    The best source of information for this device is its user manual [1], and Appendix B discusses the register map and programming considerations.
    Speaking specifically to interrupts, please refer to PDF page 43 (B-2), emphasis mine:
    Two software-controlled registers determine which devices, if any, generate interrupts. Each of the 82C55A devices has two interrupt lines, PC3 and PC0, connected to the interrupt circuitry. On the PCI-DIO-96 and PXI-6508, the 82C53 device has two of its three counter outputs connected to the interrupt circuitry. Any of these 10 signals can interrupt the computer if the interrupt circuitry is enabled and the corresponding enable bit is set. Refer to the Programming Considerations for the 82C53 section for more information. Normally, the handshaking circuitry controls PC3 and PC0 of the 82C55A devices; however, you can configure either of these two lines for input and then use them as external interrupts. An interrupt occurs on the signal line low-to-high transition."
    The pages following that section describe the interrupt control registers and give pseudo-code examples for configuring them.
    Once we clear this obstacle, let's move on to your output questions.
    [1] PCI-DIO-96/PXI-6508/PCI-6503 User Manual
    http://digital.ni.com/manuals.nsf/websearch/6E8329494F3955528625758300678D55
    Joe Friedchicken
    NI VirtualBench Application Software
    Get with your fellow hardware users :: [ NI's VirtualBench User Group ]
    Get with your fellow OS users :: [ NI's Linux User Group ] [ NI's OS X User Group ]
    Get with your fellow developers :: [ NI's DAQmx Base User Group ] [ NI's DDK User Group ]
    Senior Software Engineer :: Multifunction Instruments Applications Group
    Software Engineer :: Measurements RLP Group (until Mar 2014)
    Applications Engineer :: High Speed Product Group (until Sep 2008)

  • Connect NI PCI-6602 with NI PCI-6503

    Hello,
    I want to connect a NI PCI-6602 Counter/Timer with the NI PCI-6503 DIO-Card. The problem is the varying number of pins. (6602->68 pins; 6503 -> 50 pins). Is there a possibility to connect both? Maybe a complete adapter?
    regards Thomas

    Thomas,
    You are correct both cards have male connectors. You could still use the 68M-50F connector if you use a 68-68 cable. Or if you had a 68F-50M then you would need a 50 pin cable. I have found another option, the R6850-D1 Cable(part number 777419-01) . This is a digital cable that was made to use our 68 pin digital devices with 50 pin breakout boxes. It ties the ground lines together and you also loose access to PFI 37,the up/down pin for counter 0, and you loose the +5V line. I think you may want to check the pin mappings to make sure that you really want to connect these 2 boards directly together. When using a 50 pin conversion with the 6602 you will get the following pin mapping:
    Pin Number (1-50) 6602 Signal Name
    1 PFI_25
    2 PFI_28
    3 PFI_27
    4 PFI_24
    5 PFI_30
    6 PFI_31
    7 PFI_26
    8 PFI_29
    9 PFI_21
    10 PFI_23
    11 PFI_19
    12 PFI_17
    13 PFI_18
    14 PFI_16
    15 PFI_22
    16 PFI_20
    17 GND
    18 PFI_34
    19 GND
    20 PFI_35
    21 GND
    22 PFI_33
    23 GND
    24 PFI_32
    25 GND
    26 GND
    27 PFI_38
    28 GND
    29 Reserved
    30 GND
    31 PFI_36
    32 GND
    33 PFI_39
    34 GND
    35 PFI_4
    36 PFI_6
    37 PFI_0
    38 PFI_2
    39 PFI_1
    40 PFI_3
    41 PFI_7
    42 PFI_5
    43 PFI_13
    44 PFI_10
    45 PFI_15
    46 PFI_14
    47 PFI_8
    48 PFI_11
    49 PFI_12
    50 PFI_9
    You will loose half of the cards functionality since half the pins (even numbered pins) will be connected to ground on the 6503. It would be easy for you to short lines to ground this way. It would probably be better if you get a breakout box for each card (SCB-50 and SCB-68) and then connect only the lines you want to share between the cards. So in answer to your question, yes you CAN connect then directly together, but do so with caution, and I do not feel this direct connection is the best solution for y
    ou.
    Hope this helps.
    Kevin R

  • Using PCI-6503 on Win NT 4.0, with NIDAQ 6.8 or 6.9, in a C++ program I found the following DLL Initialization error..

    "Initialization of the DLL C:\WINNT\System32\NIPALU.dll failed. The process is terminating abnormally"
    The card tests OK with MAX2.0 and if I open the test panel first and then compile the exe, it works. So what exactly is the initialization Im missing but happens in MAX ?? While using PCI-6503 with Windows NT 4.0 SP6, and NI-DAQ 6.8.1 or 6.9, is there any initialization that a C++ program needs to do before trying to write to DIO lines ? I have a program in C++ which works fine (writes and reads the DIO lines from PCI-6503) IF I run it after opening the test panel for PCI-6503 in MAX 2.0. Otherwise it gives the following error..
    "DLL Initialization failed
    Initialization of the dynamic link library C:\WINNT\System32\NIPALU.dll failed. The process is terminating abnormally."
    The PCI-6503 tests OK using either NI-DAQ 6.8.1 or 6.9 and I can read write to the DIO lines using the MAX2.0's test panel. Also my program works fine if before compiling the code I open the test panel for PCI-6503 in MAX2.0, so I suspect there is some initialization Im missing in my program. Can someone educate me more on this. Thanks.

    Are you using ComponentWorks++ or just the NI-DAQ C interface?

  • My PCI-6503 card does not get a device number

    I have a PCI-6503 I/0 card installed and it apperas corret in the Device Manager. In the MAX explorer it is identified as PXI device. But I don't get a device number for it. What can I do?

    Marcus;
    Very strange. Is the board working properly without the device number?
    You can also try to assign a device number to the board. To do that, right click at the board, and choos the Properties option. You can enter the device number there.
    Hope this helps.
    Filipe

  • Cannot read from PCI-6503

    Hello,
    I want to read an external signal with Port C of a PCI-6503. But all lines of Port C are always on high signal. In the Max - Test Panel all LEDs of the input terminal 2 are red and connecting with external 5V-Signal brings no response. What can I do?

    cosw,
    When using the Test Panels in Measurement and Automation Explorer (MAX), the LEDS will probably all be red by default. If you connect a TTL compliant signal to the Digital lines and toggle back and forth between 0 and 5V, then you should see the LEDs turn on and off.
    To verify that these lines are working, you may want to try setting them as outputs in the test panel, and use a multimeter to determine if they toggle between 0 and 5V when you change the logic level in the test panel.
    If they do not change, and other lines on the board do work, you may want to click on the Support Tab at the top of the screen and choose to 'Phone NI' for additional help, and to discuss the possibility of getting your board repaired if necessary.
    Regards,
    Jed R.
    Ap
    plications Engineer
    National Instruments

  • How to control instrument switch through PCI-6503 & 50-pin I/O connector

    Hi, everyone:
    I have a problem in controlling an instrument switch which switch position between zero point and measuring point every five minutes during experiment. The hardware used is PCI-6503 card & corresponding 50-pin I/O connector, cable and the software is labview.
    The instrument manufacturer provide a cable(25-pol.SubD-plug male)for connection to computer(or DAQ board).The instrument manual showed the following pin assignment for this cable:
    25-pol subD-male pin assignment(TTL-level):
    meaning zero point measuring point
    Pin 9 MP L H
    Pin 7 ZP H L
    Pin 23 Gnd
    Pin 18 Gnd
    Pin 4
    Remote H H
    Pin 3 Weight1 H L
    Pin 2 Weight2 L H
    Pin 5 Gnd
    (weight1&weight2 is for calibration purpose)
    I want to connect these cable pins to Port A(pin 33-47) of I/O connector and then using labview easy digital I/O "write to a single port.vi" to programming it. But I don't know how to connect these pins. For example, pin-5,pin-23,pin-18 is Ground, how can I realize it ? Do I need to connect other pins in 25-pol sub-D plug(besides above 8-pins) male to 50-pinvI/O connector or just leave it alone? Hope everyone give me idea. Of course, the detail is preferred since I have a good background in electronic.
    Also I will be very happy if everyone have a labview programming sample in similiar application.
    Thank you very much for help!
    Sincerely
    Jingjun

    Hello;
    My understanding is that you need to connect each one of the GND pins to each one of the GND pins of the DAQ board. By doing that you will be creating the reference to the TTL signals being read on the DAQ board. The MP and ZP would go to any digital line of the preferrable Port and you should be good to go. As far as I'm concerned, you don't need to make any extra connection.
    I don't know exactly what you are willing to do with the data but, once the data changes each five minutes, you don't need any speed digital application. If you take a look at the Labview shipping examples for 6503 doing read from 1 Digital Port.vi, you should be ok.
    Hope this helps.
    Filipe

  • PCI-6503 configuration - split port C

    Quite a few years ago I wrote a program that used a DIO-24 to read and write data from a test fixtrue with FIFOs and other junk on it. I could not find a clean way to configre the 8255  in mode 0 with ports A, B, and C_lo_nibble as inputs and C_hi_nibble as output with any of the supplied NI code.
    At the time the solution was to use WriteToPhysicalMemory and ReadFromPhysicalMemory as below:
    // configure 8255
        Get_DAQ_Device_Info (1, ND_BASE_ADDRESS, &dio24_base);
        dio24_portA=dio24_base;
        dio24_portB=dio24_base+1;
        dio24_portC=dio24_base+2;
        dio24_control=dio24_base+3;
        sb[0]=0x093;    WriteToPhysicalMemory ( dio24_control, sb, 1);
    Over the years newer similar projects switched to PCI-6503s and all worked fine until a NI security patch removed support for WriteToPhysicalMemory and ReadFromPhysicalMemory and other direct memory access.
    See:
    <http://digital.ni.com/public.nsf/allkb/A07451671E7263598625792800677970>
    The simple DIG_Prt_Config does not seem to support split input/output on the 8255's port C.
    Can anyone point me in a relatively simple method of regaining split I/O on port C of the 6503?
    Thanks in advance,
    Ed Yoho

    Emily,
    The initial refererenced document (Digital I/O Applications) uses the outp() function and then "ors" the required configuration bits to create an eight bit word with the binary value of 10010011 for split port C operation.
    The line:
    outp(dio24_control, 0x093);
    is the configuration statement and is sending an eight bit word with 10010011 in it (Mode 0 Number 11) to the address. as found by:
        Get_DAQ_Device_Info (1, ND_BASE_ADDRESS, &dio24_base);
    The problem is "outp()" was designed way back at the beginning of the PC world (8086 / EGA days) and was limited to addresses from 0 through 03FF (or maybe 03F0, I can't remember for sure).
    If the module was an ISA based device, this would still work. When using a PCI interfaced device, the module address is well outside the area defined above.
    If you look at B-11 "PCI Initialization for the PC", you will be a bit closer. This is close to what I did when switching from the old ISA DIO-24 (that used outp() and inp() functions) to the PCI-6503.
    When switching from ISA to PCI quite a few years ago, I discovered the built in configuration functions within Labwindows still did not seem to support splitting port C on 8255s. That is when I started using the WriteToPhysicalMemory and ReadFromPhysicalMemory as direct register write/read.
    Unfortunately, National has removed WriteToPhysicalMemory and ReadFromPhysicalMemory and now I am stuck looking for a replacement.
    What I am looking for / in need of is a replacement for the two deleted functions that will allow me to directly read/write the 8255. Unfortunately, outp() and inp() won't do it (I tried it with the remote possibility NI had rewritten the functions to work with PCI addresses).
    Ed Yoho

  • How can i write a pattern to a output port of NI PCI 6503 with Traditional NI DAQ 7.0 and Visual Basic 6.0?

    Hello, i'm using a NI PCI-6503 (with CB50LP accesory) to write digital patterns to one of the output ports. Can i do it directly from NIDAQ7.0?
    I know  some Visual Basic 6.0 functions to configure a par as output and to write a pattern to a port, but i don't know how run it.
    I've read some examples from "Help" (C:\Program Files\National Instruments\NI-DAQ\Examples\VBasic\Do) but I can't measuring TTL levels on my CB50LP accesory.
                    Thanks!!

    Hello,
    What is your buffer size ? The buffer should be 0 or greater than 2. You can get this error if your buffer size is equal to 1.
    Regards,
    Isabelle
    National Instruments France
    Isabelle
    Ingénieur d'applications
    National Instruments France

  • PCI 6503 limitation​s

    What is the fastes I can switch in and output signals from a PCI 6503? I'm running LV 8.0 from a computer using linux (fedora).
    Thanks! 

    Since the 6503 has static DIO you'll have to control the transition in software.  Typically, the determinism of software is limited to around 1kHz, but this is a function of your actual system.  I'd recommend you investigate our M-series line of Multifunction DAQ cards which all have at least one port of hardware timed DIO. 
    Low cost solutions that you might consider include the PCI-6221 or perhaps the USB-6251.
    Let me know if you have any more questions!
    Message Edited by Elijah K on 04-02-2007 12:24 AM
    Elijah Kerry
    Senior Product Manager, LabVIEW
    Follow my Software Engineering for LabVIEW Blog

  • On the PCI-6503 the outputs change unexpectedly

    When I write to one port, the others re-set

    Algore,
    The PCI-6503 contains the 8255 chip. When you configure any port on this chip (3 ports), the digital lines on all of the port are reset. Thus, it appears that your method of writing to one port is also configuring this port. The "easy" digital I/O VIs and functions contain port configuration within them, so you may not know that you are configuring your port each time you are writing to it. You should configure all of your ports before you write any output information to them and not configure them again unless it is needed.
    Good luck with your application.
    Spencer S.

  • Multiple Application Access on PCI-6503

    I have two applications which would like to use a PCI-6503 card through the
    NI-DAQ API. One of these applications runs as an NT service, the other as a
    desktop application.
    If the service application begins using the card first, the desktop
    application fails miserably. If the desktop application accesses the card
    first, everything works fine. I have experienced similar problems sharing
    memory between service and desktop applications and had to change the
    service application so it would use an empty DACL in the security descriptor
    when it allocated the shared memory. Does the NI-DAQ software have a
    similar problem?
    Thanks,
    Neal Stublen

    Another guess, but information that might help.
    I'm assuming the service starts as the local system account. Some driver
    inherits credentials from the service running as the local system
    account. These credentials are inadequate for the interactive user. But
    when the interactive user launches the driver, the credentials are
    adequate for the local system account.
    My guess is that if you change the configuration of the service to start
    w/ specific user credentials, then the problem disappears. Goto Control
    Panel | Services | {service name} | Startup and change the user from
    local system account to the interactive user. Don't check interact w/
    desktop, rather change to a specific user and specify the user that will
    log on to the system.
    Randy Charles Morin [M
    VP] - http://www.kbcafe.com/
    Author of "Programming Windows Services"
    http://www.kbcafe.com/047138576X
    In article <[email protected]>,
    "Neal Stublen" wrote:
    > I have two applications which would like to use a PCI-6503 card
    through the
    > NI-DAQ API. One of these applications runs as an NT service, the
    other as a
    > desktop application.
    >
    > If the service application begins using the card first, the desktop
    > application fails miserably. If the desktop application accesses the
    card
    > first, everything works fine. I have experienced similar problems
    sharing
    > memory between service and desktop applications and had to change the
    > service application so it would use an empty DACL in the security
    descriptor
    > when it allocated the shared memory. Does the NI-DAQ software have a
    > similar problem?
    >
    > Thanks,
    > Neal Stublen
    >
    >
    Sent via Deja.com http://www.deja.com/
    Before you buy.

  • Vi to manipulate test panel line 0 & 1, output port 0, PCI-6503, High & Low

    I need to develope a vi that will manipulate lines 0 & 1 of output port 0 High and Low in the test panel for PCI-6503 CAN card in MAX.  Line 0 wil be a constant High but line 1 will be a timed pulse starting Low then pulsing High and then returning to a steady state Low.  Any thoughts?
    Thanks,
    John Ely

    Hi John,
    Are you referring to the NI PCI-6503?  It sounds like your question is regarding digital output with this card.  If so, I think it would be better to post a new thread on the Digital I/O Board. 
    If you are using CAN, could you double check and see what CAN card you are using?
    Have a great day!
    Adam W
    National Instruments

  • Does NI-DAQ version 4.8x or 4.9x support the NI PCI-6503 card?

    NI-DAQ 6.6 does not support Superlab, an application we use. Superlab says to use NI-DAQ 4.8 or 4.9. Does NI-DAQ 4.8 or 4.9 support the PCI-6503 card?

    No, you will need NI-DAQ version 5.0.5 or greater to use with the PCI-6503 board. (Version 6.9.1 is suggested however.) I would contact the providers of Superlab to see if they have an upgrade.
    If you are looking to do data acquisition programming, I would suggest looking into LabVIEW.
    Brian

  • Redistribution of NI Components for PCI-6503 (DIO 24)?

    I'm using the PCI-6503 for simple reading and writing of digital points. I need to install the required NI software during the installation process of my software. What dll's, exe's, system files, etc. need to be installed, what compoments need to be registered, what entries must be made in the registry, and what other things must be done by our installation such that the PCI-6503 card will work properly in our customer's system?

    Hello;
    You just need to install the NI-DAQ driver to customer's computer, and then hook the board up. The board should then be automatically recognized by the machine and any application making NI-DAQ function calls should be working properly.
    Regards
    Filipe A.
    Applications Engineer
    National Instruments

Maybe you are looking for

  • Error while sending FAX using FM

    Hi All, I am trying to send fax using FM “SO_NEW_DOCUMENT_SEND_API1”. Fax number of format AANNNNNNNN(A-area code and N-Fax number) and passing country LAND field in receiver table ‘AU”. When program ran I can see the entry in SCOT under fax for wait

  • Airport Express no longer connects

    Initially my airport express worked great, however, it no longer is able to resolve an internet connection - can't find a DNS server. My iMac with Snow Leopard has a similar issue with the internet (it will work for a few seconds, then stop completel

  • Please help a LE About-To-Be-Newbie?

    Hi there, I've just ordered Logic Express, and it will be here, probably, by Monday. I currently use a Roland VS2000, and have found 12 tracks @ 24 bit a bit confining. My Indigo iMac recently died, and, as I couldn't bring myself to adapt to my wife

  • After reconfiguring shared service using Config utility

    Hi, I am unable to see my applications under Projects after reconfiguration from Config utility, i selected reuse existing tables. Does it require any additonal steps to see my existing applications under projects? Secondly i have backup for openLdap

  • What happened to the "refresh" icon on the new find my iphone format?

    It's not there anymore!