Shop OBEX P1 Docs P2 Docs Learn Events
NetCallerID serial interface — Parallax Forums

NetCallerID serial interface

pvalladapvallada Posts: 6
edited 2005-05-19 22:11 in BASIC Stamp
Hi,
I am trying to interface a NetCallerID from (UGOTCALL) to my BasicStamp 2. The NetCallerID has a serial port cable that can be connected to the computer. When the phone rings it sends the caller ID infor via the serial port. I can see the data being sent in hyperterminal. However, when I connect it to my Stamp, my SERIN instruction does not detect anything. I have tested my program by sending the same data the NetCallerID sends from a hyperterminal and my program can decode the phone number fine. I suspect I have a HW interface issue. Does anyone know how to interface with the NetCallerID? I made a DB9 connector that ties pins 1,4 and 6 together. Pins 7 and 8 are also tied together.This is the basic connector from the Basic Stamp II manual. This same connector is the one I am using when I send the data from hyperterminal to the Stamp and it works fine.

Thank you very much for your help
Pedro Valladares

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-08 03:54
    The SERIN instruction in the manual shows how to put a 22K resistor inline where you would normally use a MAX232-type circuit. Or, you could do that (see our RS-232 AppMod instructions for a schematic).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • OrionOrion Posts: 236
    edited 2005-05-08 07:29
    Just the device I was looking for. I ordered one on ebay today for < $13.00!
  • GadgetmanGadgetman Posts: 2,436
    edited 2005-05-08 09:44
    Are you using the DB9 connector on your programming board?

    Please note that you'll need to switch the pins around to make it work.

    This is because everyting needs to be either a 'master' or a 'slave' (DTE or DCE. Can't remember wich was which)
    and all units are wired like one or the other.
    your PC is wired as a master, but the programming board, the CallerID unit, modems and all kinds of other stuff is wired as slaves.
    to make two 'slave' units work together you'll needs to switch around a couple of pins.

    Assuming a 9pin connector in both ends:
    BS2     CallID
    2 ------ 3
    3 ------ 2
    5 ------ 5
    
    



    If it needs any hardware Handshaking, you will likely have use this:
    BS2     CallID
    2 ------ 3
    3 ------ 2
    7 ------ 8
    8 ------ 7
    6 -+--- 4
    1 -/
    
    4 ---+- 6
          \- 1
    5 ------ 5
    
    
  • pvalladapvallada Posts: 6
    edited 2005-05-08 12:27
    Thanks to all for your replies,
    I do have a 22k resistor going into P0. I can connect a serial cable from my PC port into my db9 and I get the right data into the stamp. I can decode it and all. The problem arises when I try to connect the NetCallerID the same way. I did switch the Rx and Tx lines around (pins 2 and 3), but I still cannot get the data to flow. I am not using any kind of flow control. Maybe I should try the MAX232 solution as suggested. Where exactly do I find the App note for that?

    Thanks again!
    Pedro
  • GadgetmanGadgetman Posts: 2,436
    edited 2005-05-08 13:10
    When you use the 22K resistor trick, do you use normal or inversed signalling in the SERIN command?
    (you need to use inversed levels if using the resistor)
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-08 13:37
    RS-232 DCE AppMod docs: http://www.parallax.com/dl/docs/prod/appmod/Rs232.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • pvalladapvallada Posts: 6
    edited 2005-05-08 17:16
    Guys, thanks again
    Here's the SERIN line I am using..

    SERIN 0,16572,[noparse][[/noparse]WAIT ("NMBR"),STR serString\10]
    DEBUG "Received #: " ,STR serString\10,CR

    This is setup to receive at 4800, 8,N,1 using the inverted baud rate. As I mentioned before, this works fine when I send the string from the PC using a terminal program. I just ordered a couple of MAX232 chips and will give that a try. In the meantime, I am going to write a little app for my PC that can take the serial data from the NetCallerID and forward it to another serial port that will be connnected to the STAMP. That way at least I can test the rest of the code and circuit.

    Regards,

    Pedro
  • pvalladapvallada Posts: 6
    edited 2005-05-08 17:20
    Jon,
    Is the ADM1181 equivalent to the MAX232 chip?
    thanks
    Pedro
  • ForrestForrest Posts: 1,341
    edited 2005-05-08 17:47
    According to the data sheet on the ADM1181 at www.parallax.com/detail.asp?product_id=29120 it's an upgrade to the MAX232 because it allows data speeds up to 230kbps. According to www.maxim-ic.com/quick_view2.cfm/qv_pk/1798 the MAX232 goes up to 120kbps and the MAX232A goes up to 200 kbps.

    There's one other important difference between the two versions of the MAX232 chips - they use different charge pump capacitors. The Analog Device's ADM1181 and Maxim's MAX232A require (4) 0.1 uF caps, while Maxim's MAX232 and TI's MAX232 require (4) 1uF caps.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-08 20:36
    ... and 0.1 uF caps are easier to come by.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • OrionOrion Posts: 236
    edited 2005-05-19 22:11
    I just got mine and hooked it up to my scope. This device is defiantly stealing power from the pc to drive its serial comm. Will the max232 or similar ic work properly with such a device?
Sign In or Register to comment.