PC-COM4 [ETC]
PC(ISA)BUS I/O CARD ; PC ( ISA)总线I / O卡\n型号: | PC-COM4 |
厂家: | ETC |
描述: | PC(ISA)BUS I/O CARD
|
文件: | 总20页 (文件大小:494K) |
中文: | 中文翻译 | 下载: | 下载PDF数据表文档文件 |
J606 PC-COM4
22192-09197-000-000
PC-COM4
Introduction
The PC-COM4 is an 8 or 16-bit ISABUS module providing up to four 16c550 type serial
asynchronous communications channels: two of non-isolated RS232 and two channels that
can be configured as either non-isolated RS232 or optically isolated RS422 or RS485. A
depopulated version of the PC- COM4 (PC-COM4-RS232) is available, which does not contain
the RS422/485 circuitry.
Features
• 4 off 16C550 compatible UART channels. (Referred to as channels A, B, C & D)
• 2 off opto-isolated RS422/485 ports, or full feature RS232 ports. (channels A & B)
• 2 off full feature RS232 ports. (channels C & D)
• Baud rates up to 115.2kbaud supported.
• +5V only operation.
• Configurable as standard PC AT COM1-4 or anywhere in I/O address range 000-3FFh
• Each channel is link selectable IRQ of 3, 4, 5, 7, 9, 10, 11, 12 or 15.
• Combined interrupt option for any channel combination to IRQ 3, 4, 5, 7, 9, 10, 11, 12, or 15.
• ISABUS 16 bit interface (but can be used in 8-bit slot if IRQ10,11, 12 and 15 are not required).
• Board access LED.
• Isolation:
Channel A to Channel B
>100V DC
> 100V DC
> 100V DC
> 100V DC
Channels A or B to Channels C or D
Channels A or B to ISABUS Ground
Channels A or B to Chassis Ground
• Power Requirements:
120mA (typ) at +5V DC
• Temperature Range:
0 °C to +70 °C operating.
- 40 °C to +125 °C storage.
• MTBF 181, 152 hours (PC-COM4)
232, 837 hours (PC-COM4-RS232)
(Calculated using MIL-HDBK-217F generic failure rates at Ground Benign)
Note:
In order to prevent confusion between standard PC AT nomenclature of COM1-4, this
manual will refer to the four communications channels on the PC-COM4 as Channel A-
D. Where the manual refers to COM1-4, this will mean the standard PC AT
communications ports.
Product Components
As shipped, the PC-COM4 is supplied with the following items:
• The PC-COM4 board.
• This Manual
• A disk containing a ‘C’ example program and the UART data-sheet in Adobe Acrobat
(Portable Document) Format.
Adobe Acrobat Reader can be downloaded free of charge from Arcom’s Internet Site at
http://www.arcomcontrols.com
Page 1
CONTROL SYSTEMS
2192-09197-000-000
J606 PC-COM4
Description
The PC-COM4 uses a quad 16C550 type UART device to provide the four communications
channels. The 16C550 device is the standard type of UART used on PC AT type machines and
is supported by a wide range of third party software.
Two channels on the PC-COM4 (channels A and B) can either be configured as RS323 or
RS422/485. When configured as RS422/485 these are independently electrically isolated from
the ISABUS bus and can be configured for either RS422 type communications or RS485 type
communications. When configured for RS232 these channels offer all the signals found on a
PC AT type 9-pin RS232 port.
Similarly, the other two channels (CandD) are configured as RS232, supporting all the signals
found on a PC AT type 9-pin RS232 port.
A flexible addressing system allows the four channels to be mapped into the standard PC AT
communications channel addresses for COM1-4. Alternatively, pairs of channels can be
mapped into any I/O location from 000-3FFh. See later for more details of address mapping.
Each channel has its own interrupt line that can be linked to any of the following ISABUS
Interrupts IRQ3-5, 7, 9-12, 15. Additionally, interrupts from any combination of channels may
be ORed together to produce a single interrupt to any of the above signals.
The PC - COM4 has a 16 bit ISABUS connector but utilises only interrupt lines IRQ10, 11, 12
and 15 on the 16-bit part of the ISABUS connector. This means that the board can also be used
in an 8 bit ISABUS slot providing that these interrupt lines are not required.
I/O Map
The PC-COM4 has a flexible addressing system that allows the channels A, B, C and D to be
addressed at the fixed PC locations for COM1, COM2, COM3 and COM4, or allows them to be
addressed using the user base address link LK36:
3F0h
3F0h
3E0h
3F8-3FFh
3E8-3EFh
COM1
COM3
2F8-2FFh
2E8-2EFh
COM2
COM4
Channel D
Channel C
Channel B
Channel A
Channel B
Channel A
Channel D
ChannelC
LK1
Base
Address
LK1
Base
Address
000h
000h
Channel A, B, C and D
000h
Channel A and B
Fixed PC AT Addressing
Channel C and D
Variable Base Address
Page 2
CONTROL SYSTEMS
J606 PC-COM4
2192-09197-000-000
The option link LK34 defines the addressing mode for channels A and B, and channels C & D
as follows:
LK34 – Option Link
Channel Address Mapping
CD1
X
X
X
X
CD0
X
X
X
X
AB1
Omit
Omit
Fit
Fit +
X
X
X
X
AB0
Omit
Fit
Omit
Fit +
X
X
X
X
Chan A Chan B
Chan C
Chan D
X
X
X
X
X
X
X
X
COM1
COM 2
COM 3
COM2
COM 3
COM 4
Variable Base Address
X
X
X
X
X
X
X
X
Omit
Omit
Fit +
Fit
Omit
Fit
Omit +
Fit
COM 1
COM 2
COM 3
COM 2
COM 3
COM 4
Variable Base Address
Additionally, LK31 can be used to disable any channel from being addressed by removing the
appropriate link A, B, C or D.
Each channel occupies 8 bytes of I/O space with the following registers defined:
Register Offset
Mnemonic
Read Register
Write Register
General Register Set (DLAB[ICR:7]clear)
0
1
2
3
4
5
6
7
RHT/THR
IER
ISR/FCR
LCR
Receive holding register
Interrupt Enable Register
Interrupt Status Register
Transmit Holding Register
FIFO Control Register
Line Control Register
MCR
LSR
MSR
SCR
Modem Control Register
Line Status Register
Modem Status Register
Scratchpad Register
Baud Rate Register Set (DLAB[ICR:7]set)
0
1
DLL
DLM
LSB of Divisor Latch
MSB of Divisor Latch
Interrupts
Four links, LK28-30,33 define the interrupt mapping for each of channels A to D respectively.
Each channel can be connected to any of IRQ3, 4, 5, 7, 9, 10, 11, 12 or 15. Note that IRQ10,
11, 12 and 15 are only available when the PC-COM4 is used in a 16 bit ISABUS slot.
If any of links LK28-30,33 is fitted in the OR position, then this channels interrupt is ORed to
link LK35 which can then be connected to any of the above IRQ lines. This permits all of the
UARTs on the PC-COM4 to share a single interrupt line to conserve IRQ resources.
Page 3
CONTROL SYSTEMS
2192-09197-000-000
J606 PC-COM4
Links
Link Position Diagram
User Configuration Diagram
Default Shipment Configuration
Channel PC/AT COM I/O Address IRQ Number Comms Type
Terminator
A
B
C
D
n/a
n/a
COM3
COM4
180h
188h
3E8h
2E8h
11
10
4
RS485
RS485
RS232
RS232
Pulled inactive
Pulled inactive
n/a
3
n/a
LK1-9, 32 Channel B Configuration Links
These links are used to configure channel B for either RS232 operation (all links in position A)
or RS422/485 operation (all links in position B). The default configuration is for RS422/485 (all
B).
LK10-18, 27 Channel A Configuration Links
These links are used to configure channel A for either RS232 operation (all links in position A)
or RS422/485 operation (all links in position B). The default configuration is for RS422/485 (all
A)
Page 4
CONTROL SYSTEMS
J606 PC-COM4
2192-09197-000-000
LK19-22 Differential Pair Termination Links
Each differential Pair on Channels A and B can be terminated in six ways according to the
following table:
Link Configuration
Circuit Configuration
Description
Unterminated
A
B
C
D
B
A
UART
PIN
Line Driver connects directly to the
differential pair.
Terminated
A
B
C
D
B
A
Differential pair is terminated with
124R resistance between signal
lines.
UART
124R
PIN
Pulled Inactive +
A
B
C
D
4K7
B
A
Differential pair is pulled apart to
mimic no character being transmitted
from the UART.
UART
PIN
4K7
4K7
Pulled Inactive and Terminated
A
B
C
D
B
Differential pair is terminated with
124R and is pulled apart to mimic to
character being transmitted.
UART
124R
PIN
A
4K7
Pulled Active
A
B
C
D
4K7
B
A
Differential pair is pulled apart to
mimic a UART sending a break
condition.
UART
PIN
4K7
4K7
Pulled Active and Terminated
A
B
C
D
B
A
Differential pair is terminated with
124R and is pulled apart to mimic a
break condition.
UART
124R
PIN
4K7
Note: Optical Isolation has been omitted from the above diagrams to aid clarity..
(Default link positions are marked +.)
The following links relate to the following differential pairs:
Link
LK19
LK20
LK21
LK22
Channel
RS422 Pair
Transmit
Receive
Transmit
Receive
RS485 Pair
BI-directional
n/a
Bi-directional
n/a
Signal Names
B-TXBA, B-TXBB
B-RXA, B-RXB
A-TXBA, A-TXBB
A-RXA, A-RXB
B
B
A
A
LK23, 24 Channel B Mode Links
LK23
A
LK24
A
Mode
Comment
RS422 Point-point Transmit on B-TXB, Receive on B-RX
B
B+
A
B+
RS422 Multi-drop
RS485
Transmit on B-TXB, Receive on B-RX
Transmit and Receive on B-TXB
(Default positions marked with +).
Page 5
CONTROL SYSTEMS
2192-09197-000-000
J606 PC-COM4
LK25, 26 Channel A Mode Links
LK25
A
LK26
A
Mode
Comment
RS422 Point-point Transmit on B-TXB, Receive on B-RX
B
B+
A
B+
RS422 Multi-drop
RS485
Transmit on B-TXB, Receive on B-RX
Transmit and Receive on B-TXB
(Default positions marked with +).
LK28-30,33 Channel Interrupt Links
LK28-30,33 are the interrupt select links for channels D to A respectively. The possible IRQ
lines available are IRQ3, 4, 5, 7, 9, 10, 11, 12 and 15. Note that it is only possible to use IRQ
lines 10, 11, 12 and 15 when the PC-COM4 is inserted in a 16 bit ISABUS slot. (Default links
are: LK29 position 4, LK28 position 3, LK33 position 11, LK30 position 10.)
See section on Interrupts above.
If any link is in position OR, then that channels IRQ is ORed with all the other channels with
links in the same position and passed to the shared interrupt link LK35. (See later for
description.)
LK31 Channel Enable Link
LK31 is used to enable each of the channels. Fit a link to enable the addressing of a channel,
omit it to disable. (Default is all enabled.)
LK34 OPtion Link
LK34 – Option Link
Channel Address Mapping
CD1
X
X
X
X
CD0
X
X
X
X
AB1
Omit
Omit
Fit
Fit +
X
X
X
X
AB0
Omit
Fit
Omit
Fit +
X
X
X
X
Chan A Chan B
Chan C
Chan D
X
X
X
X
X
X
X
X
COM1
COM 2
COM 3
COM2
COM 3
COM 4
Variable Base Address
X
X
X
X
X
X
X
X
Omit
Omit
Fit +
Fit
Omit
Fit
Omit +
Fit
COM 1
COM 2
COM 3
COM 2
COM 3
COM 4
Variable Base Address
For more information see the I/O Map section above. (Default positions marked with +).
LK35 Shared Interrupt Link
LK35 is the shared interrupt link. Any channel whose IRQ link is selected at position O OR R
will be ored together and passed to this link. This link can then be set for any of the positions
3, 4, 5, 7, 9, 10, 11, 12 or 15 or Disabled. The default position is Disabled.
LK36 Address Link
L LK K3 36 6 is the address decode link. The desired user base address is set on this link. Note
that if two channels are configured to use the user address then this defines the base address
of a 16 byte access window in the I/O space and can be set on any 16 byte boundary from
000h to 3F0h; if four channels are configured to use the user address link A4 is ignored: LK36
defines a 32 byte window on any 32 byte boundary from 000h to 3E0h. (Default LK36 setting
is for base address of 180h.)
See I/O Map section above.
Page 6
CONTROL SYSTEMS
J606 PC-COM4
2192-09197-000-000
Using the Differential Communications Channels - A and B
In order to use channels A and B on the PC-COM4 they must be configured appropriately:
Address and Interrupt Selection
The I/O address of channels A and B must first be configured, together with the interrupt line
for each channel. You will need to refer to the documentation on your CPU card to establish
spare I/O and interrupt channels to use.
Then refer to the I/O Map, Interrupts and Links section of this manual to configure the
appropriate links.
Communications Mode
The PC-COM4 supports both RS422 and RS485 type differential communications modes. In
the RS422 mode of operation, this can function as either point to point or multidrop. The
differences between each of the configurations is illustrated below:
RS422 Point-point
RS422 Multi-drop
RS485
Number of Wires
5
Number of Wires
5
Number of Wires
3
Transmitters Enabled
Receivers Enabled
Duplex Mode
LK23 (LK24)
LK25 (LK26)
always Transmitters Enabled active RTS Transmitters Enabled active RTS
always Receivers Enabled
full Duplex Mode
always Receivers Enabled inactive RTS
full Duplex Mode
position B LK23 (LK24)
position A LK25 (LK26)
half
position B
position B
position A LK23 (LK24)
position A LK25 (LK26)
LK1-9, 27 (LK10-18, 28) position B LK1-9, 27 (LK10-18, 28) position B LK1-9, 27 (LK10-18, 28) position B
Note: LK25 and 26 are the mode links for channel A, LK23 and 24 (in brackets) are for
channel B.
Page 7
CONTROL SYSTEMS
2192-09197-000-000
J606 PC-COM4
If you are designing your own systems implementation from scratch, you will be able to select
the appropriate type of communications standard for your system:
RS422 point-point is a good way of connecting two pieces of equipment together as the
differential communications system gives good noise immunity and the full duplex gives high
speed.
RS422 Multi-drop is suitable for systems where one piece of equipment is controlling a number
of other pieces of equipment in a master/slave type relationship. The full duplex nature of the
system provides for high speed communication. Be aware that the software must ensure that
no two transmitters are driving on to the bus at once. The line drivers have protection circuitry
in them to prevent damage occurring, but communications data will be lost.
RS485 is also a multi-drop configuration and is ideal for peer-peer networking or for systems
where cabling cost is large so there is advantages to be gained with a three wire system. Not
again that the software must ensure that only one transmitter is driving the communications
pair at once.
Configure links LK23-26 for the appropriate differential communications mode for channels A
and B.
Line Terminations
Differential communications pairs should be terminated to prevent reflections from either end
of the communications cables. Each pair should be terminated at each end of the wire run with
a resistance that matches the impedance of the cable.
The PC-COM4 is capable of terminating each of the differential pairs on channels A and B
using links LK19-22. Two types of termination network can be configured: line matching
terminators and pull apart resistors.
Line Matching Terminators
124 ohm resistors can be linked across each communications pair (see Links section). This will
be a fair match with twisted pair wiring. These should be configured on boards at either end of
the wiring run only.
Pull Apart Resistors
The PC-COM4 is also able to pull each line of a communications pair to either +5V or 0V
through a 4K7 resistor. This facility is primarily intended for use in RS422 multi-drop or RS485
systems to ensure that the communications pair floats to a known state when no transmitters
are active.
Normally, a communications pair would be pulled apart in the inactive state. This mimics the
condition where no character is being transmitted from the UART. It is however possible for the
PC- COM4 to pull the communications pair in either direction.
Care should be taken when using the pull-apart resistors in systems with multiple pieces of
equipment on the same pair as each fitted pull apart network will load the line driver devices.
Reduce the number of fitted resistor networks to prevent this causing problems.
If there are no pull-apart resistor networks fitted anywhere on a multi-drop communications
pair, it will be necessary for software to wait in excess of one character transmission time after
asserting the RTS signal before loading the first character into the UART transmit buffer. This
gives the receiving equipment time to clear any error character caused by a rogue start bit
when the line driver was enabled at the transmitter.
Page 8
CONTROL SYSTEMS
J606 PC-COM4
2192-09197-000-000
Software Considerations
RS422 point-point does not require any special consideration within the software other than
that hardware handshaking is obviously not possible. If flow control is required, it must be
implemented by software such as the use of the XON/XOFF protocol.
RS422 multi-drop and RS485 configurations need careful control of the RTS signal from the
UART which is used to enable the transmitter on the differential pair.
RTS needs to be asserted prior to the beginning of the first start bit of the first transmitted
character transmitted from the UART and needs to be disabled after the last stop bit of the last
character has actually been transmitted from the UART.
The opto-isolation on the PC-COM4 has a fixed delay from RTS becoming active on the UART
to the line driver switching ON of approximately 2 microseconds. A delay must be added before
loading the first character into the UART transmit buffer to ensure that the driver is ON.
After a character has been transmitted on the UART, it is possible to monitor the TEMT
(Transmitter Empty) bit of the Line Status register. Only after this has become asserted is it
valid to negate the RTS signal. Reception of a Transmit Buffer Empty interrupt is not a
valid condition for negating RTS. The output shift register of the UART is still active until
the TEMT bit is set.
Using Channels A and B in RS232 mode
Channels A and B can be used as normal RS232 ports by appropriately configuring links LK1-
9,32 for channel B and LK10-18,27 for channel A.
Using the RS232 Channels - C & D
The RS232 channels on the PC-COM4 are of a standard implementation providing for all of the
standard signals available on a nine way RS232 interface.
Address and Interrupt Selection
The I/O address of channels C and D must first be configured, together with the interrupt line
for each channel. You will need to refer to the documentation on your CPU card to establish
spare I/O and interrupt channels to use.
Then refer to the I/O Map, Interrupts and Links section of this manual to configure the
appropriate links.
Page 9
CONTROL SYSTEMS
2192-09197-000-000
J606 PC-COM4
Connector
PL1 Pin Assignments
Channel
Description Pin Pin Description
Data Carrier Detect (D-DCD)
Received Data (D-RXD)
Transmitted Data (D-TXD)
Data Terminal Ready (D-DTR)
RS232 Signal Ground (GND)
Data Carrier Detect (C-DCD)
Received Data (C-RXD)
Transmitted Data (C-TXD)
Data Terminal Ready (C-DTR)
RS232 Signal Ground (GND)
reserved
(D-DSR) Data Set Ready
(D-RTS) Ready to Send
(D-CTS) Clear to Send
(D-RI) Ring Indicator
(CHASSIS) Screen or Shield
(C-DSR) Data Set Ready
(C-RTS) Ready to Send
(C-CTS) Clear to Send
(C-RI) Ring Indicator
(CHASSIS) Screen or Shield
reserved
1
34
2
18
35
3
D
19
36
4
20
37
5
21
38
6
C
22
39
7
23
40
8
24
41
9
reserved
reserved
25
42
10
27
44
12
29
46
14
31
48
16
33
50
reserved
reserved
reserved
reserved
26
43
11
28
45
13
30
47
15
32
49
17
reserved
reserved
B-DCD
B-RXD
B-TXD
B-DTR
B-RI
Isolated Channel B +5V
Isolated Chan B Ground (GND)
RS422 Tx / RS485 B (B-TXBB)
RS422 Rx Line B (B-RXB)
Isol Chan B Res Gnd (RGND)
Isolated Channel A +5V
Isolated Chan A Ground (GND)
RS422 Tx / RS485 B (A-TXBB)
RS422 Rx Line B (A-RXB)
Isol Chan A Res Gnd (RGND)
no connect
B-DSR
B-RTS
B-CTS
B-RI
Isolated Chan B Ground (GND)
RS422 Tx / RS485 A (B-TXBA)
RS422 Rx Line A (B-RXA)
(CHASSIS) Screen or Shield
no connect
B
A
A-DCD
A-RXD
A-TXD
A-DTR
A-RI
A-DSR
A-RTS
A-CTS
A-RI
Isolated Cha A Ground (GND)
RS422 Tx / RS485 A (A-TXBA)
RS422 Rx Line A (A-RXA)
(CHASSIS) Screen or Shield
CAB PC-COM4
PL3 has been wired so that it can easily split into standard 9 way male D-sub connectors with
standard pin-outs for communications channels. Supplied with the PC-COM4 is a suitable
example cable. Tha CAB PC-COM4 is wired as follows
1
2
3
4
5
1
2
3
4
5
PC/AT RS232
Port Pinout
Arcom
SERT-485
Pinout
Cable connectors A and B can be of either pinout depending on links LK1-18. Cable
connectors C and D are always RS232 pinout.
Page 10
CONTROL SYSTEMS
J606 PC-COM4
2192-09197-000-000
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 system in which the board is housed must be CE compliant
as declared by the manufacturer. The external I/O cable should be the Arcom CAB PC-COM4,
or a fully screened cable to the same pattern.
1. Remove the cover of the PC observing any additional instructions of the PC manufacturer.
2. Locate the board in a spare PCI local bus 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 the chassis is essential.
5. Replace the cover of the PC observing any additional instructions of the PC manufacturer.
Cable
Cable length 1 Metre or less
Cable 1 Metre to 3 Meters
:
:
:
Ribbon cable satisfactory.
Commercial screened cable.
> 3 Meters of noisy environment
Use fully screened cable with metal backshells
e.g. Arcom CAB50CE
The following standards have been applied to this product:
BS EN50081-1 : 1992 Generic Emissions Standard, Residential, Commercial, Light Industry
BS EN50082-1 : 1992 Generic Immunity Standard, Residential, Commercial, Light Industry
BSEN55022
: 1995 ITE Emissions, Class B, Limits and Methods.
Page 11
CONTROL SYSTEMS
2192-09197-000-000
J606 PC-COM4
Appendix A. Notes on Using the 16C550 UART
Enabling the Interrupt Outputs
If you intend to write your own low level UART handler, it is necessary to remember that in
order for the UART channel on the PC-COM4 to generate interrupts to the host CPU, you must
enable the IRQ output from the UART by setting bit 3 in the Modem Control Register (MRC).
Standard driver software (including that supplied on the library disk with the PC-COM4) will do
this as part of the port initialisation, so no action will be necessary if you are using Arcom’s
software or that of a 3rd. party vendor.
The Receiver FIFO Trigger Point and Timeout
The 16C550 has sixteen byte FIFO’s for both it’s transmit buffer and receive buffer. This can
enhance the performance of the serial ports and reduce the interrupt rate main processor.
However, it is necessary to set up the receive trigger point optically for your application.
With the FIFO enabled, any receive character is added to the 16 byte receive FIFO. This has
four programmable trigger points as shown in the following diagram:
12
14
13
10 11
15 16
T14
9
7 8
Rx
2
6
1
3
4
5
T8
T4
T1
IRQ
Once the FIFO has received sufficient characters to reach the FIFO trigger point, an interrupt
is generated that is serviced in order to remove all the characters from the FIFO.
If the stream stops adding characters to the FIFO before the trigger point is reached. For
example the trigger may set at eight when only six characters has been received. In this
situation the UART will generate an IRQ after specific timeout period from the end of the last
character received.
The timeout period, expressed in the number of characters can be calculated using the
following equation:
T=
(4 x n Char) + 12
(n Parity + n Char + n Stop +1)
Where:
n Char is the number of programmed bits per character (5, 6, 7 or 8)
n Parity is the number of programmed parity bits (1 unless no parity)
n Stop
The actual time for timeout is simply defined as :
is the number of stop bits (1 ,1 or 2)
t=
(4 x n Char) + 12
FBraud
Where
F Braud is the baud rate.
Page 12
CONTROL SYSTEMS
J606 PC-COM4
2192-09197-000-000
For example, communications at 9600 baud, 8 data bits, no parity and 1 stop bit would have
the following timeout period:
T=
(4 x 8) + 12 44 = 4.4 chars
0 + 8 + 1 + 1 10
t=
(4 x 8) + 12 = 4.58ms
9600
This timeout can significantly impact on the performance of the serial communications within
an application. If your serial communications is single character orientated, it is better to set the
FIFO trigger point lower and handle more frequent receive interrupts. If your application
transfers large blocks of data it is probably better to set the FIFO trigger point higher.
Remember that the FIFO trigger point does not define the size of the FIFO; characters are still
received after the trigger has been activated until all sixteen positions in the FIFO have been
Page 13
CONTROL SYSTEMS
2192-09197-000-000
J606 PC-COM4
Appendix B. Utility Disk
The utility disk supplied contains the excutable com4util. This program is intended to help
you check that the PC-COM4 board is functioning correctly following installation; instructions
are given in readme.txt. The data sheet for the UART is in the subdirectory data, in
st16554.pdf.
The source code com4util.c and project files are also supplied in this directory. It is
intended that some of the functions in the code will be of use in writing your own programs for
the PC-COM4. If you have Borland C++V4.52, create a directory on your hard drive called
pc_com4 and copy the entire contents of the disk into it. You will be able to run the
com4util.ide Intergrated Development Environment straight away. If you have another C
compiler, the source code may require translation by that compiler prior to recompilation, in
particular when using Microsoft C.
The header files stddefs.hand pcints.h are in the subdirectory inc. pcintscontains the
interrupt definitions and will be particularly useful.
Function Descriptions
The following functions are defined in com4util. c:
Void Init_Channel (int port, int rate)
- Initialises a channel given its base address and baud rate. The baud rate argument must be
in the format given on page 5-42 of the UART data sheet. Use the first column (1.8432 Mhz).
The function sets the serial format to 8 data bits, two stop bits and no parity. To set your own
format refer to page 5-49 of the UART data sheet.
void AssertRTS (int port)
- For use with channels A or B when set to RS422/485 mode. Call this function prior to
tranamitting on this channel.
Void DeAssertRTS (int port)
- For use with channels A or B when set to RS422/485 mode. Call this function when finished
transmitting on this channel.
Word serout (int port, char character)
- Transmits the byte argument down the port. The port must have been initialised first using
Init_Channel (). The most significant byte of the returned word contains the status bits
indicating any errors that occurred.
WORD serin (int port)
- Reads a charater in from the given port. The read-in character is returned in the LSB of the
word and status bits are returned in the MS. You may choose to call serin in a loop, e.g if
polling, but it will usually be better to call it when a receive interrupt has been generated, as in
this example program.
Page 14
CONTROL SYSTEMS
J606 PC-COM4
2192-09197-000-000
void interrupt ISR_SERRQ (void)
- The interrupt service routine. This one checks the interrupt flag register of each port, clears
the interrupt and sets the global interrupt flag. In this simple program, where only port is
receiving at a time (and where the default settings provide a different interrupt for each port) it
is sufficient only to know that an interrupt has occurred. In situations where it is unclear which
port generated the interrupt, this IRS will need to be modified.
Page 5-46 of the UART data sheet shows how to use the Interrupt Enable Register to set the
conditions for interrupt : for example, setting the board to generate an interrupt whenever a
character has been received, or when the receive FIFO has filled to a certain level, or a
character has been successfully transmitted.
Void far *Install (void interrupt (*faddr) ( ), int vect_num )
- Installs the given ISR onto the given interrupt vector
void DeInstall (void interrupt (*oldISR) ( ), int vect_num)
- Re-installs the old ISR.
Page 15
CONTROL SYSTEMS
2192-09197-000-000
J606 PC-COM4
Appendix C. Circuit Diagrams
Page 16
CONTROL SYSTEMS
J606 PC-COM4
2192-09197-000-000
Page 17
CONTROL SYSTEMS
2192-09197-000-000
J606 PC-COM4
Page 18
CONTROL SYSTEMS
J606 PC-COM4
2192-09197-000-000
Page 19
CONTROL SYSTEMS
2192-09197-000-000
J606 PC-COM4
Manual
PCB
V1 Iss 1
Comments
Manual first released in this format
Issue A
981110
Product Information
Fax-on-Demand System
Full information about other Arcom products is available via the
, (Telephone
WebSite
www.arcom.co.uk
or in the US at:
Numbers are listed below), or by contacting our
www.arcomcontrols.com
in the UK at:
Useful Contact Information
Customer Support
Sales
Tel:
Fax:
or for the US: E-mail
icpsales@arcomcontrols.com
Tel:
+44 (0)1223 412 428
+44 (0)1223 403 409
+44 (0)1223 411 200
+44 (0)1223 410 457
Fax:
E-mail: support@arcom.co.uk
E-mail sales@arcom.co.uk
United Kingdom
United States
France
Germany
Italy
Arcom Control Systems Ltd Arcom Control Systems Inc Arcom Control Systems
Kostenlose Infoline: Numero Verde:
Clifton Road
13510 South Oak Street
Kansas City MO 64145 USA 23 rue Colbert
Tel: 816 941 7025
Fax: 816 941 0343
FoD: 800 747 1097
Centre daffaires SCALDY Tel: 0130 824 511
Tel: 1677 90841
Fax: 1677 80841
Cambridge CB1 7EA, UK
Tel: 01223 411 200
Fax: 01223 410 457
FoD: 01223 240 600
Fax: 0130 824 512
7885 SAINT QUENTIN
FoD: 0130 860 449 FoD: 1678 73600
Cedex, FRANCE
Belgium
Netherlands
Tel: 0800 90 84 06
Fax: 0800 90 84 12
FoD: 0800 90 23 80
Groen Nummer:
Tel: 0800 7 3192
Fax: 0800 7 3191
Gratis 0800 Nummer:
Tel: 0800 0221136
Fax: 0800 0221148
Whilst Arcoms sales team is always available to assist you in making your decision, the final choice of boards or systems is solely
and wholly the responsibility of the buyer. Arcoms entire liability in respect of the boards or systems is as set out in Arcoms
standard terms and conditions of sale.
If you intend to write your own low level software, you can start with the source code on the disk which is supplied. This is example
code only to illustrate use on Arcoms products. It has not been commercially tested. No warranty is made in respect of this code
and Arcom shall incur no liability whatsoever or howsoever arising from any use made of the code.
© 1999 Arcom Control Systems Ltd
Arcom Control Systems is a subsidiary of Fairey Group Plc.
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 20
CONTROL SYSTEMS
相关型号:
©2020 ICPDF网 联系我们和版权申明