Eletech DM2218C User Manual Download Page 4

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.

Summary of Contents for DM2218C

Page 1: ...t to accept a 9 12 VDC supply voltage with jumper J3 at the 12V position If the supply voltage is 6 VDC move jumper J3 to the 6V position Speaker Output Terminals S1 S2 This is a 1 watt bridged balanc...

Page 2: ...because File 003 is missing The Sequential Trigger is prioritized from T1 the highest to T8 the lowest However it does not mean a higher priority input can interrupt a lower one It only means that if...

Page 3: ...ng of the script Use this command to turn it on if it has been turned off previously by the BF command END Always add the word END at the end of the entire script You may add any comments for your own...

Page 4: ...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...

Page 5: ...first before starting a new one Stop Playback DTE Sends S System Confirms s If the system is not playing paused it will simply ignore the com mand Otherwise it will terminate the current playback Paus...

Page 6: ...01tiger wav Note that if you want to store the maximum number of files 512 on a single flash card you should keep the filenames including the file number within 8 characters Any filename longer than 8...

Page 7: ...ODE TXT DS N001 F001 J888 N002 F002 J888 H888 J888 END Notes The system will stay in the H888 J888 endless loop for as long as the button is held down 4 Play only when the button is held down Intended...

Page 8: ...Application Examples Using Normally Closed Switches Sensors Normally closed switches and sensors are often used in security systems 1 Play when the switch sensor opens with no priorities Intended Ope...

Reviews: