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

telegraph to serial data

ArchiverArchiver Posts: 46,084
edited 2002-06-07 20:36 in General Discussion
Hi,

A friend of mine asked me for help, as he wants to connect a telegraph to
the Internet.Cool, I thought, I can do that! But then I got scared [noparse];)[/noparse]

Here's my question - would it be enough to just hook a switch to the stamp
using the button command and constantly send the result via serout, or do
you think that I need to...

a) buffer the data in case the telegraph typing time is faster than the serout

b) use some kind of handshaking to make sure the data is transmitted.

I've successfully used the button command and the serout command to send
data to a computer, but I wanted to see if anyone can think of any gotchas
I might be missing.

Any and all advice gratefully received!

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-06-07 18:41
    >On Thu, 06 Jun 2002 23:13:38 -0700, raoul vaneigem wrote:
    > >A friend of mine asked me for help, as he wants to connect a
    > >telegraph to the Internet.Cool, I thought, I can do that! But then I
    > >got scared [noparse];)[/noparse]
    > >
    > >Here's my question - would it be enough to just hook a switch to the
    > >stamp using the button command and constantly send the result via
    >
    > >I've successfully used the button command and the serout command to
    > >send data to a computer, but I wanted to see if anyone can think of
    > >any gotchas I might be missing.
    >
    >What type of information do you want to end up with on the Internet?

    The net is just the connection, we're not going to decode anything, just
    send the dots and dashes from point a to point b. The stamp just needs to
    send either a dot or a dash as serial data
  • ArchiverArchiver Posts: 46,084
    edited 2002-06-07 19:06
    At 07:45 PM 6/7/2002 +0100, you wrote:
    >Is what you call a telegraph a teleprinter?
    >
    >Do you know if it is using 5 unit or 7 unit code?

    Golly, I don't know. This is just for a fun project, it doesn't have to be
    super accurate. By telegraph I mean those old fashioned things where you
    push down on a lever and it makes a short beep sound or a long beep sound,
    they used to use them before telephone to send messages like "SOS".

    So the idea is that I hook up a switch to a stamp, measure how long the
    switch is depressed and send that info across the network as serial data.
    So if you held the switch down for 1 ms it would be a dot and if you held
    it down for 3ms it would be a dash.

    My friend is dealing with all the computer stuff, I just need to get the
    stamp to transmit the length of the dashes as serial data to the terminal.

    So my question is do I need to

    a) buffer the data in case the telegraph typing time is faster than the serout
    b) use some kind of handshaking to make sure the data is transmitted.
  • ArchiverArchiver Posts: 46,084
    edited 2002-06-07 19:18
    On Thu, 06 Jun 2002 23:13:38 -0700, raoul vaneigem wrote:
    >A friend of mine asked me for help, as he wants to connect a
    >telegraph to the Internet.Cool, I thought, I can do that! But then I
    >got scared [noparse];)[/noparse]
    >
    >Here's my question - would it be enough to just hook a switch to the
    >stamp using the button command and constantly send the result via

    >I've successfully used the button command and the serout command to
    >send data to a computer, but I wanted to see if anyone can think of
    >any gotchas I might be missing.

    What type of information do you want to end up with on the Internet?

    Are you just going to use the net as a connection between the sending
    and receiving telegraphs or... are you intending to print the dots and
    dashes of Morse code, generate sounds that simulates the telegraph,
    etc.? Are you going to actually read and decode Morse with the Stamp?
    This is complicated, especially if it is being sent by a human with
    imprecise spacing of the dots, dashes, inter element spacing, and inter
    character spacing.

    Characters are varying lengths. I think the longest Morse character has
    8 "elements" (dots and dashes), the shortest is 1 element (a single dot
    is an 'E'.) The longer ones are not technically printable characters
    but are prosigns used as a shorthand for things like "error", "end of
    message", etc.

    Sounds like it could be a fun project but it could also snowball into a
    huge project in a hurry.
  • ArchiverArchiver Posts: 46,084
    edited 2002-06-07 19:45
    Is what you call a telegraph a teleprinter?

    Do you know if it is using 5 unit or 7 unit code?

    Thanks,

    Tony

    Original Message
    From: "raoul vaneigem" <raoul@c...>
    To: <basicstamps@yahoogroups.com>
    Sent: Friday, June 07, 2002 7:13 AM
    Subject: [noparse][[/noparse]basicstamps] telegraph to serial data


    > Hi,
    >
    > A friend of mine asked me for help, as he wants to connect a telegraph to
    > the Internet.Cool, I thought, I can do that! But then I got scared [noparse];)[/noparse]
    >
    > Here's my question - would it be enough to just hook a switch to the stamp
    > using the button command and constantly send the result via serout, or do
    > you think that I need to...
    >
    > a) buffer the data in case the telegraph typing time is faster than the
    serout
    >
    > b) use some kind of handshaking to make sure the data is transmitted.
    >
    > I've successfully used the button command and the serout command to send
    > data to a computer, but I wanted to see if anyone can think of any gotchas
    > I might be missing.
    >
    > Any and all advice gratefully received!
    >
    >
    > 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 2002-06-07 20:36
    On Fri, 07 Jun 2002 11:06:54 -0700, raoul vaneigem wrote:
    >Golly, I don't know. This is just for a fun project, it doesn't have
    >to be super accurate. By telegraph I mean those old fashioned things
    >where you push down on a lever and it makes a short beep sound or a
    >long beep sound, they used to use them before telephone to send
    >messages like "SOS".
    >
    >So the idea is that I hook up a switch to a stamp, measure how long
    >the switch is depressed and send that info across the network as
    >serial data. So if you held the switch down for 1 ms it would be a
    >dot and if you held it down for 3ms it would be a dash.

    This goes back to one of my earlier comments/questions. There is
    usually a 1:3 ratio dots and dashes... a dot (your short sound) is 1/3
    as long as the dash (your long sound.) The part that makes measuring
    them with a micro or a stamp interesting is that the speed and the
    accuracy of the spacing can vary depending on the skill of the
    operator.

    There will be a big difference in the lengths since the telegraph
    operator might be sending as slow as a couple of words a minute or as
    fast as 50 or more. They most likely will not have perfect spacing
    either--the 1:3 ratio will be off in both directions and it will vary a
    little bit all the time even if the operator has a good "fist".

    If you know a ham operator or have a short wave receiver of your own
    search for and download a program called CWget. You feed receiver audio
    into the soundcard on your PC and CWget uses the DSP in the sound card
    to decode the received Morse code. I know this isn't what you're trying
    to do exactly but you will be able to visually see the variations I'm
    talking about. Since you will have a key hooked to the Stamp you won't
    have to worry about all the noise filtering, etc. that CWget handles
    with the Soundcard DSP but you will need to adjust for the operators
    speed and variations in spacing.

    Keep posting how this project is going, I think you're going to have a
    lot of fun and will probably learn a whole bunch of neat things.

    Tim N9PUZ
Sign In or Register to comment.