Vous êtes sur la page 1sur 4

Mobi, le digital datalink for field work applications

A flexible data c o m m u n i c a t i o n s link based on the Motorola D2 e v a l u a t i o n kit and l o w - p o w e r t r a n s c e i v e r s is described by P a t T w o m e y a n d C o l i n O'Sullivan
A data communications system has been designed to link mobile field instruments with digital I / 0 to a central computer or data logger. Commercially available VHF transceivers are used. The system is designed to be sufficiently flexible to provide for either parallel or serial devices and to allow the user to select whatever end-of-text characters (or number o f characters o f text) are demanded by the protocols o f the field instrument and the computer.
microsystems field datalink

OVERALL SYSTEM CONFIGURATION


The overall system configuration is summarized in Figure I and the pattern of dataflow is shown in Figure 2. The audio cassette interface of the MEK6800D2 kit 2 is connected to the transceiver as shown. A second asynchronous communications interface adapter (ACIA2), installed in the wirewrap area of the D2 kits [see below), is used to interface with peripheral serial devices ~eg terminals, data loggers or computer). Parallel peripheral devices are connected to the peripheral interface adapter IPIA) of the D2 kits. Data can be read by the microprocessor from either a parallel device (via part A of the PIA) or a serial device (via ACIA2). This data may be echoed back to the serial device if desired. The transceiver is normally in receive mode, but on detecting activity at either the parallel or serial inputs it is switched to transmit mode. After an appropriate delay to allow the carrier to stabilize, a startof-text character [ASCII character STX) is sent to the transceiver, via the audio cassette interface, and is followed by the data. When the microprocessor recognizes an end-oftext character at an input it sends the ASCII character ETX to the transceiver. After a further appropriate delay the microprocessor switches off the carrier signal and leaves the transceiver once again in receive mode. When data is received at the transceiver this is decoded at the audio cassette interface and the microprocessor waits for the STX character to indicate valid data. The STX character is stripped and all subsequent characters are sent to any serial device [via ACIA2) and/or any parallel device Ivia PIA part B) which happens to be connected. When the ETX character is encountered by the microprocessor, it is replaced by whatever end-of-text characterIs) have been chosen by the user. Different end-of-text characters can be selected for the serial and parallel devices.

We have described elsewhere 1 the use of VHF transceivers to transmit information signals from a remote location to a central station. The system to be described here was designed to replace that system with a more flexible arrangement. They system developed has been used for the storage and on line processing at a central mainframe of data transmitted in ASCII code from various field instruments and for the transmission of instructions to field instruments from the mainframe. It has also been used as a link for a mobile terminal to the central mainframe to provide computer facilities ~eg information retrieval or data processing) in the field. The requirements of our applications demanded that we develop a single-channel transceiver system which would be nontransmitting most of the time. While the conversion of serial digital information to audio frequency shift keying signals suitable for driving the microphone input of a transceiver is easily achieved, this information is seriously distorted when the transmitter carrier is being switched on or off. To overcome this difficulty it was necessary to build in sufficient delay between switching on the carrier and the transmission of valid data [storing the input data in the meantime) the termination of valid data and switching off the carrier To provide acceptable reliability in this regard, it was also necessary to indicate the existence of valid data by preceding and terminating each data stream by specific start-of-text and end-of-text characters. Since the data transmission rates required in our applications are not very high, all our requirements can be satisfied by using MEK6800D2 evaluation kits with only minimal hardware modifications. These MP6800-based kits incorporate an audio cassette interface using the Kansas City standard 2 operating at 300 baud. This interface is capable of driving the microphone input of the IC215 transceivers 3 used and of decoding the loudspeaker output of the transceivers. The filtering circuit in the microphone amplifier of the IC215 provides the signal conditioning necessary for reliable operation.
Physics Department, University College, Cork, Ireland

receiver

][receiver I I...... I r ......... I


]
PI A(B) (8006) f ~ I data Parallel to I
peripheral

Figure I. Overall system configuration r


Prllel data from Serial
~

peripheral

II ..... PIA(A) (8004)

= = )
rophone

to/from peripheral

I Audio i IC215 I cassette ' transceiver I interface[ [ MEKGBOOD2evaluation kit J

Figure 2. Dataflow pattern

vol 7 no 9 november 1983

0141-9331/83/090435-04 $03.00 1983 Butterworth & Co [Publishers) Ltd

435

To U20, pins 33523130292827262521 .562337

appropriate load resistors on the input and output when the IC215 was connected to the audio cassette interface.

2221 201918 17 16 15 14 I Ii 2 5 4 5 6 7 8 9 I011

M ICROPROCESSOR

PROG RAM

Before starting the program the user must enter (at specific locations in the D2 kit user RAM) the ASCII codes adopted as end-of-text characters for
,

Output

data

;Q~. 27 kQ f-12"-V

MCI489

Input data

serial input parallel input serial output parallel output

Figure 3. Additional circuitry for a serial R5232 interface

These can be chosen by the user to conform with whatever protocols are demanded by the peripheral devices in
use.

HARDWARE ADDITIONS MODI FICATIONS

AND

As explained above it was necessary to install an ACIA (MC6850) 4 in the wirewrap area of each D2 kit. The interconnections involved are shown in Figure 3, the ACIA occupying locations 8010 and 8011 in the D2 memory map. In addition, TTL-to-RS232 converters [MC1488 and MC1489) s were connected in the transmit and receive lines of this ACIA to interface the system to the serial devices used in our application. One minor hardware modification had to be made to the D2 kits used. This arose because the audio cassette interface of the kits employs two stop bits while all the peripheral devices in our applications employed only one stop bit at 300 baud. A very simple modification, shown in Figure 4, enables either one or two stop bits to be selected. This involves cutting the PCB track connected to pin 3 of the audio cassette interface ACIA (U23) (see Figure A3-b of the MEK6800D2 evaluation kit manual 2 ) and inserting a switch as shown. When this switch is in the position shown in the diagram the interface provides for one stop bit. The other position represents the original configuration. Figure 4 also shows how the D2 kit switches the transmitter on and off. The push-to-talk switch (pins 2 and 4 of J2 in the schematic diagram shown in the IC215 manual 3 ) of the hand-held microphone of the IC215 is replaced by a single transistor. The base of the transistor is connected as shown to the ready-to-send [RTS) output (pin 5) of U23. With the IC215 transceiver it was also necessary to insert
I I i

t
U23 MC6850
A C I A (8008) 6 4

5 2

l
I I

3 r--~7 i__.~o I
L'___3

push-to-talk switch of transceiver o

To

i I

Figure 4. Hardware modification to the MEK6800D2 to provide for one or two stop bits. The switch is shown in the posit/on for one stop bit. (The part o f the diagram to the left o f the broken line is Figure A3-b in the MEK6800D2 evaluation kit manual 2. NCL denotes the number o f characters per line.)

A further location in the same RAM is reserved for a code to indicate the number of characters in any block of text. This feature allows for transmission of data in blocks of known size (eg records of 80 characters each) where the input data is not terminated by an end-of-text character. Finally, a sixth location is used to enable the input data to be echoed back to the serial device if this is desired (00 denotes 'no echo'). Identical programs are contained in PROM in both D2 kits. The function of the program is summarized in the flow diagram in Figure 5. The system is initialized by starting one of the D2 kits in the receive sequence and the other in the transmit sequence. The D2 kit in the transmit sequence sets up the ACIAs and PIA. A memory buffer is created to hold 16 characters and this buffer is initially filled with the ASCII character DE L (7 F)in the first 15 locations and the ASCII character STX (02) in the last location. The parallel and serial inputs are monitored and when a character is detected at either of these inputs the IC215 is switched to transmit (RTS-+high). The first character in the buffer (namely DEL) is transmitted and is replaced in the buffer by the input character. When a second input character is detected the second character in the buffer is transmitted and is in turn replaced in the buffer by the new input character and so on. Thus the first 15 characters transmitted are all DEL. This provides more than enough delay to allow the transmitted to be fully switched on. It also ensures (because of the bit structure of the DEL character) that there is no possibility of the receiver ACIA becoming locked into a framing error pattern. On receiving the sixteenth character at the input the character STX is transmitted. This is followed by all the data characters in the sequence in which they were detected at the input. After an end-of-text character has been encountered, or the preset number of characters per text have been received, no further data is placed in the buffer memory. The remainder of the data in the buffer is transmitted followed by the ASCII character ETX (03) which replaces an end-oftext character. After a further delay of 0.1 s the transceiver is switched back to receive mode and the program goes into the receive sequence. In the receive sequence the ACIAs and PIA are set up again and any signals received from the transceiver are ignored until the character STX is encountered. All subsequent data is sent simultaneously to the ACIA2 and the PIA, and hence to any attached peripheral devices, until an ETX character is received. When ETX is encountered the termination of data is indicated by sending to each peripheral device whatever end-of-text character has been selected by the user. The program then reverts to the transmit sequence and waits for activity at one of the inputs.

436

microprocessors and microsystems

I Disable

interrupts

Set up ACIAs7 and PIA J Set upleod-in J charoc,ers J


i INCL Setup counter] I
= IP

No I Disable interrupts I I Set up AClAs and PIA INo = ]IPI ~ / No ~Yes

I tronsm3,ter Turn on
I

Transmitbuffer 1 character and replace

Turn on [ transmitter ] Y. s~End-of-fext. Transmit buffer character and rap ace

~ ~ o YesT IP2

j End-of-rext ~Ye,. Y ~ R e s e t ~characterJ

bufferJ J counter I

No

No = I Send ETX
character to ACIA
t |

I
_

counter
I

buffer

Yes

Sendcharacter 1 toACIAand PIA [

Transmit character I and replacewith J end-of-text character


f

I character Send ETX to PIA I Delay

TrY.

Transmit next character

ish
[ Send ETX I

I clay
I Switch on

Figure 5. Flow diagram of the microprocessor program

vol 7 no 9 november 1983

437

CONCLUSION
The system has been used as a communications link between a VAX-11 computer and a terminal a data logger at remote locations

limitations of the transceiver bandwidth, a high-speed modem chip can be used in place of the audio cassette interface. The clock signals required for this are already available in the D2 kit.

REFERENCES
1 Murphy, J A, O'Sullivan, C T and Twomey, P W 'The use of inexpensive transceivers for time coincidence experiments with baselines up to 10 kilometers' Nuc/. Instrum. Methods Vol 171 (1980) pp 101--105
2 MEK6800D2 evaluation hit II manual Motorola Semi-

It has operated successfully over distances of several kilometres. It appears that any transceiver with standard microphone input and external loudspeaker output can be used instead of the IC215, provided that its microphone amplifier filtering circuit is adequate. No interference between the microprocessor systems and the transceivers was experienced. The metal casing of the IC215 may have helped in this regard. The system was designed for transmission of ASCI I-coded data. The facility to transmit data in blocks of fixed size, however, would allow any 8-bit word to be treated as data, thus providing some code transparency in this mode. In our applications, data transmission rates of 300 baud I~roved acceptable. If higher rates are required, within the

conductor Products, Austin, TX, USA


3 IC215 portable 2 metre FM transceiver manual Inoue

Communications Equipment, Osaka, Japan


4 M6800 microcomputer system design data Motorola

Semiconductor Products, Pheonix, AZ, USA 5 'Linear ICs' Semiconductor Data Library Vol 6, Series B, Motorola Semiconductor Products

438

microprocessors and microsystems

Vous aimerez peut-être aussi