Serially, Are You Syncing Or Asyncing?

I know you’ve heard of both synchronous and asynchronous communications. But do you really know the differences between the two?

Serial communication was used long before computers existed. A predecessor is the telegraph system using Morse Code, one of the first digital modes of communication. Another predecessor is the teletype, which set standards that are still used today in your Arduino or Raspberry Pi.

All you need is two wires for serial communications, which makes it simple and relatively robust. One wire is ground and the other the signal. By interrupting the power with predefined patterns, information can be transferred over both short and long distances. The challenge is receiving the patterns correctly and quickly enough to be useful.

I was a bit surprised to find out the serial port on the Arduino Uno’s ATmega328P microcontroller is a Universal Synchronous Asynchronous Transmitter Receiver (USART). I’d assumed it was only a UART (same name, just leave out synchronous) probably because my first work with serial communications was with the venerable Intel 8251 “Programmable Communication Interface”, a UART, and I didn’t expect the microcontroller to be more advanced. Silly me. Later I worked with the Zilog 8530 Serial Controller Chip, a USART, the term I’ll use for both device types.

All these devices function in the same way. You send a byte by loading it into a register and it is shifted out one bit at a time on the transmit (TX) line as pulses. The receiver accepts the pulses on a receive (RX) input and shifts them into a register, which is then read by the system. The transmitter’s job is pretty easy it just shifts out the bits at a known clock rate. The receiver’s task is more complex because it needs to know when to sample the incoming signal. How it does this is the difference between asynchronous and synchronous communications.

Continue reading “Serially, Are You Syncing Or Asyncing?”

Dragging Teletypes Into The 21st Century

If you are of a certain age you may have worked in an office in the days before the computer revolution, and the chances are that in the corner of your office there would have been a teletype machine. Like a very chunky typewriter with a phone attached, this was an electromechanical serial terminal and modem, and machines like it would have formed the backbone of international commerce in the days before fax, and then email.

Teletypes may have disappeared from the world of trade, but there are a surprising number still in private hands. Enthusiasts collect and restore them, and radio amateurs still use digital modes based on their output. The problem facing today’s teletype owner though is that they are becoming increasingly difficult to interface to a modern computer. The serial port, itself an interface with its early history in the electromechanical world, is now an increasingly rare sight.

[Eric] has a project which addresses the teletype owner’s interfacing woes, he’s created a board with all the necessary level shifters and an Atmega32u2 microcontroller to translate the teletype’s output to USB.

In his design he’s had to solve a few problems related to such an aged interface. Teletypes have a serial output, but it’s not the TTL or RS232 we may be used to. Instead it’s a high-voltage current loop designed to operate electromagnets, so his board has to incorporate an optocoupler to safely isolate the delicate computer circuitry. And once he had the teletype’s output at a safe level he then had to translate its content, teletypes speak 5-bit ITA2 code rather than our slightly newer 7-bit ASCII.

The result though is a successful interface between teletype and computer. The former sees another teletype, while the latter sees a serial terminal. If you have a teletype and wish to try it for yourself, he’s released the source code in a GitHub repository.

Teletypes have featured a few times here at Hackaday over the years. We’ve had one as an SMS client, another that monitors a Twitter feed, and while it’s not strictly a teletype, a close examination of an Olivetti mechanical serial terminal.

Messages From Hell: Human Signal Processing

Despite the title, there’s no religious content in this post. The Hell in question is the German inventor [Rudolph Hell]. Although he had an impressive career, what most people remember him for is the Hellschreiber–a device I often mention when I’m trying to illustrate engineering elegance. What’s a Hellschreiber? And why is it elegant?

The first question is easy to answer: the Hellschreiber is almost like a teletype machine. It sends printed messages over the radio, but it works differently than conventional teletype. That’s where the elegance comes into play. To understand how, though, you need a little background.

Continue reading “Messages From Hell: Human Signal Processing”

Retrotechtacular: A Mechanical UART

We’ve heard it said that no one invented the old mechanical Teletype. One fell from the sky near Skokie, Illinois and people just duplicated them. It is true these old machines were similar to a modern terminal. They sent and received serial data using a printer instead of a screen. But inside, they were mechanical Rube Goldbergs, not full of the electronic circuits you’d think of today.

Teletype was the best-known name, but there were other mechanical monster terminals out there. [Carsten] recently took some pictures of his 99 pound Olivetti mechanical terminal. According to him, there’s only one electronic component within: a bistable solenoid that reads the data. Everything else is mechanical and driven with a motor that keeps everything at the right baud rate (110 baud).

Like the Teletype, it is a miracle these things were able to work as well as they did. Lacking a microcontroller, the terminals could respond to an identity request by spinning a little wheel that had teeth removed to indicate which letters to send (TeleType used a similar scheme). Things that are simple using today’s electronics (like preventing two keys pressed at once from being a problem) turned out to be massive design challenges for these old metal monsters.

Turns out that when [Carsten] last fired the terminal up, a capacitor finally gave up its magic smoke. He plans to fix it, though, and as long as it isn’t a mechanical problem, we bet he will.

We’ve talked about Teletypes a few times in the past, including using them for text messaging and even Twitter.

Pre-Web Hardware Connects To The Web

We’re not quite to the 25th anniversary of the world wide web, but that doesn’t mean the greatest innovation in information distribution since [Gutenberg]’s press can’t be celebrated a bit early, does it? [Suhayl] is throwing some of his hardware into the ring, and loading up the first web page with a modem from the mid 1960s and a teletype from the mid 70s. No, no sane person would have ever done this 25 years ago, but it’s neat to watch in any event.

The hardware [Suhayl] is using includes a Livermore Data Systems modem. It’s a finely crafted wooden box with an acoustic coupler on top, and a DB-25 connector on a side that connects to a terminal or computer via RS-232. If that Livermore Data Systems acoustic coupler modem looks familiar, you might be right. This modem was demoed back in 2009 by [phreakmonkey]. It’s an impressive little box that can connect to a remote system at up to 300 baud.

The I/O is handled by an ASR-33 teletype. This was the standard way to connect to computers and mainframes before we were all blessed with video terminals and TV typewriters. The whole setup connects to a Unix system with a much more familiar Hayes modem, runs a text-only browser, and retrieves the first web page as it was served up at CERN some 25 years ago.

Having Fun With Dumb Terminals

terminal

For a long time now, [Morgan] has been wanting an old serial terminal. In a stroke of luck, one of his pals at the Quelab hackerspace scored an awesome ADM-3A terminal from a collector. It’s a historically significant piece of computing and UNIX history, so obviously [Morgan] needed to get it working.

The ADM-3A terminal pre-dates the famous DEC VT-100 terminal, but since [Morgan]’s new acquisition speaks RS-232, he had a good shot at getting it to work with one of his more modern boxes. He’s using a Windows laptop loaded up with FreeBSD in a VM to talk to the terminal. Surprisingly, the only additional hardware required was a USB to serial cable and a DE9-DB25 serial adapter.

It may not be as cool (or as loud) as Quelab’s Teletype ASR-35 they have set up for Zork sessions, but it’s great to see ancient hardware have some
use. Right now, [Morgan] is editing files with vi and of course playing Zork. Seems like there’s plenty of life left in this old dumb terminal. After looking for an old VT-100 for a while now, I’ve got to say I’m pretty jealous.

Only Losers Text Message On Cellphones – This Guy Carries His Own Teletype For That

Yes, that’s an SMS text messaging device. [Mdziewie] decided that texting on a regular cellphone was too boring and decided to build himself an old-school SMS gateway. Here’s a translated link but the formatting of the forum post gets screwed up with the machine translation.

The device he’s using is an ASR-33 Teletype machine, which was introduced to the market in 1963. It is connected to a GSM modem via an ARM microcontroller, the STM32F103. This chip, along with a few electronic components, let [Mdziewie] design an interface that doesn’t require alteration to the ancient hardware. The forum post linked above includes video of this sending and receiving texts. It’s awesomely loud as it hammers away at the paper, and seems to work as expected.

If you hunger for one of your own but don’t have half-century old equipment there’s still hope. Find yourself a typewriter and turn it into a teletype machine.