|Weight 54g (approx)|
The TS-SER4 is a PC/104 expansion card with four serial ports using the PC standard 16C550 type UARTs (with 16-byte FIFOs). All four COM ports support RS-232 levels and two of these COM ports can optionally support RS-422/ RS-485 levels.
A flexible interrupt sharing design allows for a large number of COM ports using a minimum number of interrupts. An interrupt status register allows rapid identification of the interrupt source.
This product uses a multi-layer PCB with power and ground planes to minimize noise and EMI issues. The TS-SER4 only requires a single 5V power supply.
2 PC/104 Bus Interface
The TS-SER4 features a 16-bit PC/104 bus interface that allows access up to 11 IRQ lines. A lower cost version with an 8-bit PC/104 bus interface limits the interrupt selection to 6 IRQ lines (IRQ3, IRQ4, IRQ5, IRQ6, IRQ7, and IRQ9). A Xilinx programmable Logic Device (PLD) is used to decode the COM port addresses. This allows for a great amount of flexibility in the standard product and allows for custom configurations if they are necessary.
3 Serial Ports
The two serial ports that are labeled COM_A and COM_B support RS-232 levels only. These two ports support the full complement of standard RS-232 handshakes as shown in Table 1.
Figure 1 - Serial Port Header Pin Location. Pin 1 is labeled with a dot in the legend.
Table 1: Pin-out for COM_A and COM_B Headers
The two serial ports labeled COM_C and COM_D support a subset of RS-232C handshakes lines that is sufficient for the vast majority of applications. In addition these two ports can optionally have RS-485/RS-422 drivers. Table 2 lists the pin-outs for these ports
Table 2: Pinout for COM_C and COM_D Headers
The serial ports all use 16C550 UARTs, which provide 16 byte send and receive FIFOs, reducing the CPU overhead of high-speed serial communications.
The serial baud clock (common to all four serial ports) is derived from the PC/104 OSC (14.318 MHz) signal. If this signal is not present on the bus (all Technologic Systems products have this signal), it will be necessary to add a 3.6864 MHz crystal oscillator in the position labeled X1. This supplemental crystal oscillator can also be used to generate very high-speed baud rates (up to 1 Megabit/sec) or non-standard baud rates easily. The PC/104 OSC signal is always used as the clock source except when a crystal oscillator is installed. When a crystal oscillator is installed, it is always used to drive the baud clock.
Not all serial adapter cables are alike! We are aware of at least two 'standard' pinouts for these cables. If you did not purchase your serial adapter cables from us, this may be an issue if the serial ports are not working.
4 COM Port Selection
The four COM ports can be configured as COM1 thru COM24. Jumpers (labeled COM1, COM2, COM4 and JP3) are used to select the base COM port using a binary weighting. COMA is always the base COM port selected. For example, if the four COM ports are to be configured as COM5 thru COM8 then jumpers "COM1" and "COM4" should be installed (1 + 4 = 5). In this case COMA would be COM5 and COMB, COMC, and COMD would be COM ports COM6, COM7, and COM8 respectively.
Table 3 documents jumper settings and the base COM port selected.
Table 3: Base COM port Selection
|Jumper||Control REG||COM Port|
|COM1||COM2||COM4||JP3||Base Addr||Base Addr|
Table 4 documents the physical I/O address locations for COM ports COM1 thru COM12. Since a Xilinx programmable logic device (PLD) is used to decode the I/O locations, it is possible to have the COM ports decoded at any location. Call Technologic Systems for more details.
Table 4: COM port I/O locations
|COM Port||I/O Location (Hex)|
There are four status registers associated with each TS-SER4 board. These registers contain the status of all the jumpers and also the status of the interrupts for each COM port. These four registers have different I/O locations depending upon the Base COM port selected. This allows for multiple TS-SER4 boards to be installed. Table 3 documents where the base address for these control and status registers is located. There are a total of six different Base locations to allow a total of six TS-SER4 boards in a single system. Using a custom configuration in the Xilinx PLD, it is possible to have more than three boards in a system.
5 Control and Status Registers
There are four registers on each TS-SER4 board (unrelated to the UARTs). These registers are documented in Table 5 below. The first three registers are "Read Only" while in the fourth register bit 7 is "Read/Write" and bits 0-6 are "Read Only". For all registers, if a condition is true, a logic "1" is returned. For example, when a jumper is present, a logic "1" is returned. For the Base + 1 address, if an interrupt is pending, the respective status bit is set to a logic "1".
Table 5 - TS-SER4 Control and Status Registers
|Address||Bit 7||Bit 6||Bit 5||Bit 4||Bit 3||Bit 2||Bit 1||Bit 0|
|Base + 0||0||1||1||1||1||0||1||0|
|Base + 1||INT_D||INT_C||INT_B||INT_A|
|Base + 2||J_com4||J_com2||J_com1||J_irq8||J_irq4||J_irq2||J_irq1|
|Base + 3||En_485||OP_485||J_JP3||J_JP2||J_JP1||J_2xBaud||J_2irq|
The Base address (Base + 0) always returns a fixed value of 7A (Hex).
The Base + 1 address returns the status of the 4 interrupt sources from COM_A, COM_B, COM_C, and COM_D. This is essential for sharing interrupts and allows the interrupt service routine to determine which COM port has an interrupt pending. When any of these sources has an interrupt pending, the respective status bit is set.
The Base + 2 address returns the status of the jumpers that determine the Base COM port location (jumpers J_com1 thru J_com4) and the Base IRQ selected (jumpers J_irq1 thru J_irq8).
The Base + 3 address has the RS-485 option bit returned on bit 6. Bits 0-4 return the status of other miscellaneous jumpers. Bit 7 of this register is readable and writeable. When set, bit 7 enables RS-485 and RS-422 operation. At power-up or system reset, bit 7 is initialize to a zero (RS-485 disabled). Note bit 6 must set (RS-485 option is populated) in order for RS-485 or RS-422 to function.
6 Interrupt Selection
The TS-SER4 has four interrupt sources (COM_A thru COM_D) that can be routed to one or two of 11 possible PC/104 interrupts. Jumpers are used to select which interrupts are used.
The jumpers use a simple addition algorithm to select the interrupt. For example, if you wish to use IRQ6, then the jumpers labeled IRQ2 and IRQ4 should be installed (4 + 2 = 6).
Either a single interrupt or two interrupts may be used. All four sources are mapped to a single interrupt when jumper "2-IRQs" is not installed. When this jumper is installed, the COM_A and COM_C interrupts are routed to the lower IRQ and COM_B and COM_D interrupts are routed to the higher IRQ as shown in Table 6. The Interrupt status register can be read to determine which COM port is the source of the interrupt. See Section 5.
Table 6: Interrupt Selection
|Yes||Yes||No||No||Yes||3 and 4|
|No||No||Yes||No||Yes||4 and 5|
|Yes||No||Yes||No||Yes||5 and 6|
|No||Yes||Yes||No||Yes||6 and 7|
|Yes||Yes||Yes||No||Yes||7 and 9|
|Yes||No||No||Yes||Yes||9 and 10|
|No||Yes||No||Yes||Yes||10 and 11|
|Yes||Yes||No||Yes||Yes||11 and 12|
|No||No||Yes||Yes||Yes||12 and 14|
|No||Yes||Yes||Yes||Yes||14 and 15|
7 RS-485 and RS-422
COM_C and COM_D can support RS-232 or RS-485 or RS-422 protocols. Jumpers are used to select which mode is to be used for each port. There are also jumpers to add 120 ohm termination resistors for the TX and RX pairs. Termination resistors may be required when running very long distances at high baud rates. The TS-SER4 board supports either half-duplex or full duplex operation. The jumpers are labeled "RS-485" to select half-duplex (single pair operation) and the jumpers are labeled "RS-422" for full duplex operation (two pairs required).
The transmit enable for the RS-485 driver is controlled by the RTS signal. The RTS signal must be asserted true to enable the RS-485 driver. When RTS is deasserted it disables the transmit driver and enables the RS-485 receiver. The RTS signal has no effect on the RS-422 receiver. The RS-422 receiver is always functional. But RTS must be asserted to enable the RS-422 driver.
There is a control bit (See Section 5) that must be set for proper RS-485 or RS-422 operation. This bit must be set once and does not need to be updated. This enable bit solves a problem when RTS is asserted during boot. The BIOS and some Operating Systems toggle RTS during boot, which could cause it to "jam" the RS-485 bus. There is also a status bit indicates if the TS-SER4 is populated with the RS-485 option.
8 2X Baud Clock
The Jumper labeled "2x Baud" can be installed to cause all baud rates to be twice as high as the standard UART programming would indicate. For example, when a divisor of "1" written into the UART baud rate register, this would normally provide a baud rate of 115.2 Kbaud. But when jumper "2x Baud" is installed, this same divisor will yield a baud rate of 230.4 Kbaud.
When the external crystal oscillator is installed, this jumper also doubles the effective baud rate. If a 3.6864 MHz oscillator is installed, standard baud rates are obtained. If a 16.0 MHz oscillator is installed and jumper "2x Baud" is installed, a baud rate of 1 Megabit/second is obtained. This is the maximum clock rate that the TL16C554 chip can handle.
By adjusting the frequency of the external crystal oscillator (and also the divisor in the UART), any non-standard baud rate can be obtained.
9 X1 and Non-standard Baud Rates
The TS-SER4 has a socket for a 5V 8-DIP, 4 Leads (half size, metal can) oscillator. By default, the TS-SER4 uses a clock (1.8432MHz) from the PC104 bus which has a maximum baud rate of 115200. When a signal is detected on the X1 socket, it will use the clock from there instead.
Typically you will use 'setserial' to configure the port. For example, lets assume you have a 7.3728MHZ and your target baud rate is 230,400. Your baud_base is 7,372,800/16=460,800. This will also be your maximum baud rate. To reach custom baud rates, you must divide this value by an integer. In our case, the divisor would be 2 to reach 230400.
setserial /dev/ttyS4 spd_cust baud_base 460800 divisor 6
|Note:||Custom baud rates can be up to 5% off of your target baud rate, and communication will still be possible with most devices.|
Linux allows you to access this custom baud rate by essentially overwriting the ioctl used when setting your baud rate to 'B38400'. The Linux Documentation Project has more details on serial programming.
10 Jumpers JP1,JP2
These jumpers are not defined at this time. We may have some special functions for these jumpers in the future. For example, we had intended to support automatic RS-485 on the TS-SER4. The board was designed to allow for this capability, but the limited number of macrocells in the Xilinx PLD has forced us to forgo this functionality. The flexibility of the Xilinx PLD allows us to change this if required. For example, if we limited the number of IRQs that could be selected, we could gain enough macrocells to implement automatic RS-485 capability.
These jumpers can be read back in the status register, so they can be used as "User Jumpers" If there is a special feature you require, contact Technologic Systems.
11 Example Usage on TS-7800
To use the serial boards with the 7800, the ts7800_isa16550 module must be installed multiple times, once for each serial port. Below is a session log where the SER4 was successfully implemented. Here, the TS-SER4 had both RS-232 jumpers installed, along with COM1 and COM2 (designating com ports 3-6) and IRQ2 and IRQ4 (designating ARM IRQ 6). No other jumpers were on. Thus the io arguments for the commands below come from lines 3 to 6 on Table 4 of the manual. For the hello world test, COM A was looped back to COM C.
/ # pc104on / # modprobe ts7800_isa16550 irq=6 io=0x3e8 / # rmmod ts7800_isa16550 / # modprobe ts7800_isa16550 irq=6 io=0x2e8 / # rmmod ts7800_isa16550 / # modprobe ts7800_isa16550 irq=6 io=0x3a8 / # rmmod ts7800_isa16550 / # modprobe ts7800_isa16550 irq=6 io=0x2a8 / # cat /proc/tty/driver/serial serinfo:1.0 driver revision: 0: uart:16550A mmio:0xF1012000 irq:3 tx:11570 rx:577 RTS|CTS|DTR|DSR|CD 1: uart:16550A mmio:0xF1012100 irq:4 tx:0 rx:0 DSR|CD 2: uart:16550A mmio:0xEE0003E8 irq:70 tx:0 rx:0 3: uart:16550A mmio:0xEE0002E8 irq:70 tx:0 rx:0 4: uart:16550A mmio:0xEE0003A8 irq:70 tx:0 rx:0 DSR|CD|RI 5: uart:16550A mmio:0xEE0002A8 irq:70 tx:0 rx:0 DSR|CD|RI 6: uart:unknown port:00000000 irq:0 7: uart:unknown port:00000000 irq:0 / # / # mdev -s / # / # dmesg ..... serial8250: ttyS2 at MMIO 0xee0003e8 (irq = 70) is a 16550A serial8250: ttyS3 at MMIO 0xee0002e8 (irq = 70) is a 16550A serial8250: ttyS4 at MMIO 0xee0003a8 (irq = 70) is a 16550A serial8250: ttyS5 at MMIO 0xee0002a8 (irq = 70) is a 16550A / # / # cat < /dev/ttyS2 & / # echo "Hello World!" > /dev/ttyS4 Hello World! / #
12 Product Notes
12.1 Temperature Range
The TS-SER4 is available in both standard temperature (0-70 degrees Celsius) and in extended temperature range of –40 to +85 degrees Celsius.
12.2 FCC Advisory
This equipment generates, uses, and can radiate radio frequency energy and if not installed and used properly (that is, in strict accordance with the manufacturer's instructions), may cause interference to radio and television reception. It has been type tested and found to comply with the limits for a Class A digital device in accordance with the specifications in Part 15 of FCC Rules, which are designed to provide reasonable protection against such interference when operated in a commercial environment. Operation of this equipment in a residential area is likely to cause interference, in which case the owner will be required to correct the interference at his own expense.
If this equipment does cause interference, which can be determined by turning the unit on and off, the user is encouraged to try the following measures to correct the interference:
Reorient the receiving antenna. Relocate the unit with respect to the receiver. Plug the unit into a different outlet so that the unit and receiver are on different branch circuits. Ensure that mounting screws and connector attachment screws are tightly secured. Ensure that good quality, shielded, and grounded cables are used for all data communications. If necessary, the user should consult the dealer or an experienced radio/television technician for additional suggestions. The following booklets prepared by the Federal Communications Commission (FCC) may also prove helpful:
How to Identify and Resolve Radio-TV Interference Problems (Stock No. 004-000-000345-4) Interface Handbook (Stock No. 004-000-004505-7) These booklets may be purchased from the Superintendent of Documents, U.S. Government Printing Office, Washington, DC 20402.
12.3 Limited Warranty
Technologic Systems warrants this product to be free of defects in material and workmanship for a period of one year from date of purchase. During this warranty period Technologic Systems will repair or replace the defective unit in accordance with the following process:
A copy of the original invoice must be included when returning the defective unit to Technologic Systems, Inc. This limited warranty does not cover damages resulting from lightning or other power surges, misuse, abuse, abnormal conditions of operation, or attempts to alter or modify the function of the product.
This warranty is limited to the repair or replacement of the defective unit. In no event shall Technologic Systems be liable or responsible for any loss or damages, including but not limited to any lost profits, incidental or consequential damages, loss of business, or anticipatory profits arising from the use or inability to use this product.
Repairs made after the expiration of the warranty period are subject to a repair charge and the cost of return shipping. Please, contact Technologic Systems to arrange for any repair service and to obtain repair charge information.