Serial Getting Started with Your PCMCIA Serial Hardware and Software for Windows Me/9x PCMCIA Serial for Windows Me/9x September 2000 Edition Part Number 321827C-01
Support Worldwide Technical Support and Product Information ni.
Important Information Warranty The serial hardware is warranted against defects in materials and workmanship for a period of one year from the date of shipment, as evidenced by receipts or other documentation. National Instruments will, at its option, repair or replace equipment that proves to be defective during the warranty period. This warranty includes parts and labor.
Compliance FCC/Canada Radio Frequency Interference Compliance* Determining FCC Class The Federal Communications Commission (FCC) has rules to protect wireless communications from interference. The FCC places digital electronics into two classes. These classes are known as Class A (for use in industrialcommercial locations only) or Class B (for use in residential or commercial locations). Depending on where it is operated, this product could be subject to restrictions in the FCC rules.
• • Connect the equipment into an outlet on a circuit different from that to which the receiver is connected. Consult the dealer or an experienced radio/TV technician for help. Canadian Department of Communications This Class B digital apparatus meets all requirements of the Canadian Interference-Causing Equipment Regulations. Cet appareil numérique de la classe B respecte toutes les exigences du Règlement sur le matériel brouilleur du Canada.
Contents About This Manual Conventions ...................................................................................................................xi Related Documentation..................................................................................................xii Chapter 1 Introduction How to Use This Manual ...............................................................................................1-1 What You Need to Get Started .........................................................
Contents Advanced Port Settings ................................................................................... 3-3 Transceiver Mode ............................................................................. 3-4 Use FIFO Buffers ............................................................................. 3-4 Restore Defaults .............................................................................................. 3-4 Chapter 4 Using Your Serial Hardware General Programming Requirements ......
Contents Figures Figure 2-1. Figure 2-2. Figure 2-3. Figure 2-4. Figure 2-6. Add/Remove Programs Properties Dialog Box.....................................2-1 NI-Serial Setup Screen ..........................................................................2-2 Inserting a PCMCIA Serial Card...........................................................2-3 Device Manager Ports List for PCMCIA Serial Card Correctly Installed .................................................................................
About This Manual This manual contains instructions to help you install and configure the National Instruments serial hardware and the NI-Serial software for Windows Me/9x. This manual includes information about the PCMCIA-232, PCMCIA-232/2, PCMCIA-232/4, PCMCIA-485, and PCMCIA-485/2. This manual assumes that you are already familiar with Windows Me/9x. Conventions The following conventions appear in this manual: » The » symbol leads you through nested menu items and dialog box options to a final action.
About This Manual Related Documentation The following documents contain information that you might find helpful as you read this manual: • ANSI/EIA-232-D Standard, Interface Between Data Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange • EIA/RS-422-A Standard, Electrical Characteristics of Balanced Voltage Digital Interface Circuits • EIA-485 Standard, Standard for Electrical Characteristics of Generators and Receivers for Use in Balanced Digital Multi
1 Introduction This chapter explains how to use this manual, lists what you need to get started and optional equipment you can order, and briefly describes the serial hardware and the NI-Serial software.
Chapter 1 Introduction What You Need to Get Started Before you install your serial hardware and the NI-Serial software, make sure you have all of the following items: ❑ Windows Me/9x installed on your computer ❑ One of the following serial interfaces, which is included in your kit: – PCMCIA-232 (one, two, or four port) – PCMCIA-485 (one or two port) ❑ CD, NI-Serial Software for Windows 2000/NT/Me/9x, which is included in your kit ❑ Adapter cable from PCMCIA card to DB-9 connector, which is included
Chapter 1 Introduction The PCMCIA-485 interfaces support four hardware transceiver control modes for reliable communication with two-wire and four-wire devices. Refer to Chapter 4, Using Your Serial Hardware, for more information about transceiver control modes. All of the serial hardware uses standard 16550-compatible UARTs (Universal Asynchronous Receiver/Transmitters) for 100 percent compatibility with standard PC COM ports.
Chapter 1 Introduction Time-Saving Development Tools Your kit includes the NI-Serial software for Windows Me/9x. In addition, you can order the LabWindows/CVI or LabVIEW software from National Instruments to speed your application development time and make it easier to communicate with your instruments. LabVIEW is an easy-to-use, graphical programming environment you can use to acquire data from thousands of different instruments, including IEEE 488.
2 Installation and Verification This chapter describes how to install the NI-Serial software, serial hardware, and cables, and how to verify the installation. Install the Software Install the NI-Serial software for Windows Me/9x before you install the hardware: 1. Select Start»Settings»Control Panel. 2. Double-click on the Add/Remove Programs icon in the Control Panel to launch the Add/Remove Programs applet. A dialog box similar to the one in Figure 2-1 appears. Figure 2-1.
Chapter 2 Installation and Verification 3. Click on the Install button. 4. When prompted, insert the NI-Serial Software for Windows 2000/NT/Me/9x CD and click on the Next button to proceed. The software installation wizard begins with the screen shown in Figure 2-2. Figure 2-2. NI-Serial Setup Screen The setup wizard guides you through the necessary steps to install the NI-Serial software. You can go back and change values where appropriate by clicking on the Back button.
Chapter 2 Installation and Verification Install the Hardware To install the PCMCIA-232 or PCMCIA-485 in your computer, first start Windows Me/9x. If the card is not already inserted, insert it into a free PC Card (PCMCIA) socket the same way you insert a disk into a floppy drive. The card has no jumpers or switches to set, and you do not need to shut down the system before you insert it.
Chapter 2 Installation and Verification Verify the Installation When you begin to verify the installation, keep in mind that the serial ports built into the computer are typically named from COM1 to COM4. Windows Me/9x typically issues port names to the ports on NI serial hardware starting with COM5, COM6, and so on. If not enough resources are available to assign to all the NI serial ports, the port with the higher COMx name is left unconfigured. Double-click on the System icon in the Control Panel.
Chapter 2 Installation and Verification Figure 2-4.
Chapter 2 Installation and Verification Figure 2-5. Device Manager Ports List for PCMCIA Serial Card Incorrectly Installed Verify the Hardware Resources For every port of the newly installed serial interface, double-click on the name of the serial port in the Device Manager. Then, click on the Resources tab. If the resources were assigned correctly, the Resources page shows which resources are assigned to your serial ports.
Chapter 2 Installation and Verification Determine Which Physical Port Is Associated with COMx For every port of the newly installed serial interface, double-click on the name of the serial port in the Device Manager. Then, click on the Port Settings tab. The top of this page displays the serial number of the serial hardware, and the physical port number starting at 1. When you have finished verifying the driver installation and physical port, proceed to the next section.
Chapter 2 Installation and Verification Connect the Cables For the PCMCIA serial cards, you can use the standard DB-9 connector found on most serial cables. Figure 2-6 and Table 2-1 give the pin locations and descriptions of the DB-9 connector, which is found on the PCMCIA serial cable. PIN 5 PIN 9 PIN 6 PIN 1 Figure 2-6. DB-9 Connector Pin Locations Table 2-1.
Chapter 2 Installation and Verification Connecting Two-Wire Devices The PCMCIA-485 boards are designed to work with either two- or four-wire devices. If you are using a two-wire device, refer to the device documentation for specific wiring instructions. In general, half-duplex networks use a single twisted pair of wires for communication in both directions, so you must connect both the transmitter and the receiver at each end of the same pair of wires.
3 Configuration This chapter describes how to view or change the communication port settings. View or Change Communication Port Settings The serial configuration utility is fully integrated with the Windows Me/9x Device Manager. You can use it to examine or modify the configuration of the serial port. Follow these steps to configure the serial port. Repeat the configuration procedure for each serial port in your system. 1. Select Start»Settings»Control Panel and double-click on the System icon.
Chapter 3 Configuration After you have selected the serial port parameters for the current port, click on the OK button to save the changes or click on the Cancel button to exit the dialog box without saving changes. Port Settings Tab On the Port Settings tab, you can change any of the settings by clicking on the arrow button to the right of the setting. When you click on the arrow button, a list of valid values for that setting appears. Select the desired setting from the list.
Chapter 3 Configuration Bits per Second Bits per second, or baud rate, is the speed for a serial port. Data Bits Data bits is the number of data bits in a single serial byte. Parity Parity is the specification for even, odd, or no parity bits in each transmitted byte. Stop Bits Stop bits is the number of terminating bits on the end of each transmitted serial byte. Flow Control Flow control is a method for temporarily halting the stream of serial bytes to prevent overflow.
Chapter 3 Configuration The following sections describe the advanced settings options. Transceiver Mode This field shows the transceiver mode in use, and applies only to PCMCIA-485 boards. For more information about transceiver modes, refer to Chapter 4, Using Your Serial Hardware. Use FIFO Buffers FIFO buffers are present on the 16550-compatible UARTs—one for the transmitter and one for the receiver.
4 Using Your Serial Hardware This chapter describes how to set the hardware transceiver control mode for your RS-485 interfaces and lists some general programming requirements. General Programming Requirements The NI-Serial software is fully integrated into the standard Windows Me/9x communications software. NI serial ports are used like any other Windows Me/9x communications (COM) port. Windows Me/9x has standard communication functions for use within either Win16 or Win32 applications.
Chapter 4 Using Your Serial Hardware Table 4-1. Transceiver Control Modes Mode Note Transmitter Receiver Four-wire mode Always enabled Always enabled Two-wire mode: DTR with echo Enabled with DTR unasserted Always enabled Two-wire mode: DTR controlled Enabled with DTR unasserted Enabled with DTR asserted Two-wire mode: TXRDY auto control Enabled with TXRDY asserted Enabled with TXRDY unasserted Signal names with an overscore, such as DTR, indicate that the signal is active low.
Chapter 4 Using Your Serial Hardware Two-Wire Mode: TXRDY Auto Control In this mode, the serial hardware transparently enables the transmitter and receiver in a two-wire system. Use this mode to remove the burden of flow control from your application. By connecting the transmitter to the TXRDY (Transmit Ready) line, the hardware enables the transmitter for each byte to be transmitted.
Chapter 4 Using Your Serial Hardware The scratch register is located at offset 7 from the base address of the port. For example, if COM2 were located at base address 0x3F8, and you wanted to set the PCMCIA-485 board to two-wire mode with DTR control, you would write a 0x02 to I/O address 0x3FF. The PCMCIA-485 board would immediately switch to the two-wire mode with DTR control.
A Serial Port Information This appendix describes the RS-232, RS-422, and RS-485 standards and explains some of the issues involved with these types of serial communication. Table A-1 lists the features of the RS-232, RS-422, and RS-485 standards. Table A-1.
Appendix A Serial Port Information distances of 50 ft and with data rates up to 20 kbytes/s. However, because of improvements in line drivers and cabling, you can usually increase the actual performance of the bus past the limitations on speed and distance recommended in the specification. RS-422 As specified in the EIA/RS-422-A Standard, Electrical Characteristics of Balanced Voltage Digital Interface Circuits, RS-422 defines a serial interface much like RS-232.
Appendix A Serial Port Information Serial Communication Issues This section explains some serial communication issues, including duplex architectures, termination methods, bias resistors, and types of connecting equipment. Duplex Architectures Duplex refers to the means of bandwidth usage in a serial system. The two common means of bi-directional serial communication are full duplex and half duplex.
Appendix A Serial Port Information Slave 1 MASTER Tx Slave 2 Tx Rx Slave n Tx Rx Rx Tx Rx Figure A-1. Typical Full-Duplex System Half Duplex A typical half-duplex multidrop bus architecture also involves a master-slave protocol. However, in a half-duplex system, all transmitters and receivers are connected to the same transmission line. A half-duplex system is often referred to as a two-wire system. Figure A-2 shows a typical half-duplex system.
Appendix A Serial Port Information Termination Because each differential pair of wires is a transmission line, you must properly terminate the line to prevent reflections. A common method of terminating a two-wire multidrop RS-485 network is to install terminating resistors at each end of the multidrop network. If you daisy-chained multiple instruments together, you need a terminating resistor at only the first and last instruments.
Appendix A Serial Port Information Pin 2 DTE Pin 3 Rx D Pin 2 Tx D Pin 3 Pin 2 DCE DCE Pin 3 Rx D Tx D Pin 2 Pin 3 DTE Figure A-4. Straight-Through Cabling in a DTE-to-DCE Interface Straight-through cabling is still the standard method to connect a modem to your PC. However, because many applications use serial communication to connect two or more DTEs without modems, the cabling becomes more complicated.
B Uninstalling the Hardware and Software This appendix describes how to uninstall your serial hardware and the NI-Serial software. Uninstall the Hardware Before physically removing the serial hardware, you must remove the hardware information from the Windows Me/9x Device Manager. Follow these steps to uninstall the hardware: 1. Double-click on the System icon under Start»Settings»Control Panel. The System Properties dialog box appears. 2. Select the Device Manager tab. 3.
Appendix B Uninstalling the Hardware and Software 5. Select the National Instruments port to remove from the list of ports, as shown in Figure B-1. Figure B-1. Selecting an Interface to Uninstall 6. Click on the Remove button. To remove ports on two-port and four-port PCMCIA cards from within the Device Manager, you must open the Multi-function adapters class, select the name of your interface, and click on the Remove button. Note 7.
Appendix B Uninstalling the Hardware and Software Uninstall the Software Before uninstalling the software, remove all serial port information from the Windows Me/9x Device Manager, as described in the previous section. You do not need to shut down Windows Me/9x before uninstalling the software. Complete the following steps to remove the NI-Serial software: 1. Select Start»Settings»Control Panel. 2.
Appendix B Uninstalling the Hardware and Software 3. Select the serial software you want to remove, and click on the Add/Remove button. The uninstall program runs and removes all folders, programs, VxDs, DLLs, and registry entries associated with the NI-Serial software. Figure B-3 shows the results of a successful uninstallation. 4. Remove your PCMCIA card from your computer. Figure B-3.
C Troubleshooting and Common Questions This appendix describes how to troubleshoot problems and answers some common questions. Freeing an Interrupt Request Level To free an interrupt request level for your serial port, you must disable the device that is using the interrupt request level. To view the system-wide allocation of interrupt request resources and remove a device, complete the following steps: 1. Select Start»Settings»Control Panel and double-click on the System icon. 2.
Appendix C Troubleshooting and Common Questions Selecting Conflict-Free Resources When the Device Manager indicates a conflict with another device, you can usually correct the problem by manually selecting conflict-free resources. To do so, complete the following steps: 1. Select Start»Settings»Control Panel and double-click on the System icon. 2. Click on the Device Manager tab and click on the View devices by type button. 3. Double-click on the Multi-function adapters icon. 4.
Appendix C • Troubleshooting and Common Questions If the utility reports fewer ports installed than it should, refer to Chapter 2, Installation and Verification, and follow these troubleshooting steps: 1. Verify the hardware resources. 2. In some versions of Windows Me/9x, the Driver tab in the Device Manager gives you the information about the driver installed. Verify that the National Instruments serial driver is installed for the port. 3.
Appendix C Troubleshooting and Common Questions 4. Click on the View devices by type button. 5. Double-click on the Ports (COM & LPT) icon to display a list of all ports that Windows recognizes. If you have previously installed a PCMCIA serial card, double-click on Other Devices, where Windows lists the ports it does not recognize. To remove ports on two- or four-port cards, you must open the Multifunction adapter class, select the name of the interface, and click on the Remove button. Note 6.
Appendix C Troubleshooting and Common Questions Common Questions How can I determine which type of serial hardware I have installed? 1. Select Start»Settings»Control Panel and double-click on the System icon. 2. Click on the Device Manager tab and click on the View devices by type button. 3. Double-click on the Ports (COM & LPT) icon to display a list of installed ports. How can I determine which version of the NI-Serial software I have installed? The Read Me file gives the version of the software.
Appendix C Troubleshooting and Common Questions In most cases, Windows Me/9x does not assign names COM1 through COM4 to the serial hardware. Rather, it names the ports starting with COM5. If you assign any of the base addresses in Table D-1 to a National Instruments serial port, Windows Me/9x automatically changes the COM port name to the corresponding one listed in this table. You do not need to change the IRQ setting for this name change to occur.
Appendix C Troubleshooting and Common Questions Figure C-2. Multi-Function Adapter Class in the Device Manager How do I remove information about PCMCIA two-port or four-port serial cards from the Device Manager? Because the two-port PCMCIA cards are single physical devices that support multiple ports, they are registered as “multi-function adapters” in the Device Manager. Each port is a child device listed under Ports (COM & LPT).
D Specifications This appendix describes the characteristics of the serial hardware, the NI-Serial software, along with the recommended operating conditions. Hardware Specifications Table D-1. Physical Characteristics of the PCMCIA Serial Cards Characteristic Specification Dimensions 85.6 by 54.0 by 0.5 cm (3.370 by 2.126 by 0.197 in.
Appendix D Specifications Table D-2. Environmental Characteristics of the Serial Hardware Characteristic Specification Operating Environment Component Temperature Relative Humidity 0 to 70° C 10 to 90%, noncondensing Storage Environment Temperature Relative Humidity EMI –40 to 120° C 5 to 90%, noncondensing FCC Class A Verified Software Specifications Table D-3.
Technical Support Resources E Web Support National Instruments Web support is your first stop for help in solving installation, configuration, and application problems and questions. Online problem-solving and diagnostic resources include frequently asked questions, knowledge bases, product-specific troubleshooting wizards, manuals, drivers, software updates, and more. Web support is available through the Technical Support section of ni.com NI Developer Zone The NI Developer Zone at ni.
Appendix E Technical Support Resources Worldwide Support National Instruments has offices located around the world to help address your support needs. You can access our branch office Web sites from the Worldwide Offices section of ni.com. Branch office Web sites provide up-to-date contact information, support phone numbers, e-mail addresses, and current events.
Glossary Prefix Meaning Value p- pico- 10 –12 n- nano- 10 –9 µ- micro- 10 – 6 m- milli- 10 –3 k- kilo- 10 3 M- mega- 10 6 G- giga- 10 9 t- tera- 10 12 ° degrees Ω ohms % percent A amperes ANSI American National Standards Institute b bits B bytes baud bits per second bps bits per second C Celsius COM Computer Output Microform; used in reference to a communication port CTS clear to send DB-xx subminiature D connector, where xx is the number of pins © Nation
Glossary DCD data carrier detect DCE data communications equipment or data circuit-terminating equipment DLL dynamic link library DMA direct memory access DSR data set ready DTE data terminal equipment DTR data terminal ready—the overscore denotes that the signal is active low duplex the means of bandwidth usage in a serial system EIA Electronic Industries Association EMI electromagnetic interference FCC Federal Communications Commission FIFO First-In-First-Out ft feet GND ground
Glossary MB megabytes of memory PC personal computer PCI Peripheral Components Interconnect RAM random-access memory RI ring indicator RTS request to send RX receive RXD receive data—the overscore denotes that the signal is active low s seconds SCSI Small Computer Systems Interface TX transmit TXD transmit data—the overscore denotes that the signal is active low TXRDY transmit ready—the overscore denotes that the signal is active low UART Universal Asynchronous Receiver/Transmitt
Index A naming National Instruments serial ports, C-5 removing information about PCMCIA serial cards from the device manager, C-7 communication port settings, 3-1 viewing or changing, 3-1 configuration, 3-1 conflict-free resources, C-2 selecting, C-2 connecting cables, 2-8 connecting two-wire devices, 2-9 conventions, xi customer education, E-1 add/remove programs properties dialog box (figure), 2-1, B-3 advanced port settings, 3-3 dialog box (figure), 3-3 transceiver mode, 3-4 using FIFO buffers, 3-4 adv
Index I DOS-based addresses (table), C-5 DTE vs.
Index R NI-Serial setup screen (figure), 2-2 null-modem cabling in a DTE-to-DTE interface (figure), A-6 related documentation, xii removing information about PCMCIA serial cards from the device manager, C-7 resolving resource conflicts with legacy boards, C-3 restoring defaults, 3-4 RS-232 standard, A-1 features (table), A-1 RS-422 standard, A-2 features (table), A-1 RS-485 standard, A-2 features (table), A-1 running the diagnostic test, 2-7 O optional equipment, 1-2 overview of serial hardware, 1-2 ove
Index two-wire devices, 2-9 connecting, 2-9 typical full-duplex system (figure), A-4 typical half-duplex system (figure), A-4 successful uninstallation (figure), B-4 uninstalling, B-3 setting transceiver control mode, 4-3 setting with DeviceloControl, 4-4 setup screen for NI-Serial software (figure), 2-2 software installation, 2-1 getting started, 1-2 software specifications, D-2 specifications, D-1 environmental characteristics, D-2 physical characteristics, D-1 software specifications, D-2 standard DOS-