0% found this document useful (0 votes)
51 views6 pages

MultiDrop Rs232

Uploaded by

sung quek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views6 pages

MultiDrop Rs232

Uploaded by

sung quek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Weeder Technologies WTMPI-M

eeder WTMPI-M
Technologies
90-A Beal Pkwy NW, Fort Walton Beach, FL 32548 www.weedtech.com 850-863-5723

Multi-Drop Peripheral Interface

FEATURES
Interface a third-party RS-232 peripheral with
the stackable data module's multi-drop bus.
DIP switch addressable; stack up to 32
modules (hence peripherals) on the same
RS-232 cable connected to a host PC.
Appended header character allows host to
communicate exclusively with each device.
Supports peripheral baud rates of 150, 300,
600, 1200, 1800, 2400, 4800 and 9600.
160-byte RAM buffer used for data transfers.
Supplies power to peripheral via DTR pin.
Industry standard RS-232 interfaces used to SPECIFICATIONS
connect to host and slave modules. Meets all
EIA/TIA-232E and V.28 specifications. Message Length 1 to 160 bytes

Wide power supply range (8 to 30 VDC). Data Format ASCII or Binary


Network Type CSMA/CD
DESCRIPTION Processor PIC16F628
Connects to the RS-232 serial port of a
Clock 4 MHz
computer peripheral such as a bar-code
scanner, weight scale, force-gauge, multi-meter, Communications 9600 Baud, N, 8, 1
etc., and allows multiple devices to share the
same communications cable connected to a PC. Peripheral Baud Rate 150, 300, 600, 1200,
A unique header character is automatically 1800, 2400, 4800 or
appended to the beginning of a peripheral's data 9600
stream as it is being transmitted to the host, Peripheral Parity Even, Odd or None
identifying its origin. This same header character
is used by the host to direct data to a particular Peripheral Data bits 4, 5, 6, 7 or 8
peripheral.
Peripheral Stop bits 1 or 2
All data from a peripheral is converted to the
Power Requirements +8 to +30 VDC
correct baud rate used in the stackable data
module network, and vice versa. In other words, Current Draw 15 to 27 mA, plus any
it is possible to have multiple devices plugged current out of DTR pin
into the same port of a PC even though they are
all using a different baud rate for Operating Temperature -20°C to +80°C
communications. Ideal for low cost, fast setup, Board Dimensions 3.1" x 2.0" x 0.7"
assembly line monitoring using off-the-shelf PC
hardware. Weight 1.8 oz

Copyright  2000 - 2016 by Weeder Technologies Page 1 Rev. G


Weeder Technologies WTMPI-M

TABLE 1: ADDRESS SETTING STACKABLE DATA MODULES


All modules in this series incorporate two
EIA/TIA-232E serial ports which communicate at
HEADER DIP SWITCH 9600 baud, no parity, 8 data bits and 1 stop bit.
CHARACTER SETTING DB9 connectors are jumpered to satisfy
ASCII (HEX) 1=on, 0=off hardware handshaking. The port labeled
1 2 3 4 5 ‘‘HOST’’ is configured as a DCE device and
A (41) 00000 should be connected to a PC’s serial port. The
port labeled ‘‘SLAVE’’ is a DTE device and can
B (42) 00001 be left open, or connected to another module’s
C (43) 00010 host port. Up to 32 modules can be chained
together in this fashion to form a network. Either
D (44) 00011 plugged together end to end, or separated by a
E (45) 00100 cable. Because a module contains two individual
bi-directional ports which pass data through, it
F (46) 00101 also acts as a repeater, extending the total
G (47) 00110 allowable length of the RS-232 communications
line.
H (48) 00111
A modem can serve as the host for remote
I (49) 01000 operation, but since a modem uses a DCE port,
J (4A) 01001 a ‘‘null modem’’ adapter must be placed
between the modem and the data module’s host
K (4B) 01010 port. A gender changer may also be required. In
L (4C) 01011 addition, any hardware/software flow control
must be disabled in the terminal program.
M (4D) 01100
Each module in a network should be set to a
N (4E) 01101 different address using the on-board 32-position
O (4F) 01110 DIP switch. A module will only respond to data
packets that begin with its’ own unique header
P (50) 01111 character, which is determined by this DIP
a (61) 10000 switch setting. See Table 1. Data packets
transmitted by a module will also begin with this
b (62) 10001 header character. The host PC can use the
c (63) 10010 header character to address each individual
module in a network, and to identify a module
d (64) 10011 which is talking.
e (65) 10100
f (66) 10101 COLLISION CONTENTION
g (67) 10110 The utilization of the communications line can be
thought of more as a single, bi-directional, data
h (68) 10111 bus, operated in a multi-drop mode rather then a
i (69) 11000 standard RS-232 data link. A transmission from
a data module travels in both directions,
j (6A) 11001 upstream to the host, and downstream to signal
k (6B) 11010 other modules that it has seized the line. Before
transmitting, a module will listen to the
l (6C) 11011 communications line and wait for quiescence.
m (6D) 11100 After a silent period equal to the length of one
byte, the waiting module will send its data packet
n (6E) 11101 using a Carrier Sense Multiple Access with
o (6F) 11110 Collision Detection communications protocol.
See the application note (AN100) at the back of
p (70) 11111 this manual for more details.

Copyright  2000 - 2016 by Weeder Technologies Page 2 Rev. G


Weeder Technologies WTMPI-M

TABLE 2: BAUD RATE JUMPERS COMMUNICATIONS RESTRICTIONS


As shown in Figure 1, there are a few
BAUD JUMPERS communication restrictions which must be
adhered to when transferring data to and from
the peripheral, and is listed below.
150 1
300 2 1. A data frame must not contain more then 160
bytes or characters.
600 1, 2
2. The data signal in a frame must be
1200 3 continuous with no more then 50 mark bits
1800 1, 3 between each data byte.

2400 2, 3 3. Time between frames transmitted by the


peripheral must be sufficient enough to allow
4800 none data to be transferred to the host at 9600 baud
9600 1, 2, 3 including any delays waiting for bus availability.
4. Time between frames transmitted by the host
BAUD RATES must be sufficient enough to allow data to be
transferred to the peripheral at the baud rate
Although the Stackable Data Module network is selected by the jumpers.
fixed at 9600 baud, the WTMPI supports various
baud rates which can be used when interfacing
to third-party devices which require a different OPERATION
communications speed. All transmissions from Use an RS-232 cable with DB9 connectors to
the host will be converted from 9600 baud to the hook the data module to a host PC. Connect a
required rate prior to sending to the peripheral. power source to the + and - terminals. Plug a
All transmissions from the peripheral will be peripheral device into the DB9 connector labeled
converted to 9600 baud. "PERIPH". Set the correct baud rate for the
Three jumpers on board the data module are peripheral using the jumpers on the data module
used to select the desired peripheral (see Table 2) and change the terminal program
communications rate as shown in Table 2. Keep to operate at 9600 baud rather then the
in mind that this jumper configuration is only peripheral's communications rate. Apply power
read at power up. If the jumpers are changed, to the data module and peripheral.
the new baud rate will not go into effect until Send data to the peripheral in the same manner
after power is cycled. To change the Parity, as usual except append the appropriate header
Data bits, or Stop bits, transmit a command character (see Table 1) to the beginning of each
string to the WTMPI containing the following: transmission. Any data received from the
“{Header}wtmpi-m,{parity},{databits},{stopbits}”. peripheral will also have this header character
These settings will remain even after power is appended to it which will have to be striped off
cycled. To read the current setting, transmit the by the terminal program before processing in the
command string “{Header}wtmpi-m”. normal fashion. The red LED on board the data
module will flash each time data is transferred.

FIGURE 1: DATA FRAMES

Data Frame Greater then Data Frame


160 Bytes time needed 160 Bytes
or less to re-transmit or less
data to host
0 to 50 or peripheral 0 to 50
Mark Mark
Bits Bits
Header Data Data Data Data Data Header Data Data Data
Character Byte Byte Byte Byte Byte Character Byte Byte Byte
Note 1 Note 1

Note 1: Header character is not present on data received from peripheral; this will be the first data byte of the frame.

Copyright  2000 - 2016 by Weeder Technologies Page 3 Rev. G


Weeder Technologies WTMPI-M

TABLE 3: TERMINAL / CONNECTOR DESCRIPTION


NAME TYPE ELECTRICAL SPECS COMMENTS:
RS-232 serial port configured as DCE.
HOST DB9 EIA/TIA-232E Standard Connects to host PC. Hardware handshake
(female)
jumpered.
RS-232 serial port configured as DTE. Can
SLAVE DB9 EIA/TIA-232E Standard be connected to another data module's
(male)
HOST port for networking.
Power Power source selection jumper. Selects
Jumper N/A
Source either external, or port powered. (Note 1)

+ Screw Term +8 to +30 VDC External unregulated power supply input.

- Screw Term GND External power supply ground.


TD = -9 VDC to +5 VDC RS-232 serial port configured as DTE.
PERIPH DB9 Connects to COM port of peripheral. DTR
(male)
RD = 5KΩ impedance
DTR tied to VIN+ pin can be used to supply power to device.
Note 1: Selecting "port powered" will draw from the power supply source of an upstream data module. Caution, the USB or COM
port of a PC or laptop does not supply enough current to serve as the power supply source.

DATA FLOW will take priority. For instance, if the peripheral


starts to transmit while the WTMPI is currently
Data is transferred to and from the peripheral in receiving a data frame from the host, the data
frames which can be up to 160 bytes long frame from the peripheral will be missed.
(see Figure 1). The data bytes that make up a
frame can be of any form, binary, ASCII,
extended ASCII, etc. CONTINUOUS DATA TRANSMISSION
When a data frame is transmitted from the Some peripherals report data readings to a PC
peripheral to the host, it is first captured and on a continuous bases without being instructed
stored in RAM. This is done by reading all bytes to or polled by the host. This is more common
until encountering a silent period greater than with equipment taking live measurements such
the length of 5 bytes. The header character is as weight, temperature, pressure, etc. In these
then added to the beginning of the frame, the cases, provided there is a 5-byte separation
baud rate set to 9600, and the contents of RAM between data packets, the WTMPI can still
is transferred on to the host using the standard process the data and transfer it on to the host
anti-collision techniques practiced in the even though the data structure may violate the
Stackable Data Module protocol. data frame restrictions as shown in Figure 1.

When a data frame is transmitted from the host This is done by continuing to monitor the
to the peripheral, the header character is peripheral data stream even while a current
examined first to see if it matches the DIP switch packet is being transmitted to the host. This
setting on the data module. If so, all data bytes allows the WTMPI to track the start and stop
are read and stored in RAM until encountering a positions of the data and be ready to pick back
silent period greater than the length of 5 bytes. up at the beginning of the next available frame,
The contents of RAM, excluding the header once it has been released from its current
character, will then be transferred on to the communications task. And since, in this case,
peripheral at the baud rate selected by the the data is live and somewhat repetitive, extra
jumpers. readings that do not fit the time slot available on
the multi-drop bus can simply be discarded
During any data frame reception from the without loosing critical data or information in the
peripheral or the host, the data which begins first process.

Copyright  2000 - 2016 by Weeder Technologies Page 4 Rev. G


Weeder Technologies WTMPI-M

Address Setting Trans/Rec Indicator LED


This DIP switch sets the Flashes whenever there is
address of the Data Module communications between
and determines the header host PC and Data Module.
character of its data packets.

SLAVE
RS-232 RS-232

HOST
Slave Port Host Port
Connects to Connects to
the Host port the serial
of another port of the
Data Module. host PC.

Baud Rate Jumpers


Selects the baud rate
which is used by the
peripheral device.

Power Source Jumper Power Supply Inputs RS-232 Peripheral Port


Draw power from external input Will accept any voltage Connects to the serial port
terminals, or from an upstream between 8 and 30 VDC. of a peripheral device.
Data Module via the host port.

0.5"
Holes will accept size 4-40 screws

1.0" 2.0"

0.5"

0.375" 2.35" 0.375"

3.1"

Copyright  2000 - 2016 by Weeder Technologies Page 5 Rev. G


Weeder Technologies WTMPI-M

Copyright  2000 - 2016 by Weeder Technologies Page 6 Rev. G

You might also like