Shop OBEX P1 Docs P2 Docs Learn Events
virtual modem question — Parallax Forums

virtual modem question

mgtamgta Posts: 2
edited 2005-01-26 06:53 in General Discussion
HI everyone,

I've bee playing with SX microcontrollers for a couple of weeks and I have a question I haven't been able to find a answer to. Is it possible to virtualize a 9600, or higher, baud modem? If so, how? Thanks for any help.

Comments

  • kjennejohnkjennejohn Posts: 171
    edited 2005-01-22 08:59
    Why roll your own modem when you can get them complete for $15 on Ebay? The following is a link to an article about mating an embedded processor to an inexpensive modem:

    http://www.downtowninternet.com/elproducts/modemappnote.pdf

    This article talks about using a PIC, but its a simple matter to connect the serial port (USART or bitbanger) of most any embedded processor to a serial modem. You can realize port speeds of 115k, easy. Use a virtual serial port (USART) to send AT commands (ASCII characters) and data· to the modem. You can even·use handshake and control lines to monitor conditions of phone calls and carrier presence. This article even has a limited discussion on sending out prerecorded messages or music.

    kenjj
  • mgtamgta Posts: 2
    edited 2005-01-22 09:25
    > Why roll your own modem when you can get them complete for $15 on Ebay?

    If you can virtualize it in software it makes the hardware less complex. Also part of the fun of experimenting with microcontrollers is doing everything yourself.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-01-22 17:15
    I am certain that it possible. I'm pretty sure modems use·Frequency Shift Keying (FSK)·to transmit data over phone lines. http://www.parallax.com/sx/downloads.asp·has some example code for FSK. And to dial a number DTMF is used, there is some sample code (at least to receive DTMF) on the page as well. You'll have to isolate the phone plug connector, because the line can have 50V on it at times. You'll also need to search around for the exact format for modem communications. But the SX has more than enough horsepower to do 9600 baud modem communications.

    Paul
  • James NewtonJames Newton Posts: 329
    edited 2005-01-22 18:35
    http://www.sxlist.com/techref/ubicom/lib/io/dev/modem/index.htm has all the known code for doing that. In fact, sxlist.com has all the known code for doing ANYTHING with an SX.

    Doesn't it?

    Prove me wrong! <GRIN>

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ---
    James Newton, Host of SXList.com
    james@sxlist.com 1-619-652-0593 fax:1-208-279-8767
    SX FAQ / Code / Tutorials / Documentation:
    http://www.sxlist.com Pick faster!



  • kjennejohnkjennejohn Posts: 171
    edited 2005-01-22 20:20
    Nothing stops you from EXPERIMENTING with using an SX as a modem. Hooking two PCs together with two SXs running as virtual modems as an educational exercise is great.
    However, if you plan to use this in a real world situation as a daily application, then things get VERY differnt. If you read the article I mentioned you'll see that you have to connect your project to the phone lines through an FCC approved interface. Failure to do so can lead to fines of $10,000 a day and/or jail time. The article also points you to a company that sells a product that is an approved interface for $40, as of the article's original writing.

    Even a cheap modem give you the DTMF tone genrator, a carrier detect signal (and others), and an established control system to take advantage of.
    Hey, I just don't want to see anyone get slammed by big brother.

    Have fun.

    kenjj
  • dkemppaidkemppai Posts: 315
    edited 2005-01-23 01:58
    James Newton said...
    http://www.sxlist.com/techref/ubicom/lib/io/dev/modem/index.htm has all the known code for doing that. In fact, sxlist.com has all the known code for doing ANYTHING with an SX.

    Doesn't it?

    Prove me wrong! <GRIN>

    uhhh, couldn't find code for a 1+ mbps IR data link...·· ...had to write that on my own. ·smilewinkgrin.gif

    -Dan
    ·
  • James NewtonJames Newton Posts: 329
    edited 2005-01-23 05:24
    dkemppai said...
    uhhh, couldn't find code for a 1+ mbps IR data link...·· ...had to write that on my own. ·smilewinkgrin.gif
    Pant, pant...

    I don't suppose that code could be open source? Willing to share?


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ---
    James Newton, Host of SXList.com
    james@sxlist.com 1-619-652-0593 fax:1-208-279-8767
    SX FAQ / Code / Tutorials / Documentation:
    http://www.sxlist.com Pick faster!



  • StephenStephen Posts: 53
    edited 2005-01-26 06:53
    FSK stuff is not too hard, but anything above 2400 is not FSK, but PSK. It's much harder to decode, as the algorithms are best suited to a DSP. Another problem is that modems generally need to support fallbacks, so support for any higher speed would mean also including support for the lower fallback speeds as well. There's simply not enough code to do it...
Sign In or Register to comment.