J228 PCSER4 2192-09375-000-000 PCSER4 Serial Communications Board Technical Manual Contents Revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Preface: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Packing list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Utility Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Handling (ESD/Packaging) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Contacting Arcom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 I/O Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Programming the SCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Default Link Positions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 RS232/422 and 485 Select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 User Configuration Record Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 D-50 Output Connector (PL2) Pin Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Installation for CE Compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Circuit Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Page 1 2192-09375-000-000 J228 PCSER4 Revision Manual Issue B Issue C Issue D Issue E PCB V2 Iss 1 V3 Iss 1 V3 Iss 1 V3 Iss 1 960723 970818 980116 980608 Shortened Version first published ECO2184 ECO2684 ECO2749 Preface Packing List This product is shipped as follows: • Board • User Manual • Utility Disk If any of the above appear to be missing, please telephone Arcom 01223 411200. Utility Disk This product is shipped with a utility disk which contains: • PCbus library manual • Source Code for all PCbus I/O boards • A test program called EXAMP-01.EXE Handling (ESD/Packaging) This board contains CMOS devices which could be damaged in the event of static electricity being discharged through them. At all times please observe anti-static precautions when handling the board and always unpack and install the board in an anti-static working area. Please ensure that should a board need to be returned to Arcom, it is adequately packed and if a battery is fitted, that it is isolated. Product Information Full information about other Arcom products is available via the Fax-on-Demand System, (Telephone numbers are listed below), or by contacting our Website at: www.arcom.co.uk, or for the US, www.arcomcontrols.com Additional useful contact information: Customer Support: (tel) +44 (0)1223 412428, (fax) +44 (0)1223 403400, (email) [email protected] Sales: (tel) +44 (0)1223 411200, (fax) +44 (0)1223 410457, (email) [email protected], or for the US, [email protected] United Kingdom Arcom Control Systems Ltd Clifton Road Cambridge CB1 4WH UK tel: +44 (0)1223 411200 fax: +44 (0)1223 410457 FoD: 01223 240600 United States Arcom Control Systems Inc 13510 South Oak Street Kansas City, MO 64145 USA tel: (toll free) 888-941-2224 fax: 816-941-7807 FoD: 800-747-1097 France Arcom Control Systems Centre d’affaires SCALDY 23, rue Colbert 7885 SAINT QUENTIN Cedex, FRANCE tel:(Numero Vert) 0800 90 84 06 fax:(Numero Vert) 0800 90 84 12 FoD:(Numero Vert) 0800 90 23 80 Germany (Kostenlose Infoline:) tel: 0130 824 511 fax: 0130 824 512 FoD: 0130 860 449 Italy (Numeroverde:) FoD: 1678 73600 Belgium (Groen Nummer:) tel: 0800 7 3192 fax: 0800 7 3191 Netherlands (Gratis 0800 Nummer:) tel: 0800 022 11 36 fax: 0800 022 11 48 The choice of boards and systems is the responsibility of the buyer, and the use to which they are put cannot be the liability of Arcom Control Systems Ltd. However, Arcom’s sales team is always available to assist you in making your decision. © 1996 Arcom Control Systems Ltd. Arcom Control Systems Ltd is a subsidiary of Fairey Group plc. Specifications are subject to change without notice and do not form part of any contract. All trademarks recognised. Arcom Control Systems Ltd operate a company-wide quality management system which has been certified by the British Standards Institution (BSI) as compliant with ISO9001:1994 Page 2 J228 PCSER4 2192-09375-000-000 Introduction The PCSER4 is an 8-bit ISA bus add-on board providing 4 channels of RS232/485 Serial Comms. It is based on the 85230 Enhanced Serial Communications Controller and is capable of RS232, RS422 or RS485 signalling standards. Every channel can be independently configured for and synchronous protocols, baud rate and signalling standard. High speed asynchronous communications can be achieved up to 115kBaud (asynchronous) or 1.8Mbaud (synchronously). All serial channel connections are routed through the 50-way metal-shelled ‘D’-type connector. Features • CE compliant design • 4 serial channels • Link-selectable interrupts (IRQ 2,3) • 8-bit bus interface • User-controlled LED • Powerful and versatile 85230 Enhanced Serial Communications Controller • Differential RS485/422 • Arcom standard 50-way ribbon cable connection • Diagnostic facilities: Access LED and board ID code readable via a fixed offset in the I/O map • Operating temperature range, +5°C to +55°C • Power consumption from the host, max 300mA @ +5V, 60mA @ +12V • MTBF: 180,000 hours (using generic figures from MIL-HDBK-217F at ground benign), 50mA @ -12V Getting Started • Switch off PC • Install board in supplied configuration • Switch on PC • Run EXAMP-01.EXE (supplied on the utility disk) • An access or user LED should flash. If not check default link configuration. (Page 7) Page 3 2192-09375-000-000 J228 PCSER4 Operation I/O Map The I/O Pointer Scheme To access a register on the PCSER4 you must first set up a pointer to it, by writing a byte to the 'base address' of the PCSER4. After that, you can read from and write to the register that is pointed to, by accessing the byte at the base address + 1. The base address is set up using LKA9-LKA1. The board occupies only two bytes on the PCbus I/O space. The base address must be set to an even location. In order to allow standardisation of software some register addresses have been defined for all Arcom PCbus I/O boards. In particular, the top half of the 256 byte space has been defined as 'special function' register space, and the bottom half as 'I/O' register space. The next two sub-sections describe the register allocations in detail. The Registers on PCSER4: Table 1 - Indexed I/O Registers Pointer Value (hex) 10 10 Read/Write Register Name Comments Write INTP Pulse Interrupt Line Read INT Interrupting Device 08-0F not used 07 Read/Write D4 Channel 4 Data 06 Write C4 Channel 4 Control 06 Read S4 Channel 4 Status 05 Read/Write D3 Channel 3 Data 04 Write C3 Channel 3 Control 04 Read S3 Channel 3 Status 03 Read/Write D2 Channel 2 Data 02 Write C2 Channel 2 Control 02 Read S2 Channel 2 Status 01 Read/Write D1 Channel 1 Data 00 Write C1 Channel 1 Control 00 Read S1 Channel 1 Status Page 4 J228 PCSER4 2192-09375-000-000 The Registers on PCSER4: Table 2 - Indexed Special Functions Pointer Value (hex) 81 80 Read/Write Register Name Comments Read Board Ident Reading this should always give a value of 10 (hex) for the PCSER4 Write User LED Writing 01 switches the green LED on. Writing 00 switches it off How to Write to the Registers It is useful to remember that the pointer register only needs to be written to once, if only one register is read or written. This means that I/O can be done with byte reads and writes. However, if your program is continually changing registers, it must write a new pointer value each time it accesses a new register. This can be done by writing a pair of bytes as a word, because the CPU in a PC does word writes to the bus by writing the lower byte first, this setting up the pointer register first. Programming the SCC Introduction The SCC is a versatile and powerful device and as such requires careful initialisation. For this reason, it is strongly recommended that the SCC manufacturer’s manual is used. This may be obtained by calling Arcom Technical Support on +44 (0) 1223 410 457. It should be noted that it is not software-compatible with the PC 8250-type UART. The order in which registers are initialised is important and a register may need to be accessed more than once during initialisation. It is not worth taking short cuts, or unreliable operation may result. For examples of basic SCC initialisation, please refer to the programs on the utility disk. Each SCC occupies four I/O locations in the PCSER4’s indexed I/O map; two consecutive locations per channel. The lower address of each pair is the control and status register, which is also multiplexed with the control/status pointer register; the higher address of each pair contains data transmit and receive latches. Like the PCSER4, the SCC itself has an indexed register scheme for the status and control registers, but not for the serial data registers themselves. The important difference here is that because the register pointer latch occupies the same I/O location as the control and status registers themselves, the pointer latch always has to be written before each register data write or read. The one exception to this rule is status register 0, which can be read without having to write ‘0’ first. Initialising SCC Control Registers From the above, it can be seen that initialising an SCC channel involves the following steps: i. Write the address, in the PCSER4’s indexed I/O map, of the desired channel’s control/status register to the base address of the PCSER4. See Table 1 - Indexed I/O Registers ii Write the SCC’s control register number to the PCSER4 base address +1 iiii Write the new register contents to the PCSER4 base address + 1 iv Repeat steps (ii) and (iii) for each of the SCC registers until all have been initialised Transmitting and Receiving Data The tables show the steps required to transmit and receive data in polled mode. Page 5 2192-09375-000-000 J228 PCSER4 Table 3: Transmit Data Explanation Command Sets up the PCSER4 for the SCC read register 0 (status) on channel 0 Write 02 to 180H (the pointer register) Read from 181H (the data register) Reads status Logically AND the value read with 4 A result of 4 means the Tx buffer is empty, so another byte can be sent. If not, loop back to the read at 181H Sets up the PCSER4 for an access to the SCC data register on channel 2 The byte goes to the transmit buffer and is sent Write 03 to 180H (the pointer register) Write data byte to be transmitted to 181H (the data register) Table 4: Receive Data Explanation Command Sets up the PCSER4 for the SCC read register 0 (status) on channel 2 Write 02 to 180H (the pointer register) Read from 181H (the data register) Read status Logically AND the value read with 1 A result of 1 means that there is a byte in the receive register. If not, loop back to the read at 181H Sets up the PCSER4 for an access to the SCC data register channel 2 Reads Serial Data. Write 03 to 180H (the pointer register) Read from the data register Baud Rates The SCC has one 16-bit baud rate counter per channel for both receive and transmit, so both run at the same baud rate. In asynchronous mode, the clock must be used in a x16 mode, so the baud rate calculation is: time constant = 230400 baud rate -2 Typical baud rates and their time constants are: Table 5: Typical Baud Rates Baud TC 115200 0 38400 4 19200 10 9600 22 The 16-bit counter is set up by writing the lower byte of the time constant to SCC register 12 (decimal) and the upper byte to register 13 (decimal). The baud rates above all have time constants of less than 256, so their upper bytes are all zero. Page 6 J228 PCSER4 2192-09375-000-000 Links Default Link Positions TP3 TP2 LKA8 LKA7 LKA9 LKA6 LKA5 LKA4 LKA3 LKA2 Link Position Diagram (Default Base Address = 180H) A A B A B B LK14A LK24A A B A B LK34A LK44A A B LKB5 LKB4 LKB3 LKB2 LKB1 LKA1 TP1 Address Links LKA9-LK1 Links LKA9-LKA1 Links LKA9 to LKA1 correspond to the address lines within the PC. This allows the user to set the board on any even two byte boundary. Making a link sets the address line high, hence the default link setting LKA8 and LKA7 made gives the address 180H. All the address links are grouped together at the top left-hand corner of the board with the exception of LKA1 which will be found close to the ISAbus connector and IC17. Address line: A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 Hex value: 2 1 8 4 2 1 8 4 2 1 Address link: LKA9 LKA8 LKA7 LKA6 LKA5 LKA4 LKA3 LKA2 LKA1 - Default base: - + + - - - - - - + Indicates link fitted. There are four functions defined by links on the PCSER4: whether the serial lines are RS232 or RS485/422 (and how some of them are connected); where the interrupts go to on the PC; synchronous clock sourcing; and receiver enabling/disabling. The first of the link number refers to the serial channel, as defined in the I/O map. Thus LK13 refers to channel 1. The links define whether some of the lines connecting to the SCC for that channel are at RS232 or RS485/422 levels, and in some cases which lines go to the 50-way connector.(Refer to the table below). The reason why some lines on the 50-way connector change function is because RS485/422 is a differential (2-wire) system, whereas RS232 is single-ended and uses one wire per function. Some of the serial lines are not affected by these links. This is either because they have a connection on the 50-way connection, which is not shared with a different function or level, or because the device can operate at either level. Page 7 2192-09375-000-000 J228 PCSER4 RS232/RS485 and 422 Table 6: Serial Signal Configuration Link Channel LK10 1 Ribbon Cable Wire Number 9 A position: RS232 DTR out B position: RS485/422 DCD- in LK11 1 8 CTS out LK12 1 4 TX out TX+ out LK13 1 7 RTS out DTR- out LK20 2 19 DTR out DCD- in LK21 2 18 CTS in DTR+ out LK22 2 14 TX out TX+ out LK23 2 17 RTS out DTR- out LK30 3 29 DTR out DCD- in LK31 3 28 CTS in DTR+ out LK32 3 24 TX out TX+ out LK33 3 27 RTS out DTR- out LK40 4 39 DTR out DCD- in LK41 4 38 CTS in DTR+ out LK42 4 34 TX out TX+ out LK43 4 37 RTS out DTR- out DTR+ out Interrupts: Link 2 LK2A Sends the interrupt from the SCCs to PCbus IRQ3 LK2B Sends the interrupt from the SCCs to PCbus IRQ2 No jumper means that the PCSER4 cannot generate any interrupts. If you intend to use the Arcom driver software, it may be necessary to insert a jumper into one of these link positions. We recommend that you only insert a jumper into LK2, if you intend to use interrupts from the SCCs and are experienced at writing PC interrupt-handling software. Page 8 J228 PCSER4 2192-09375-000-000 Synchronous Clocks RS232/422 and 485 Switching and Receiver Disabling There are four groups of nine pins: each group is a three-pin, two-position link. They are called LK14A-C, LK24A-C, LK34A-C and LK44A-C. The first digit of the link number refers to the channel; the letter refers to the function. The 'A' links control receiver enables. If a link is inserted in position A on one of these links, the receive buffer is enabled when RTS is active. If the jumper is in position B, the receive buffer is permanently enabled. The 'B' links change the function of the wires 3, 13, 23, 33 of the ribbon cable. In position A they connect the wires to the RS485 transmitted data; in position B they connect the wires to the 85230 TRXC clock inputs via RS232 buffers. The 'C' links change the function of the wires 5, 15, 25, 35 of the ribbon cable. In position A they connect the wires to the RS485 received data; in position B they connect the wires to the 8530 TRXC clock inputs via RS232 buffers. LK14A A Rx buffer enabled when RTS active LK14A B Rx buffer is permanently enabled LK14B A Pin 3 of PL2 connects to RS485 Tx data LK14B B Pin 3 of PL2 connects to 85230 TRXC clock inputs via RS232 buffers LK14C A Pin 5 of PL2 connects to RS485 Rx data LK14C B Pin 5 of PL2 connects to 85230 RTXC clock inputs via RS232 buffers LK24A A Rx buffer enabled when RTS active LK24A B Rx buffer is permanently enabled LK24B A Pin 13 of PL2 connects to RS485 Tx data LK24B B Pin 13 of PL2 connects to 8530 TRXC clock inputs via RS232 buffers LK24C A Pin 15 of PL2 connects to RS485 Rx data LK24C B Pin 15 of PL2 connects to 85230 RTXC clock inputs via RS232 buffers LK34A A Rx buffer enabled when RTS active LK34A B Rx buffer is permanently enabled LK34B A Pin 23 of PL2 connects to RS485 Tx data LK34B B Pin 23 of PL2 connects to 85230 TRXC clock inputs via RS232 buffers LK34C A Pin 25 of PL2 connects to RS485 Rx data LK34C B Pin 25 of PL2 connects to 85230 RTXC clock inputs via RS232 buffers LK44A A Rx buffer enabled when RTS active LK44A B Rx buffer is permanently enabled LK44B A Pin 33 of PL2 connects to RS485 Tx data LK44B B Pin 33 of PL2 connects to 85230 TRXC clock inputs via RS232 buffers LK44C A Pin 35 of PL2 connects to RS485 Rx data LK44C B Pin 35 of PL2 connects to 85230 RTXC clock inputs via RS232 buffers IMPORTANT: These signals are at TTL levels, not RS232 or RS422/485. Connecting RS232 or RS422/485 to these pins with a link inserted, will destroy the SCC. Page 9 2192-09375-000-000 J228 PCSER4 User Configuration Record Diagram This sheet may be duplicated B A TP1 B A LK44A B B B A A A LK34A LK24A B A LK14A TP2 TP3 LKA9 LKA8 LKA7 LKA6 LKA5 LKA4 LKA3 LKA2 Page 10 B LKA1 LKA1 LKA2 LKA3 LKA4 LKA5 LKA6 LKA7 LKA8 LKA9 A LKB5 LKB4 LKB3 LKB2 LKB1 Link LK10 LK11 LK12 LK13 LK20 LK21 LK22 LK23 LK30 LK31 LK32 LK33 LK40 LK41 LK42 LK43 LK2 LK14A LK14B LK14C LK24A LK24B LK24C LK34A LK34B LK34C LK44A LK44B LK44C J228 PCSER4 2192-09375-000-000 Connectors D-50 Output Connector (PL2) Pin Assignments Because most people will use ribbon cables with this board, the D-50 pin assignments are shown with the corresponding ribbon cable number, 1 to 50. For ease of reference, the corresponding ‘D’- type connector pins are shown on the circuit diagram. The pin-out conforms to the Arcom Signal Conditioning System (SCS). Table 7: Cable Connections Ribbon Cable No. D-50 Pin No. Signal Title RS232 RS485/422 1 1 0V 2 34 0V 3 18 4 2 5 35 6 19 Rx RxA 7 3 RTS DTRB 8 36 CTS DTRA 9 20 DTR 10 4 11 37 12 21 13 5 14 38 15 22 16 6 Rx RxA 17 39 RTS DTRB 18 23 CTS DTRA 19 7 DTR DCDB 20 40 CH2 DCD DCDA 21 24 22 8 23 41 24 25 25 9 26 42 Rx RxA 27 26 RTS DTRB 28 10 CTS DTRA 29 43 DTR DCDB 30 27 CH3 DCD DCDA 31 11 32 44 33 28 34 12 35 45 36 29 Rx RxA 37 13 RTS DTRB 38 46 CTS DTRA 39 30 DTR DCDB 40 14 CH4 DCD DCDA 41 47 42 31 43 15 Not Used 44 48 Not Used 45 32 Not Used 46 16 Not Used 47 49 -12V 48 33 +12V 49 17 +5V 50 50 +5V TxB Tx TxA RxB DCDB CH1 DCD DCD 0V SYNA0 TxB Tx TxA RxB 0V SYNB0 TxB Tx TxA RxB 0V SYNA1 TxB Tx TxA RxB 0V SYNB1 Page 11 2192-09375-000-000 J228 PCSER4 Installation for CE Compliance To maintain compliance with the requirements of the EMC Directive (89/336/EEC), this product must be correctly installed. The PC in which the board is housed must be CE compliant as declared by the PC manufacturer. The type of external I/O cable can be chosen according to the notes below: 1. Remove the cover of the PC observing any additional instructions of the PC manufacturer 2. Locate the board in a spare ISA slot and press gently but firmly into place 3. Ensure that the metal bracket attached to the board is fully seated 4. Fit the bracket clamping screw and firmly tighten this on the bracket NOTE: Good contact of the bracket to chassis is essential 5. Replace the cover of the PC observing any additional instructions of the PC manufacturer Cable Cable length 1Metre or less : Ribbon cable satisfactory Cable length up 1M to 3M : Commercial screened cable gives the protection required Longer cable or noisy environment : Use fully screened cable with metal backshells e.g. Arcom CAB50CE The following standards have been applied to this product: Page 12 BS EN50081-1: 1992 Generic Emissions Standard, Residential, Commercial, Light Industry BS EN50082-1: 1992 Generic Immunity Standard, Residential, Commercial, Light Industry BS EN55022 : 1995 ITE Emissions, Class B, Limits and Methods J228 PCSER4 2192-09375-000-000 Circuit Diagrams Page 13 2192-09375-000-000 Page 14 J228 PCSER4 J228 PCSER4 2192-09375-000-000 Page 15 2192-09375-000-000 Page 16 J228 PCSER4