Mobile Digital Datalink For Field Work Applications
Mobile 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
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
peripheral
= = )
rophone
to/from peripheral
435
appropriate load resistors on the input and output when the IC215 was connected to the audio cassette interface.
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
These can be chosen by the user to conform with whatever protocols are demanded by the peripheral devices in
use.
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
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
I Disable
interrupts
I tronsm3,ter Turn on
I
~ ~ o YesT IP2
bufferJ J counter I
No
No = I Send ETX
character to ACIA
t |
I
_
counter
I
buffer
Yes
TrY.
ish
[ Send ETX I
I clay
I Switch on
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
Semiconductor Products, Pheonix, AZ, USA 5 'Linear ICs' Semiconductor Data Library Vol 6, Series B, Motorola Semiconductor Products
438