Your IP is: 54.166.236.238

Home

V92/90 (56K) FAQ's

56K Speed Limits

AT Commands

S-Registers

RS-232 Info

Telecom Certs

Modem Testing Stds

Layout Guidelines

Surge Protection

Common Pitfalls

Modems and VoIP

xDLS Stuff

Glossary

Modem Consulting

Cool Stuff

 

 

 

 

Common Modem Design Pitfalls  

Floyd Kling 

(10/19/09)

 

GENERAL

 

Here is a list of common questions/pitfalls you may encounter when embedding a modem module.  This covers the communications with the modem and some hardware issues.  This is work in progress and I will try to update periodically.

Let me know what you think...  floydk@almcom.net

Disclaimer.  The information herein is intended for designers that are integrating embedded modems into their product.  Please use this prudently.  It is for your reference only, it is not gospel.  Embedded modem modules vary by design and manufacturer.  Always discuss any design or operational issues with your modem module supplier.

 

 

 
1.  The (in)famous Setup String and use of a NVRAM
 
Setup String:
By far, the most common problems I have encountered is related to the improper use of the setup string.  Modems are manufactured ready to function, meaning in most cases, you will have the best results by simply using the factory default AT commands and S-Registers.
 
I suggest the following: 
When originating or setting up for answer, always begin by setting the AT commands and S-Registers to known state...(factory defaults).... the &F <probably your most important command> will recall factory defaults... the &W and &W1 are recall registers you will not normally use but for good housekeeping you can clean them up also:
 

send:     AT&F&W&W1<cr>            ; sets all registers to factory default and stores to W0 and W1

waitfor:  OK<cr><lf>                    ; confirmation

send:     AT{your setup sting}<cr>    ;

Waitfor:   OK<cr><lf>                    ; confirmation

.......Begin your procedure... i.e. dial or wait for incoming call

Should I use the modem's on-board NVRAM?
NO - and why would you?  This goes hand in hand with the Setup String.  Some modems come with an on board NVRAM.  Primarily, it is for the convenience of your storing the setup string that may be recalled when you want to setup for dialing or answer... While attractive, it is an easy trap.   

Avoid using the modem's NVRAM for storing options

You really do not need (nor should) use the modem's NVRAM.  Better way is to store your modem setup strings in your host processor - you will have full control.  Simply load the setup strings when you begin and end every session... meaning, just before every dial, and after every disconnect or reset, when preparing to wait for an answer (incoming ring).  Your system will be more reliable<stable>.

 
Why...?, when you simply add your setup string without pre-setting to factory default first, you are assuming you know the previous settings of all the registers... NOT!!!
 
2.  Flow Control 
Determines the method of controlling the flow of data between the Local PC and the Local modem.

In most applications, the speed between the PC and the modem (DTE Speed) is different than actual connected speed between the modem (DCE Speed).  If the DCE speed is slower, (and usually is the case) the data will be sent into the modem faster than the modem can send it to the remote modem. In these cases, the Local Modem must tell the Local PC to stop sending data until the modems buffer can empty.  When the buffer is almost full, the modem will send an Xoff (or turn OFF CTS) telling the Local PC to stop sending data. When the local modems buffer is empty again, the local modem will then send an Xon (or turn ON CTS)

My suggestion: In most cases you should run your DTE, <port> speed to the modem at 57600bps or maybe 115200bps.  This will ensure you have optimized the throughput.  You MUST run proper flow control.

IMPORTANT: 

  • For binary data transfer, RTS/CTS flow control should be selected.  Why?, because binary data contains ALL CHARACTERS including Xon and Xoff as Data.  The modem cannot discern the difference Xon and Xoff flow controls and regular data   

  • Flow control is not used for direct mode connections - Direct mode is where the modem adjusts the DTE speed to the and DCE speed (speed between the modems)

&K0 Disables flow control.

&K3 Enables RTS/CTS flow control (default for data modes). Flow control is active in both sending and receiving directions <used in binary or ascii files>

&K4 Enables XON/XOFF flow control. Flow control is active in both sending and receiving directions.  <should be used only in ascii files.. NOT BINARY FILES>

&K5 Supports transparent XON/XOFF flow control.  Xon/Xoff characters sent from the system will be processed for flow control and also sent to the remote modem.  Flow control is active in both sending and receiving directions.

&K6 Enables both RTS/CTS and XON/XOFF flow control (default for fax modes).

3.  Reset Pin  
If your embedded modem has a reset pin available for your control, most times you do not need (nor should) tie anything to it.  Simply let the modem have it's own natural reset.  If you feel you must control reset for perhaps last ditch modem recovery, use an open collector transistor (or FET) to temporarily yank it to ground (this is assuming the reset is Neg True.. i.e. 0V=Reset)
 
Most resets pins handed to you will already have a pull up resistor with a cap that you will be over-riding.  It is a simple RC timing designed to function when power to the modem is cycled.  The cap causes the reset to slowly rise and release the modem from reset after all the registers in the modem have had a chance to settle.
 
If you do reset the modem with your control (transistor/FET) , wait 3-5 seconds after you release the pin before you assert the first AT command.  This will ensure the modem has entirely completed the reset process.  (You may use a SCHOTTKY diode in place of the transistor/FET, just make sure it is SCHOTTKY because of the low IR drop that Schottky's have.)
 
IMPORTANT, DO NOT drive the reset pin with an active pull up because you may override the design of the modem's proper reset.  Here is a safe and effective way to drive the reset.

 
4.  Power Supply 
Needless to say, it is important that you always have a well filtered and quiet power supply for the modem. 
 
Most modem IC's supplied by the primary Modem IC manufacturers (Conexant, Lucent, etc) are actually a 3.3V device.  When embedded modem manufacturers offer a 5v modem, it is either using the older 5V modem IC's or they may use an LDO (Low Dropout Regulator) on the modem PCB allowing a range of voltages.  This means the Vcc input to the modem PCB can be greater than the 3.3V needed for the IC.  "That's dangerous to the 3.3v IC's I/O!" you might say... not to worry, the I/O of the modem chips are TTL compatible and 5V tolerant to maintain compatibility with existing 5V systems.
I mention this because by using a small, low cost (appx $.19 @ 1k) LDO on your mother board, you can have the best of all worlds in modem control and modem reset management.
 
Simply install an LDO with "Shutdown" pin on your mother board and you can turn power on and off to the modem at your needs.  This will serve two purposes.
1.  This is a very nice way to ensure the modem is completely reset if you ever feel it is hung up (Just make sure you wait 3-5 seconds after turning power on to the modem before asserting any AT commands)
 
2.  You can shut power off the modem any time to save power.  Very helpful in battery operated systems. 
 
Now this is Great for Originate only systems, but what do you do on systems that will also answer an incoming ring..... not to worry.  Radicom Research (www.radi.com) has embedded modems that have a 2nd ring detect aka 2RD that reports a ring with 0 power applied to the modem...  This saves battery life in systems that need to answer an incoming RING with 0<zero> current drain... very very cool! 
Contact me floydk@almcom.netif you need to know more about this unique feature.
Here is a nice LDO that is available from Digikey.
www.zetex.com  Part number:  ZXCL330
5.  Quick word about Asynchronous and Synchronous
If your not sure of the differences, your application is ASYNCHRONOUS and you don't need to worry about anything Synchronous... her are some bullets (I'll try to make this painless as possible)
  • Almost all dial-up modems you ever deal with are ASYNCHRONOUS
  • Synchronous modems need CLOCK PINS for Transmit and Receive data, Asynchronous does not
  • Internet data access modems are Asynchronous
  • Asynchronous characters are comprised of 8 data bits (usually) with a single start bit and a single stop bit (usually).  Synchronous data has all the characters crunched together with no start/stop bits (synchronous uses headers and footers to bracket a block of data).
  • Synchronous modems cannot plug into a standard serial port - especially the average serial ports on your PC.  You would need a special card which is not too common.
  • Embedded modems are almost always ASYNCHRONOUS

So the bottom line, if you are reading this site for your modem help... FORGET ABOUT SYNCHRONOUS

Having said all that, if you have a Synchronous question, send me an floydk@almcom.net and I will try to help you (no guarantees, but I will try).   I just don't want to spend too much time on this here.  (Hope you understand)

6.  What i/o pins do I really need to use?
There are 8 pins that Dial-up Asynchronous modems and modem modules usually have available... some needed, some arguably useless.  The decision on which pins you need can only be answered after you assess your requirements.
Required for any and all applications
TXD - Transmit Data - Required  (To Modem)
RXD - Receive Data - Required  (From Modem)
VCC - Power - Required
Ground - Ground - Required
 
Required for BINARY data Flow Control
RTS - Request To Send (To Modem)
CTS - Clear To send (From Modem)
(ASCII Flow control can use either XON/XOFF or RTS/CTS)
Usually not needed in most applications
DCD -Data Carrier Detect (From Modem)  <aka-CD, CXD and CXR>
DTR - Data Terminal Ready (To Modem) 
RI - Ring Indicate (From Modem)
If you do not use DTR, ensure it is properly terminated or set the correct option (see &Dn command)
 
Useless (IMHO)
DSR - Data Set Ready (From Modem)
DSR had a purpose many years ago when they first started using modems, but practically speaking, DSR does not supply any useful information in modern dial-up async modems.  When it was first defined it was an indication there was a "data path to the phone line". For the most part, unless your application is screaming for the need to use this information, ignore this pin.

I have worked with several different applications that use only TXD and RXD.  These were Async apps that transferred data in ASCII format.  If you need binary transfer and/or loads of data, the minimum I/O will be TXD, RXD, RTS and CTS.   If you are positive you are going to use ASCII only, you can get away with using only TXD and RXD

NOTE TO YOUR HOST PCB LAYOUT:  Play close attention to the direction of the signals ('To Modem' and 'From Modem')  This is a signal direction indicator with reference for the modem.  Most layout errors come on the direction of the TXD and RXD pins.  This is because some processors, confuse the definition.  So just look at the To/From assignments above and you should be OK.

  • Unused output pins (From Modem) can be left NC <no connection>
  • Unused input pins, (To Modem) assuming the I/O is negative true<most embedded products are neg true, should be tied to ground - if your unsure if you will ever use these input pins, and you want to be safe, tie unused input pins to ground via a 100ohm resistor.  That way you will have it available without making a mess of your artwork if you want to wire in a signal later.

 

7.  Are <Embedded Modems'> telephone connection Certifications "Transferable"? 

 

Now this is a good question.  Read this

Can Embedded Modems Obtain Global Telecom Certification?

 

8. Should we use female receptacles or solder the modem to the PCB?

If your only going to ship to the US and Canada you can use either.  It becomes dicey on International rules, and again it will boil down to a county by country ruling.  At the time of this writing, I can only suggest you have your design accept either method.  I know this may be difficult especially in the designs that are very tight in space.

Japan (JATE), for instance, has clearly stated you must use receptacles.  Some countries in So. Africa also require receptacles. (If you do you use a receptacle, make sure to keep a facility to strap the modem down, like a tie wrap or something like that.  More on this later...

9.  How to use a Dialup modem in a 2W Leased Line Application.

10. RFI/HFI is causing high BER and slowing throughput

If your running with Error Correction enabled (which you should be in most cases), the slow throughput is directly related to the high BER.. (Bit Error Rate).  You will not see the errors because the modem is retransmitting these (bad) blocks of data, therefore causing the slow throughput.

Try using two Ferrite inductors.  One in series with TIP and another in series with RING.  Try using the TDK MMZ1608A252B.  (about $.025 in 1k at Digi-Key) This should especially help if you are using the more modern electronic DAA's... would not hurt if your using a transformer DAA either.

You might also look for a 'common mode choke' which is also very good in filtering out the RFI/HFI from entering into the DAA.

11. 
 
12. 
 
13. 
 
14. 

 

 

 

Copyright © 1997-2011 Floyd Kling 
- All Rights Reserved -