Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

PCMCIA-GPIB and Windows 3.1 - Award CardWare

Hardware: GPIB>>Plug-in Controllers>>PCMCIA-GPIB

Problem:
How do I use the PCMCIA-GPIB with Windows 3.1 - Award CardWare?

Solution:
In the past, CardWare has been one of the most widely used card services (CS) on the market. At the time National Instruments first started shipping PCMCIA products, CS was not necessarily standard on all PCs, even those that had PCMCIA slots. Some of the machines that did ship with CS had old versions or versions that would not work with National Instruments cards, so National Instruments cards shipped CardWare with all PCMCIA products (both DAQ and GPIB). PCMCIA has since become more popular and most vendors are shipping compliant card services, so there is no longer a need to ship CardWare.

When installing CardWare it should always be done from Windows because of the following reasons: it can automatically detect which controller chip is being used, it can automatically detect some of the system resources that need to be reserved for the system and make the proper changes in cardware.ini, it installs the PC Card program which makes configuration easier, and it automatically includes records for the PCMCIA-GPIB and the DAQCard-700. The device level drivers for the DOS and Windows are exactly the same; if CardWare works in Windows, it will also work in DOS. To actually perform the setup, run setup in Windows and follow the prompts. Always choose the Controller Autodetect option, but do not try to pick a computer from the list.

Uninstalling CardWare is simple. Some versions of CardWare have an uninstall option from the setup as well, but it may be faster to uninstall it manually. Delete the \CARDWARE directory and all of the files within it. Edit the config.sys and delete the 5 device lines that CardWare added. Edit the win.ini file and remove the run=pccard.exe line in the [boot] section. Remove CardWare from the path statement in the autoexec.bat.
Note: There could be more than one file on the run line, so delete the devices carefully.


What Controllers CardWare Supports
Although CardWare is widely supported, there are various socket controller chips that it does not support. The chips that it does support are: Intel PCIC 82365SL, Toshiba ToPIC, IBM Stinger, Sharp PHIC, Texas Instruments TACT88412, Toshiba TPP163, and Databook DB86082 (TCIC/2N). Note that this list does not include the chip currently shipping with the newer IBM Thinkpads. IBM has their own custom controller on these machines.


Recognizing CardWare
CardWare is typically installed in a \CARDWARE directory. It installs five lines in the config.sys file as shown below.

devicehigh=c:\cardware\sspcic.exe
devicehigh=c:\cardware\pccs.exe
device=c:\cardware\pcrm.exe /autodetect
devicehigh=c:\cardware\pcenable.exe
devicehigh=c:\cardware\pcdisk.exe

Newer versions of CardWare install at addresses CF00-D7FF by default. Older versions install at D000-D8FF by default. If you are using a memory manager such as EMM386, there should be a memory exclusion for this area as well.


Reducing Memory Usage to a Minimum
There are several things that you can do to reduce memory use with CardWare.

  • All of the drivers should be loaded high (DEVICEHIGH) except for the pcrm.exe driver.
  • You may remove the pcdisk.exe driver.
  • CardWare uses two memory segments, a 0x1000 space (for reading CIS) and a 0x8000 space (for memory cards). The PCMCIA GPIB card only needs the smaller 0x1000 memory segment of card services. The 0x8000 space is not needed for National Instruments cards. To keep CardWare from using this space, remove the line in the [resources] section of cardware.ini for the 0x8000 space (this line starts with MEM=...). Also, if you are using a memory manager you should change the memory exclusion to include this space (for example, X=CF00-D7FF would become X=CF00-CFFF with EMM386).

Making CardWare not AutoConfigure the card / Using PCCard
Because National Instruments cards are of a type not recognized by most card services, sometimes there are problems where the CS tries to configure the card automatically upon insertion. In reality, the card only needs to be configured whenever the driver becomes active. At that point, the driver registers as a client with CS and tells it to configure the card however it is selected in ibconf. Ideally, the setting in ibconf will be "Any", and the CS will configure the card wherever it has resources.

By default, if CardWare does not recognize a card as a standard ethernet or modem card, it will automatically assign resources to the card This is characterized by 3 beeps (for more information, see the section on beeps below). Since you do not want this to happen, you must add a record to the cardware.ini file to tell it what resources to use. The easiest way to do this is by using the PCCard program that CardWare installs. With the card installed, open PCCard. Select the Cards menu, then select Edit. You should edit the socket that the card is in and this will get you to the screen below. Here, make sure the type for the card is set to "Advanced". Using the include/remove buttons, make sure that there is nothing on the Associated side except for the [Do Not Config] as shown below.

In the event that you have CardWare installed but do not have PCCard, you can do the same thing as described above by merely modifying the cardware.ini file. You will have to add a record in the [Cards] section as well as increment the NumberOfRecords. You will also have to add a record and increment the value in the [SpecificAssociations] section. See the cardware.ini file for an example of the records that need to be entered. Again, this is taken care of automatically by PCCard. Also note that if you have installed from Windows, there should already be records in cardware.ini for at least the PCMCIA-GPIB and possibly the PCMCIA-GPIB+.

A common point of confusion is that CS will now not configure the card, but this is not the case. What this means is that CS will not configure the card automatically upon insertion. It will only configure the card after the driver (or ibdiag) registers with CS and at that time tells CS to configure the card. If the driver is inactive, the card should remain in the system unconfigured. This often comes up as "Not in use" or "Unconfigured" in many PCMCIA utilities.

Note: PC Card is not necessary for CardWare to operate correctly under DOS or Windows. It is a tool that you may use if you prefer. When CardWare is installed, it forces PCCard to run whenever Windows is opened. It does this by adding the run=c:\cardware\pccard.exe line to the [boot] section of win.ini. This line may be removed if you do not want PCCard to run every time Windows is opened without any degradation of performance.


Changing CS Resources
The resources that CS uses can be modified by either using the PCCard utility or by directly modifying the cardware.ini file by hand. Editing the cardware.ini file by hand is probably the easiest and fastest way. All of the resources to be given to the cards (memory, base I/O space, and interrupts) can be modified in the [Resources] section (see the cardware.ini excerpt below). To modify the memory space used, you can change the MEM lines. By default you will see two lines but in the example below only the one that is required for CardWare is shown. The other line would have a base of 0xD0000 with a size of 0x8000. Interrupts can be removed by adding an XIRQ line and base I/O addresses can be removed with an XIO line. Some of these lines have ",E" at the end of them. It should work if yours includes this line or not.

You should not need to change the MEM lines unless you have a conflict in memory. The best way to check on this ahead of time is to boot clean (hit F5 when it says Starting MS-DOS) and then run msd and check memory usage.


ibconf Settings
The resources in ibconf should be set to "Any" if possible. If you do need to force resources, you should be able to do so without any difficulty (except for the 2.7.2 DLL problem).

; CARDWARE.INI (V1.3 / 30.03.1994)
; This file is used by CardWare for maintaining information required for
; using PC Cards

; V1.3 AS: - added devices LAN1 and LAN2
; V1.2 AS: - changed ATA device to IRQ=None
; - removed ATA2 device
; - changed memory window in D-segment to 32K
; - added: IRQ=3,E to Resources-Section
; V1.1 AS: - added ATA2 device, and assigned this device to Generic-ATA.

; See the CWINI.TXT file for a description of the entries in the
; file

[Resources]
MEM=0xCF000,0x1000,E
I/O=0x140,0x20,E,10
I/O=0x220,0x20,E,10
I/O=0x300,0x20,E,10
I/O=0x370,0x20,E,10
IRQ=3,E
XIRQ=4 ; Used by mouse detected at COM1
xirq=15
XI/O=0x3F8,0x8,E,10 ; Used by mouse detected at COM1
xirq=11

[Cards]
NumberOfRecords=5
1=National Instruments PCMCIA-GPIB, 14, 1, 267, National Instruments, PCMCIA-GPIB, 0,
2=National Instruments DAQCard-700, 14, 1, 267, National Instruments, DAQCard-700, 0,
3=3Com Corporation 3C589, 15, 6, 257, 3Com Corporation, 3C589, 0,
4=National Instruments PCMCIA-GPIB+, 14, 1, 267, National Instruments, PCMCIA-GPIB+, 0,
5=Deleted-Record

[GenericCards]
NumberOfRecords=2
1=Generic Modem, 1,2
2=Generic ATA Disk, 1,4

[SpecificAssociations]
NumberOfRecords=5
1=0xFFFF
2=0xFFFF ; Added by National Instruments
3=0xFFFF
4=0xFFFF
5=

[GenericAssociations]
NumberOfRecords=2
1=1, 2, 3, 4
2=5
.
.
.


The Beeps
The beeps signify different events in CardWare. If a card is inserted and card services is able to read the CIS from the card, a single beep is emitted. Once the card is recognized by the enabler, a second higher-pitched beep is sounded. A final third beep is sounded at an even higher pitch when the recognized PC Card is configured using an associated Device Definition.

In the ideal situation, there should be only two beeps. If there are three beeps, it means that CardWare is actively configuring the card upon insertion instead of whenever the card is in use by the GPIB driver.



Related Links:

Attachments:


cardwr2.gifcardwr1.gif


Report Date: 07/17/2006
Last Updated: 08/18/2006
Document ID: 3ZG6H35N

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit