![Eletech DM2218C User Manual Download Page 4](http://html1.mh-extra.com/html/eletech/dm2218c/dm2218c_user-manual_2388133004.webp)
DM2218C / EM2218C User’s Manual - Page 4 of 8
Serial Interface
When the serial interface is enabled, all parallel inputs T1 ~ T8 are
disabled and all Parallel Modes are no longer applicable. But there
is a serial mode command to read the parallel inputs.
The serial interface consists of a female DB9 serial port supporting
the RS-232 communication protocol.
On the DB9 connector, only three pins are used: pin 2 for RX, pin 3
for TX, pin 5 for ground.
The hardware protocol is fixed at 9600 baud, eight data bits, no
parity and one stop bit (9600, 8N1). Other protocols may be sup-
ported by special request.
For RS-232 applications, the system (a DCE device) is connected
to a DTE device (such as a PC) with a regular serial cable (not a
null modem cable).
To enable the Serial Mode on the system, the configuration file
must contain a two-digit device ID ranging from “01” to “32”. This
ID assignment seems unnecessary but is required for possible fu-
ture expansion purposes.
The communication protocol uses software handshake on a per-
byte basis. That is, for every byte it receives, the system sends an
confirmation byte to the DTE. The DTE must not send the next byte
until it receives the confirmation (one exception explained below).
A communication session always starts with a selection process.
The DTE should first sends out an ASCII “A” which, as the only
exception, will not be acknowledged by the system. The DTE should
then sends a binary coded address byte ranging from 1 to 32. If
there is a system with the matching address, it will respond by
sending back an ASCII “a” within 100 ms. Otherwise the selection
process has failed and should be restarted.
Once the selection process is finished successfully, the DTE can
issue one of the serial commands, one byte at a time. For each
byte sent, the DTE should expect to receive a proper confirmation
within 100 ms. If the confirmation is missing or invalid, the whole
session must be aborted.
Testing the Serial Port
The serial port can be easily tested by using a Windows utility pro-
gram called “HyperTerminal”. HyperTerminal allows you to send
and receive data through the PC’s serial port. All you need to do is
type the letters on the keyboard to send them, and watch the screen
for received data.
The first step is to create a text file called “MODE.TXT” on the flash
card. Put only two letters in the file: 01. This will put the player into
the Serial mode of operation with a device ID #1. You may use
Windows Notepad or Wordpad to do it, just be sure to save the file
as “text only” and Windows will add “.TXT” automatically.
In addition to the MODE.TXT file, you also need to put a test sound
file on the flash card. For testing purpose, this sound file should be
called “001.WAV”.
The next step is to connect the player to the PC using a “straight
through” serial cable, not a “null modem” one. A straight through
cable has pin 2 connected to pin 2, pin 3 connected to pin 3, and
pin 5 connected to pin 5. Those are the only three pins we use.
Other pins, whether connected or not, do not matter.
Power up the player and run HyperTerminal on the PC. This pro-
gram is usually found under
Start>Programs>Accessories>Communications>HyperTerminal
Make a new connection on the COM port to which the player is
connected, with the following parameters:
Bits per second = 9600
Data bits = 8
Parity = None
Stop bits = 1
Flow control = None
Now we are ready to send the following commands to the player.
We Type
Player Responds
------------------------------------------------------
A
-
ALT/01
a
(see notes below)
F
f
0
0
0
0
1
1
At this point the player should start playing the test sound file, and
the test is considered successful.
Note that in order to type the device ID in the binary format on the
PC’s keyboard, you must hold down the ALT key while entering the
numbers on the numerical keypad (make sure the NUM light is
on). In this test, for example, we need to type device ID 01, so you
must hold the ALT key down, press “0”, “1” on the numeric keypad
(“0” first then “1”), then release the ALK key.
If you made a mistake and typed a wrong letter during the test, the
player will either respond with a letter ‘e’ (for error) or not respond
at all, depending on the situation. In this case, you need to re-type
the command from the very beginning.