Searching \ for '[PIC]: Modems' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Modems'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Modems'
2002\02\27@175714 by Tony Nixon

flavicon
picon face
Has anyone interfaced a PIC to a modem before?

Any pointers :-)

--
Best regards

Tony

mICros
http://www.bubblesoftonline.com
spam_OUTsalesTakeThisOuTspambubblesoftonline.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\02\27@194735 by Larry Williams

flavicon
face
Certainly! External only though. What you wanna know?

Tony Nixon wrote:
>
> Has anyone interfaced a PIC to a modem before?
>

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\02\27@194934 by Larry Williams

flavicon
face
Or do you mean a modem chip?

Tony Nixon wrote:
>
> Has anyone interfaced a PIC to a modem before?
>
> Any pointers :-)
>
> --
> Best regards
>
> Tony
>
> mICros
> http://www.bubblesoftonline.com
> .....salesKILLspamspam@spam@bubblesoftonline.com
>
> --
> http://www.piclist.com hint: The list server can filter out subtopics
> (like ads or off topics) for you. See http://www.piclist.com/#topics

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\02\28@123842 by Dale Botkin

flavicon
face
Yep, an external one. Toughest part is figuring out how to work with all
the different way the modem can choose not to work, and detect and reset
problems.  Not TOO tough, but can burn a lot of code space.

Dale
--
"Curiosity is the very basis of education and if you tell me that
curiosity killed the cat, I say only the cat died nobly."
         - Arnold Edinborough


On Thu, 28 Feb 2002, Tony Nixon wrote:

> Has anyone interfaced a PIC to a modem before?
>
> Any pointers :-)

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\02\28@133509 by Peter L. Peres

picon face
> Has anyone interfaced a PIC to a modem before?

I have interfaced a 16F84 to an external 28800 modem before ;-). I know
that this is a shortcut, but you did not mention which kind of modem ;-).

Peter

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\02\28@150046 by Barry Gershenfeld

picon face
Unless they have redesigned the modems yet again (and why not, eh?) you
may be able to put the modem into a known reset state by dropping DTR
for a short time.

Barry

>Yep, an external one. Toughest part is figuring out how to work with all
>the different way the modem can choose not to work, and detect and reset
>problems.  Not TOO tough, but can burn a lot of code space.
>
>Dale

>> Has anyone interfaced a PIC to a modem before?

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\02\28@152347 by Dale Botkin

flavicon
face
Sometimes, sometimes not.  Modem behavior when DTR drops is a configurable
option on most (maybe all) modern modems.  Options range from "ignore DTR"
to "hang up on DTR drop" to "auto-dial on DTR rise" to "reset on DTR
drop".  Most can be configured with AT commands, but some are DIP switch
selected.  And of course the Rockwell/Lucent/Hayes and USR command options
are totally different, so you have to either design for one and only one,
or figure out which you're talking to.

Dale
--
"Curiosity is the very basis of education and if you tell me that
curiosity killed the cat, I say only the cat died nobly."
         - Arnold Edinborough


On Thu, 28 Feb 2002, Barry Gershenfeld wrote:

> Unless they have redesigned the modems yet again (and why not, eh?) you
> may be able to put the modem into a known reset state by dropping DTR
> for a short time.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\02\28@163522 by Bob Ammerman

picon face
Some modems can even be preprogrammed and setup to automatically dial and
connect when DTR is raised. This makes for a particularly simple interface.

Bob Ammerman
RAm Systems

{Original Message removed}

2002\02\28@222413 by michael brown

flavicon
face
> Yep, an external one. Toughest part is figuring out how to work with all
> the different way the modem can choose not to work, and detect and reset
> problems.  Not TOO tough, but can burn a lot of code space.

Naw, it's easy!  You need to set the S register in the modem so that it does
a reset when DTR is dropped.

michael brown

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.



'[PIC]: Modems'
2002\03\01@092838 by Dale Botkin
flavicon
face
On Thu, 28 Feb 2002, michael brown wrote:

> > Yep, an external one. Toughest part is figuring out how to work with all
> > the different way the modem can choose not to work, and detect and reset
> > problems.  Not TOO tough, but can burn a lot of code space.
>
> Naw, it's easy!  You need to set the S register in the modem so that it does
> a reset when DTR is dropped.

Easy if the brand, model and command specifics of the modem are known
ahead of time, difficult if it's not.

Dale

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body


2002\03\01@134732 by Peter L. Peres

picon face
>Unless they have redesigned the modems yet again (and why not, eh?) you
>may be able to put the modem into a known reset state by dropping DTR
>for a short time.

Moreover, many modems have a ATSxx=xx command that sets the behavior on
reset so you can evade doing this with the PIC (you just send ATZ). As to
DTR dropping, it's best to use no handshake (!) to save pins on the PIC,
and deliberately select a low data rate so you don't have timing problems,
and use simplex only. As to reset, the best way is to cycle the modem
power (using a PIC pin). Never seen a modem that failed to reset on that
;-). And I reset the modem after every callout (it was callout not
callin) because the modem was not powered when not needed. Experiments
with dialing worked with this setup so it can be used. I used a PIC16C54
(not 54A ;-).

hope this helps,

Peter

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam.....mitvma.mit.edu with SET PICList DIGEST in the body


2002\03\03@214637 by Tony Nixon

flavicon
picon face
Hi all,

I noticed a reply or two for this problem, but they accidently got
deleted before i could reply - sorry :-)


Is this about as simple as it gets for modem comms?

  ATD 0123456 [enter]
-> CONNECT 19200

  [data] [----]
  ( 1 sec pause )
  +++ (Without 1 sec pause between escape codes)
  ( 1 sec pause )
-> OK (On-line command state)

  ATH0 [CR] (Disconnect the line)
-> OK

How does the modem know the baud rate of the PC or PIC at either end? Do
you have to send a dummy string so the modem can sync itself.


--
Best regards

Tony

mICros
http://www.bubblesoftonline.com
EraseMEsalesspam_OUTspamTakeThisOuTbubblesoftonline.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\03\03@220541 by David Duffy

flavicon
face
At 01:39 PM 04/03/2002 +1100, you wrote:
{Quote hidden}

I think it does it on the "AT" bit at the start. Did read about it somewhere...

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\03\03@225410 by 859-1?Q?Alexandre_Guimar=E3es?=

flavicon
face
> >Is this about as simple as it gets for modem comms?


   Yes.. Nice and easy. Just make sure you parse all possible answers from
your modem.

> >How does the modem know the baud rate of the PC or PIC at either end? Do
> >you have to send a dummy string so the modem can sync itself.
>
> I think it does it on the "AT" bit at the start. Did read about it
somewhere...

   Exactly... It does it on the "A" of the "AT" command. Very simple to
make and quite effective. Also remember that when the modem connects it
changes the UART baud rate depending on the configurations.

Best regards,
Alexandre Guimaraes

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\03\04@090655 by Olin Lathrop

face picon face
>    ATD 0123456 [enter]
> -> CONNECT 19200
>
>    [data] [----]
>    ( 1 sec pause )
>    +++ (Without 1 sec pause between escape codes)
>    ( 1 sec pause )
> -> OK (On-line command state)
>
>    ATH0 [CR] (Disconnect the line)
> -> OK
>
> How does the modem know the baud rate of the PC or PIC at either end? Do
> you have to send a dummy string so the modem can sync itself.

The CONNECT 19200 message is telling you the carrier speed negotiated with
the other modem, this is NOT the baud rate that either modem presents to its
serial port.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, olinspamspam_OUTembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\03\04@093046 by Michael Rigby-Jones

flavicon
face
{Quote hidden}

That totaly depends on the setting of one of the S registers AFAIK.  A
common FAQ with Win95 etc, is that the dial upnetowrking box reports a
connect speed of 115,000, which is obviously the port speed.

Mike

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\03\04@112854 by Dale Botkin

flavicon
face
On Mon, 4 Mar 2002, Olin Lathrop wrote:

> > -> CONNECT 19200
>
> The CONNECT 19200 message is telling you the carrier speed negotiated with
> the other modem, this is NOT the baud rate that either modem presents to its
> serial port.

Also selectable by commands on most modems.  You can have it report
either, but I think most do default to reporting the UART speed, not the
connect speed.

Dale

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\03\04@114244 by Herbert Graf

flavicon
face
Careful, this is dependant on the modem AND how you have set it up. For
example with my USR it will either display the UART speed or the actual
connect speed. On many modems the factory default is NOT to show the actual
connect speed but the modem-computer UART speed. TTYL

> {Original Message removed}

2002\03\04@120047 by Paul Hutchinson

flavicon
face
I missed the start of this thread but back in 1995 I designed an embedded
system (6811 based) that worked with all commercially available modems at
that time. So maybe I can help..

Assuming the modem is based on the Hayes Smartmodem (circa 1983). Then the
modem uses an internal auto-baud routine to determine the serial port speed
and parity. The auto-baud routine looks at the incoming "AT" and determines
speed and parity.

The "CONNECT" message response is usually controlled by the "S95" register.
A setting of "S95=0" should force the modem to report the actual connection
speed instead of the serial port speed. You need to watch out for the
"CONNECT" message because usually after the modem sends that response it
changes the baud of the serial line to the speed given in the message.

Paul

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\03\04@152350 by Peter L. Peres

picon face
> how modems sense DTE/DCE baud rate

You send at least one CR or space (0x32) character, with 1 character break
between them (pacing).

The minimum sequence is more like:

*power up*
ATZ
       OK              -> if not modem is dead
ATDT1234567
       CONNECT         -> or another string
<data>
       <data>
*drop DTR* or *power down*

If you use compression etc it is wise to wait after sending the last data
and before powering down.

The modem can be set not to report speed on CONNECT to ease parsing (using
an Tx code I don't remember). In general all the setup is done by other
means than with the micro (f.ex. connecting to a PC) so the micro does not
need to deal with it.

If you use no handshake you have to monitor CD or expect a line dropped
message in the incoming data from the modem (in case the line quits or the
other side quits).

Peter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\03\04@163401 by michael brown

flavicon
face
> > How does the modem know the baud rate of the PC or PIC at either end? Do
> > you have to send a dummy string so the modem can sync itself.
>
> The CONNECT 19200 message is telling you the carrier speed negotiated with
> the other modem, this is NOT the baud rate that either modem presents to
its
> serial port.

"Not necessarily" is closer to the truth.  This depends on a setting in an S
register.

michael brown

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\03\04@164644 by michael brown

flavicon
face
> That totaly depends on the setting of one of the S registers AFAIK.  A
> common FAQ with Win95 etc, is that the dial upnetowrking box reports a
> connect speed of 115,000, which is obviously the port speed.

This is controlled by yet another S register value to determine whether the
connect message should include the DTE speed or the carrier speed.

michael brown

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\03\04@171651 by Tony Nixon

flavicon
picon face
"Peter L. Peres" wrote:
>
> > how modems sense DTE/DCE baud rate
>
> You send at least one CR or space (0x32) character, with 1 character break
> between them (pacing).
>
> The minimum sequence is more like:
>
> *power up*
> ATZ
>         OK              -> if not modem is dead
> ATDT1234567
>         CONNECT         -> or another string
> <data>
>         <data>
> *drop DTR* or *power down*

I tried for what seemed ages to get some sort of response to my modem,
but all it does is echo back anything I send it and nothing else.

eg.

ATZ
       ATZ

ATD0123456
       ATD0123456


etc etc

All I am using is a simple terminal program.


--
Best regards

Tony

mICros
http://www.bubblesoftonline.com
RemoveMEsalesTakeThisOuTspambubblesoftonline.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\03\04@172645 by Mitch Miller

flavicon
face
How about AT&f0?  That should reset it to factory defaults.  Also, make
sure you wait 2-3 seconds, type +++, then wait for another 2-3 seconds,
and you should get an OK prompt.  The +++ puts the modem in command mode
when it's in data mode.

-- Mitch


On Tue, 5 Mar 2002, Tony Nixon wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\03\04@173849 by michael brown

flavicon
face
> I tried for what seemed ages to get some sort of response to my modem,
> but all it does is echo back anything I send it and nothing else.
>
> eg.
>
> ATZ
>         ATZ
>
> ATD0123456
>         ATD0123456
>
>
> etc etc
>
> All I am using is a simple terminal program.

Are you sending a carraige-return character when you hit the enter key and
not just a line-feed character?  Modems are picky about that stuff.

michael brown

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\03\04@173855 by Paul Hutchinson

flavicon
face
Send the modem an "ATQ0" to turn on result codes and an "ATE" if you want to
turn off echo.

If you want to see one of the worst power up states, turn off just the echo
and the modem will appear to be dead :-).

Paul

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\03\04@180325 by Tony Nixon

flavicon
picon face
michael brown wrote:
>
> Are you sending a carraige-return character when you hit the enter key and
> not just a line-feed character?  Modems are picky about that stuff.

That was it.

I added #13 to the end of the strings and got better responses.

--
Best regards

Tony

mICros
http://www.bubblesoftonline.com
TakeThisOuTsalesEraseMEspamspam_OUTbubblesoftonline.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\03\05@035845 by Alan B. Pearce

face picon face
>How about AT&f0?  That should reset it to factory defaults.  Also, make
>sure you wait 2-3 seconds, type +++, then wait for another 2-3 seconds,
>and you should get an OK prompt.  The +++ puts the modem in command mode
>when it's in data mode.

May not work. Some modems have DIP switches on them so you can set them up
using AT commands, and then by setting a DIP switch they go into "dumb"
mode, and do not respond to AT commands.

We used to use an Australian one from a company Net-something (cannot
remember the full name) for this very reason on a polled network. Because
any possible character string could be a valid data message we had to do
this. We would set up the remote ones in this manner, and then the master
one we dialled out from to do remote software support had some clever
software driver to make it jump through hoops without getting upset by the
character strings going past.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...