Modified Yost Tames Pinout Plethora

Every hacker has an assortment of USB to TTL-serial adapters kicking around in their lab, and we have all been annoyed that each one has a different pinout. You layout a PCB or breadboard for the Sparkfun flavor (GND, CTS, VCC, TXD, RXD, DTR), but when you begin troubleshooting all you can find is a CH340 board (GND, +5V, TXD, RXD, DTR, +3.3V). You have to jumper everything, and it becomes a mess. It wasn’t much better back in the days of RS-232 level signaling, either. While the pinouts were consistent, there were other headaches. Did the connection need a NULL modem adaptor? And if you were unlucky, you might need a DB-25 to DE-9 adaptor, and the really unlucky might need one or more gender changers. Surely there’s a better way.

It turns out there was a better way, although it didn’t seem to have become as popular as one might expect. Back in 1987 [Dave Yost] formalized an interconnection scheme using RJ45 plugs and jacks while at Berkeley.  The signals were arranged in a mirrored fashion so that each cable is always a crossover — just plug two cables back-to-back if you really need a straight thru connection.

Even though he was dealing with RS-232 serial, nothing prevents us from using this scheme for logic level signaling. For example, consider the following 1×10 header pinout, where the original 8-pins are expanded to 10 to allow for power:

This is an extreme example, and can obviously be shrunk depending on how much handshaking, if any, or power is desired. Such a pinout lets you switch between DCE and DTE by simply flipping the connector around. And if a Dupont-style header slips off too easily in your applications, you could always use an RJ connector. This still doesn’t solve the Tower of Babel pinout problem with the USB-TTL adaptors. But standardizing on a serial pinout such as this for your projects and making cables or kludging your TTL adaptors will make serial debugging less painful.

Yost to Sparkfun Adaptor Cable

Back when he released this scheme in 1987, [Dave] pontificated:

“Maybe one day before the year 2,000, the world will have a new, simple, high-speed, flow-controlled, standard type of connection for point-to-point applications currently using RS-232, with an adaptor available to talk to old, RS-232 equipment.”

Let us know your thoughts in the comments below.

A Portable Serial Terminal That Should Be From The 1970s

The humble standalone serial terminal might be long gone from the collective computing experience, but in the ghostly form of a software virtual terminal and a serial converter it remains the most basic fall-back and essential tool of the computer hardware hacker. [Mitsuru Yamada] has created the product that should have been made in the serial terminal’s heyday, a standalone handheld terminal using a 6809 microprocessor and vintage HP dot matrix LEDs. In a die-cast box with full push-button keyboard it’s entirely ready to roll up to a DB-25 wall socket and log into the PDP/11 in the basement.

Using today’s parts we might achieve the same feat with a single-chip microcontroller and a small LCD or OLED panel, but with an older microcomputer there is more system-building required. The 6809 is a wise choice from the 1970s arsenal because it has some on-board RAM, thus there’s no need for a RAM chip. Thus the whole thing is achieved with only a 2716 EPROM for the software, a 6850 UART with MAX232 driver  for the serial port, and a few 74 chips for glue logic, chip selects, and I/O ports to handle keyboard and display. There’s no battery in the case, but no doubt that could be easily accommodated. Also there’s not much information on the keyboard itself, but in the video below we catch a glimpse of its wiring as the box is opened.

The value in a terminal using vintage parts lies not only in because you can, but also in something that can’t easily be had with a modern microcontroller. These parts come from a time when a computer system had to be assembled as a series of peripherals round the microprocessor because it had few onboard, leading to a far more in-depth understanding of a computer system. It’s not that a 6809 is a sensible choice in 2020, more that it’s an interesting one.

By comparison, here’s a terminal using technology from today.

Continue reading “A Portable Serial Terminal That Should Be From The 1970s”

Discrete-Logic UART Keeps 8-Bit TTL Computer Connected

Pity the poor TTL computer aficionado. It’s an obsession, really — using discrete logic chips to scratch-build a computer that would probably compare unfavorably to an 80s era 8-bit machine in terms of performance. And yet they still forge ahead with their breadboards full of chips and tangles of wire. It’s really quite beautiful when you think about it.

[Duncan] at Shepherding Electrons has caught the TTL bug, and while building his 8-bit machine outfitted it with this discrete logic UART. The universal asynchronous receiver-transmitter is such a useful thing that single-chip versions of the device have been available since the early 1970s. [Duncan]’s version makes the magic of serial communications happen in just 12 chips, all from the 74LS logic family.

As if the feat of building a discrete logic UART weren’t enough, [Duncan] pulled this off without the aid of an oscilloscope. Debugging was a matter of substituting the 2.4576 MHz crystal oscillator clock with a simple 1 Hz 555 timer circuit; the reduced clock speed made it easier to check voltages and monitor the status of lines with LEDs. Once the circuit was working, the full-speed clock was substituted back in, allowing him to talk to his 8-bit computer at up to 38,400 bps. Color us impressed.

For more TTL computer goodness, and to see where [Duncan] got his inspiration, check out [Ben Eater]’s many discrete logic projects — his scratch-built 6502, a low-end video card, or even his take on serial communications.

The USB Null Modem Cable Is Now A Thing

The classic serial null-modem cable was, among other things, used to connect two computers together for communications and file transfer. Largely eliminated in daily use by the advent of home networking, there are still fringe applications where such a thing can come in handy. [Nick Sayer] needed just such a tool, but one that would work in a modern USB environment. Enter the isolated USB null-modem.

The device consists of two USB Communication Device Class, or CDC chips, creating a USB serial port for each attached computer. The TX and RX lines are cross-connected to allow communication between the two sides. Rather than directly connect the lines, however, they pass through an opto-isolator. This is important, as it allows two computers at different ground potentials to be safely connected to each other without damage.

[Nick] originally created the device to solve a specific problem at his day job, but community response was large enough that he was kind enough to share the project online. Expect to see devices available on Tindie in future for those that need a hookup. While it’s not something everyone will need, for those that do, it should come in handy. If you’re looking for other useful applications for USB-serial devices, there’s plenty – you can even try your hand at software-defined radio!

No More Floppy Drives For This Agilent Scope

When [kiwih] picked up an Agilent 54621A scope, he was amused that it had a floppy disk. At one time, it was high-tech to use a disk to transfer scope data to your computer. Today, not so much. However, on the back was a serial port. Surely it was possible to read data from there. It is, and what results is a nice walkthrough of finding the port’s info and interfacing with it using Python.

Normally, you’d use the included BenchLinkXL software to grab data from the port, but that software is so old it would not run under Windows 10 or Wine. Searching didn’t turn up much on the serial port, but it did locate a manual for a similar Agilent scope. That manual wasn’t too helpful since it assumed you were connecting via a LAN or USB. However, it did make reference to an older model that was also similar and that was the key to finding a manual that did explain the serial port protocol.

The command set looks suspiciously like SCPI — Standard Commands for Programmable Instruments — which is a layer on top of the GPIB protocol. Many scopes speak that language, so that’s not surprising. That also means if you are in the mood to communicate with an SCPI scope, you might find the code useful, even if you don’t use a serial port or have this exact Agilent model.

SCPI has a lot of uses. For example, try talking to your scope. The cheap Rigol and similar scopes usually have SCPI and you can control and read them using the same kind of techniques.

KVM Uses Many Arduinos

The Arduino platform is one of the most versatile microcontroller boards available, coming in a wide variety of shapes and sizes perfect for everything from blinking a few LEDs to robotics to entire home automation systems. One of its more subtle features is the ability to use its serial libraries to handle keyboard and mouse duties. While this can be used for basic HID implementations, [Nathalis] takes it a step further by using a series of Arduinos as a KVM switch; although admittedly without the video and mouse functionality yet.

To start, an Arduino Uno accepts inputs from a keyboard which handles the incoming serial signals from the keyboard. From there, two Arduino Pro Micros are attached in parallel and receive signals from the Uno to send to their respective computers. The scroll lock key, which doesn’t do much of anything in modern times except upset Excel spreadsheeting, is the toggle switch between the two outputs. Everything is standard USB HID, so it should be compatible with pretty much everything out there. All of the source code and schematics are available in the project’s repository for anyone who wants to play along at home.

Using an Arduino to emulate a USB input device doesn’t have to be all work and no play, the same basic concept can also be used to build custom gaming controllers.

A Mini USB Keyboard That Isn’t A Keyboard

A useful add-on for any computer is a plug-in macro keyboard, a little peripheral that adds those extra useful buttons to automate tasks. [Sayantan Pal] has made one, a handy board with nine programmable keys and a USB connector, but the surprise is that at its heart lies only the ubiquitous ATmega328 that you might find in an Arduino Uno. This isn’t a USB HID keyboard, instead it uses a USB-to-serial chip and appears to the host computer as a serial device. The keys themselves are simple momentary action switches, perhaps a deluxe version could use key switches from the likes of Cherry or similar.

The clever part of this build comes on the host computer, which runs some Python code using the PyAutoGui library. This allows control of the keyboard and mouse, and provides an “in” for the script to link serial and input devices. Full configurability is assured through the Python code, and while that might preclude a non-technical user from gaining its full benefit it’s fair to say that this is not intended to compete with mass-market peripherals. It’s a neat technique for getting the effect of an HID peripheral though, and one to remember for future use even if you might not need it immediately.

More conventional USB keyboards have appeared here in the past, typically using a processor with built-in USB HID support such as the ATmega32u4.