Shop OBEX P1 Docs P2 Docs Learn Events
serial to ttl — Parallax Forums

serial to ttl

ArchiverArchiver Posts: 46,084
edited 2003-05-31 14:16 in General Discussion
I am trying to interface a Stamp's SEROUT to an OOPIC. Is there a
simple solution to invert the signal and to ttl voltage levels.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-05-31 13:32
    There are two ways to go. If you have an RS232 port, you can usually
    (usually) get away with driving the RS232 port's receive pin directly
    from a Stamp. This is out of the RS232 spec but it usually works. If it
    doesn't work, you can't blame anyone because it isn't supposed to work,
    but it usually works.

    The trick is connecting the RS232 transmitter to the Stamp. Put a 22K
    resistor in series between the RS232 transmitter and the Stamp's receive
    pin. When the Stamp "sees" a voltage over 5V, the internal protection
    diodes will turn on clamping the input pin to about 5.7V. The So a 12V
    input through the 22K resistor will result in (12-5.7)/22000 which is
    not enough current to blow the protection diodes.

    Then you have to set the Stamp to use a non-inverted baud mode. This is
    kind of a hack. It is not as noise immune nor can you get away with it
    over long cables.

    If you want real RS232 have a look at http://www.al-williams.com/rs1.htm
    -- these boards use a MAX232 to get real RS232 in and out. It is a kit,
    so you can usually work it into whatever you are building (or put the
    pins we supply in and it fits nicely in a solderless breadboard).

    If you read the SERIN/SEROUT manual pages, you'll find all of this is
    explained. Also have a look at http://www.wd5gnr.com/stampfaq.htm -- a
    lot of related info there too.

    Al Williams
    AWC
    * 8 channels of PWM
    http://www.al-williams.com/awce/pak5.htm



    >
    Original Message
    > From: elscottyrmt [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=K3bpAvSOGN4KdvAd8opd2AJg8ad7eYEnuUBwTtqyI5yn84dKyEQAKEN3JL25dmgqhKHJQsAi9l-Hxm4nqlI5lA5D]scottlosoya@c...[/url
    > Sent: Saturday, May 31, 2003 1:00 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] serial to ttl
    >
    >
    > I am trying to interface a Stamp's SEROUT to an OOPIC. Is there a
    > simple solution to invert the signal and to ttl voltage levels.
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    > Subject and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-31 14:16
    Seems to me you could use any of the Stamp's 16 general-purpose I/O
    pins and specify a "true" baudmode value. This will generate
    TTL-level, non-inverted serial data as expected by your OOPIC. A
    wire would be the only further interface needed.

    Regards,

    Steve

    On 31 May 03 at 6:00, elscottyrmt wrote:

    > I am trying to interface a Stamp's SEROUT to an OOPIC. Is there a
    > simple solution to invert the signal and to ttl voltage levels.
Sign In or Register to comment.