background image

 

Page 19 of 26 

Software Programming 

API Interface 

Once the drivers for the CM17320HR have been properly loaded, all eight RS-232/422/485 ports 

should  be  available  as  standard  serial  ports.    All  eight  ports  can  then  be  controlled  using  the 

standard serial port interfaces built into the operating system. 

A  description  of  serial  port  programming  for  operating  systems  is  beyond  the  scope  of  this 

manual.    Consult  the  operating  system  documentation  for  information  on  how  to  interface  with 

serial ports via software. 

COM Port Numbering 

Serial  ports  (aka  COM  ports)  are  typically  assigned  numbers  by  the  operating  system  (e.g. 

COM1).  These numbers are typically dynamically assigned by the operating system.  However, 

different applications may enumerate the COM ports differently, assigning different port numbers 

(e.g.  COM3-10  vs  COM5-12).   When  developing  your  own  serial  port  application,  consult  your 

operating system’s documentation for the proper method of enumerating COM ports. 

Note:

  Some applications are written to assume that no more than four COM ports are present 

in a system.  These applications may have compatibility issues with the Exar PCI UART. 

Base Address and Register Mapping 

The CM17320HR exposes all of the registers available on the Exar XR17D158.  The register set 

of  the  XR17D158  mimics  the  standard  16C550  UART  register  map.    However,  the  XR17D158 

contains some additional registers not found in a typical ISA-based UART. 

Additionally, the base address of the CM17320HR’s serial ports will be different than the standard 

PC  serial  port  locations  (0x3F8,  0x2F8,  etc).    The  CM17320HR  is  a  memory  mapped  device.  

Since  it  is  PCI-based,  it  may  be  mapped  to  any  location  within  the  4GB  address  space  of  the 

CPU.  The base address of PCI devices is determined by the CPU’s BIOS and operating system 

at boot time. 

The register-level differences between the CM17320HR and a standard 16C550 UART should be 

abstracted  via  the  software  drivers.    Most  users  will  not  need  to  concern  themselves  with  the 

actual registers of the board.  If one is interested in directly accessing the registers of the board, 

consult the XR17D158 data sheet available from Exar. 

Enabling the RS-422/485 Transmitter 

See Table 5 – Jumper Settings for mode jumper settings.  When using the serial port in RS-422 

or RS-485 mode, the serial receiver for RxD (receive data) is always enabled.   

In  RS-422  mode  the  driver  is  always  enabled,  however  in  RS-485  mode  the  driver  for  TxD 

(transmit data) is enabled and disabled under software control in the following two ways.  

In  RS-485  RTS  driver  enable  mode  the  transmitter  is  enabled  by  manipulating  the  Request  to 

Send  (RTS)  signal  of  the  serial  port  controller.    This  signal  is  controlled  by  writing  bit  1  of  the 

Modem Control Register (MCR) as follows: 

Summary of Contents for CM17320HR

Page 1: ...BDM 610020049 Rev E CM17320HR User s Manual Octal RS 232 422 485 PC 104 Plus Module I IS SO O9 90 00 01 1 a an nd d A AS S9 91 10 00 0 C Ce er rt ti if fi ie ed d...

Page 2: ...6 CM17320HR User s Manual RTD EMBEDDED TECHNOLOGIES INC 103 Innovation Blvd State College PA 16803 0906 Phone 1 814 234 8087 FAX 1 814 234 5218 E mail sales rtd com techsupport rtd com Web Site http w...

Page 3: ...They now use the designations printed on the board silk rather than the JPxx designation from the schematic Improved the Connector and Jumper Locations diagram Changed the name of the RS 422 485 Trans...

Page 4: ...Page 4 of 26 Consortium All other trademarks appearing in this document are the property of their respective owners...

Page 5: ...r Oscillator U3 11 Serial Port Connectors CN4 CN11 12 First serial port CN4 12 RS 232 Serial Port Mode Default 12 RS 422 485 Serial Port Mode 13 Second serial port CN5 14 Third serial port CN6 14 Four...

Page 6: ...terrupts 20 Additional Information 21 Serial Port Programming 21 Interrupt Programming 21 Exar XR17D158 PCI Bus Octal UART 21 CM17320HR Board Specifications 22 Physical Attributes 22 Operating Conditi...

Page 7: ...Up to 921 600 baud RS 422 485 prescaler 1 Up to 230 400 baud RS 232 prescaler 4 o User oscillator option Enables support for non standard baud rates up to 6 25 Mbps 3 3 V or 5 V Oscillators 50 MHz ma...

Page 8: ...Technical Support If you are having problems with your system please try the following troubleshooting steps Simplify the System Remove modules one at a time from your system to see if there is a spe...

Page 9: ...nput clock by either 1 or 4 Second is the Baud Rate Generator which further divides the frequency further to achieve the desired baud rate The Baud Rate Generator can be set to a value between 1 and 2...

Page 10: ...8 For example if one wants to use a baud rate of 115 2K Prescale divisor of 4 and receiver sampling of 16 the Baud Rate Generator divisor would be 14745600 4 115200 x 16 2 If the desired baud rate ca...

Page 11: ...illator and is configured with jumper JP27 Jumper JP2 selects either the 14 7456 MHz oscillator or the user oscillator All serial ports use the same oscillator U3 pin 1 is PC 104 Plus ISA Bus PC 104 P...

Page 12: ...iver enable or RS 485 with inverted RTS driver enable by the Mode A and B jumpers See Table 5 Jumper Settings for details RS 232 Serial Port Mode Default The full duplex RS 232 mode is the default set...

Page 13: ...D and CTS signals are provided on the utilityModule Termination is usually necessary on all RS 422 receivers and at the ends of the RS 485 bus If the termination resistor is required it can be enabled...

Page 14: ...ort CN8 Please refer to the previous section on the first COM port CN4 for the description Sixth serial port CN9 Please refer to the previous section on the first COM port CN4 for the description Seve...

Page 15: ...N5 C Second serial port CTS termination in RS 422 485 Open No termination default Closed 120 Ohm Termination Mode A Mode B Third serial port mode B A Mode Open Open RS 232 Default Open Close RS 485 RT...

Page 16: ...ault Closed 120 Ohm Termination CN10 C Seventh serial port CTS termination in RS 422 485 Open No termination default Closed 120 Ohm Termination Mode A Mode B Eighth serial port mode B A Mode Open Open...

Page 17: ...d etc 5 Line up the pins of the CM17320 s PC 104 and PC 104 Plus connectors with the corresponding bus connectors of the stack Make sure that both connectors are lined up 6 Apply pressure to both bus...

Page 18: ...lable as standard serial ports a k a COM ports to the operating system At that point application software should be able to access and control the serial ports Note When the CM17320HR is installed und...

Page 19: ...of the XR17D158 mimics the standard 16C550 UART register map However the XR17D158 contains some additional registers not found in a typical ISA based UART Additionally the base address of the CM17320H...

Page 20: ...is a PCI device it is capable of sharing interrupts with other PCI devices Interrupt sharing is a normal part of PCI operation and a required part of the PCI specification Note that any Interrupt Serv...

Page 21: ...Developer s Guide By Mark Nielson ISBN 0764545701 Interrupt Programming For more information about interrupts and writing interrupt service routines refer to the following book Interrupt Driven PC Sy...

Page 22: ...ize 3 6 L x 3 8 W x 0 6 H 90mm L x 96mm W x 15mm H Weight 0 24bs 0 10 Kg Power Consumption 2W 5 VDC Typical Operating Conditions Cooling Convection Operating temperature range 40 to 85 C Storage tempe...

Page 23: ...Page 23 of 26 IDAN CM17320HRS Dimensions and Pinout IDAN Frame FRONT BACK Note Drawings are not to scale Pin 1 Pin 20 Pin 37 Pin 19 Pin 1 Pin 20 Pin 37 Pin 19...

Page 24: ...PORT 3 5 6 Data Set Ready Request To Send CN6 2 PORT 3 6 7 Request To Send Transmit Data CN6 4 PORT 3 7 8 Clear To Send Receive Data CN6 6 PORT 3 8 Serial Port 3 9 Ring Indicator Clear To Send CN6 8 P...

Page 25: ...ORT 7 6 7 Request To Send Transmit Data CN10 4 PORT 7 7 8 Clear To Send Receive Data CN10 6 PORT 7 8 Serial Port 7 9 Ring Indicator Clear To Send CN10 8 PORT 7 9 10 Carrier Detect Request To Send CN9...

Page 26: ...RTD EMBEDDED TECHNOLOGIES OR AS A RESULT OF SERVICE OR MODIFICATION BY ANYONE OTHER THAN RTD EMBEDDED TECHNOLOGIES EXCEPT AS EXPRESSLY SET FORTH ABOVE NO OTHER WARRANTIES ARE EXPRESSED OR IMPLIED INCL...

Reviews: