Programming PALs In 2021

The [IMSAI Guy] has posted a follow-up video with all the details of how he programs GAL22V10 chips in the modern era. We noted that this was missing from his stepper motor project a few days ago, and before we could even ask him, he answered. And no, you won’t have to dig that old Intel 486 DX2-66 out of the closet and search eBay for working floppy drives. It turns out the answer is easier than you’d think.

Microchip now owns WinCUPL through its acquisition of Atmel in 2016, and offers WinCUPL as a free download from the Microchip website. This runs only in Windows, although some users report success running under Wine on Linux. This tool will compile the design, but you still need to program the chip. If you’ve done any EEPROM programming lately, chances are you have one of the TL866A MiniPros laying around — this programmer can handle CPLDs, PALs, and GALS as well as EEPROMS. [IMSAI Guy] walks you through the programming procedure, and if you’ve programmed EEPROMs before, the process will be familiar.

For those who prefer the Linux or Mac environment, there are some alternatives. We’ve seen GALasm used on several projects such as [Ken Yap]’s 8085 Minimax. The GitHub repository for GALasm states that commercial use is strictly prohibited, so take note if this applies to your project. As for controlling the TL866A, there is a Linux port called minipro available on GitLab. The remaining hurdle if you want to experiment with these programmable logic chips it to actually get them — many are now obsolete. But it looks like you can still buy Lattice and Microchip (Atmel) ones from various sources. Happy Programming.

Continue reading “Programming PALs In 2021”

History Of Closed Captions: The Analog Era

Closed captioning on television and subtitles on DVD, Blu-ray, and streaming media are taken for granted today. But it wasn’t always so. In fact, it was quite a struggle for captioning to become commonplace. Back in the early 2000s, I unexpectedly found myself involved in a variety of closed captioning projects, both designing hardware and consulting with engineering teams at various consumer electronics manufacturers. I may have been the last engineer working with analog captioning as everyone else moved on to digital.

But before digging in, there is a lot of confusing and imprecise language floating around on this topic. Let’s establish some definitions. I often use the word captioning which encompasses both closed captions and subtitles:

Closed Captions: Transmitted in a non-visible manner as textual data. Usually they can be enabled or disabled by the user. In the NTSC system, it’s often referred to as Line 21, since it was transmitted on video line number 21 in the Vertical Blanking Interval (VBI).
Subtitles: Rendered in a graphical format and overlaid onto the video / film. Usually they cannot be turned off. Also called open or hard captions.

The text contained in captions generally falls into one of three categories. Pure dialogue (nothing more) is often the style of captioning you see in subtitles on a DVD or Blu-ray. Ordinary captioning includes the dialogue, but with the addition of occasional cues for music or a non-visible event (a doorbell ringing, for example). Finally, “Subtitles for the Deaf or Hard-of-hearing” (SDH) is a more verbose style that adds even more descriptive information about the program, including the speaker’s name, off-camera events, etc.

Roughly speaking, closed captions are targeting the deaf and hard of hearing audience. Subtitles are targeting an audience who can hear the program but want to view the dialogue for some reason, like understanding a foreign movie or learning a new language.

Continue reading “History Of Closed Captions: The Analog Era”

Stepper Motors Quick And Simple

If you want a simple and easy introduction to stepper motors, check out the [IMSAI Guy]’s short video where he designs a very basic stepper motor controller and packs in a lot of quick lessons along the way. (Embedded below.)

He first goes over the fundamentals of a stepper motor in a practical, hands-on approach, and also shows us how to ring out the connections if the pinout is unknown. Next he demonstrates stepping the motor manually and then makes a simple FET driver circuit. Just when you’re expecting a small microcontroller to appear, the [IMSAI Guy] instead digs deep into his junk box and explains how to drive the motor with a 22V10 GAL (an electrically erasable PAL) and a 555 timer module. Based on a clearly-explained logic table for driving the coils, a sneaky way to introduce Karnaugh maps, he proceeds to write the output equations in WinCUPL.

Mature Readers will recall the “Happy PAL” Character

WinCUPL is the modern version of CUPL (Compiler for Universal Programmable Logic) originally written by a company called Assisted Technology, now owned by Altium. CUPL and peers like PALASM from Monolithic Memories, Inc. (MMI) and ABEL from Data I/O Corporation were basic Hardware Description Languages specifically designed for PALs, GALs, and CPLDs. PALs were small arrays of logic gates with fusible interconnections, and your design is “burned” into the fuses much like a (EE)PROM. When designing with PALs, you could clearly visualize the connections in your mind, something that has since been remedied by the advent of modern FPGAs.

Alas, he cuts out the part where the source code is compiled and the 22V10 is programmed, and jumps directly into testing the circuit on a breadboard. Spoiler alert — it does work. Zooming in close and squinting, the nifty 555 timer breadboard module that he points out is called a TP353, which you can find from your favorite online supplier.

There is a lot to learn in this tutorial, and the [IMSAI Guy] does a great job at making the subject approachable to hobbyists and novices. We also covered another of his tutorials a couple of weeks ago on image sensors. Thanks to [itsevilbert] for the tip.

Continue reading “Stepper Motors Quick And Simple”

Driving A PAL TV Over RF Thanks To PWM Harmonics

While most analog televisions come with composite video inputs on a yellow RCA jack, the feature is not universal. This problem was even more prevalent in the 1980s, and most home consoles got around the problem by instead feeding video to the television’s tuner with an RF modulator. [Manzel Seet] had just such a television which used the PAL standard. Wanting to display images from a microcontroller, he put together PAL-Streamer.

The aim of the project was to display images on an analog television with minimal investment in hardware over and above what [Manzel] already had on hand. To this end, the project was built using a STM32F411 Nucleo development board. Capable of running at clock speeds up to 100 MHz, there’s plenty of grunt to handle demanding tasks like outputting video signals to a TV.

To achieve the target frequency of VHF Channel 3 (61.25 MHz), [Manzel] elected to rely on the onboard PWM hardware, after being inspired by [CNLohr]’s ATTiny NTSC project. The project takes advantage of the odd harmonics of square waves. Setting the PWM output to operate at 6.86 MHz, the ninth harmonic ends up at around 61.71 MHz, close enough to be tuned in on the TV set. With the hard part done, [Manzel] then implemented a virtual COM port allowing an attached PC to send PNG images or GIF animations to the display.

It’s a fun project that shows it’s possible to drive all kinds of analog displays if you’re willing to be creative about how you do it. Files are available on GitHub for those eager to recreate the work. [Manzel] points out that this method does put out a lot of RF energy in the surrounding bands, but for direct hookup to an antenna input, it works just fine. We love to see creative video projects on microcontrollers, so if you’ve figured out how to get an Arduino Uno to do 1080P over HDMI, be sure to let us know. Video after the break.

Continue reading “Driving A PAL TV Over RF Thanks To PWM Harmonics”

A Homebrew Radio, As All The Best Homebrew Radios Should Be

It started with an old TV sound chip, and some curiosity. The TDA1701 that [Philip Bragg] found in a box of junk is a complete FM IF strip and audio power amplifier from the golden age of analogue PAL televisions, and while it was designed for the 5.5 MHz or 6 MHz FM subcarrier of European broadcast TV, he found it worked rather well at the more usual 10.7 MHz of a radio receiver. There followed a long thread detailing the genesis bit-by-bit of a decent quality VHF radio receiver, built dead-bug-style on a piece of PCB material.

The TDA1701 was soon joined by a couple of stages of IF amplification with a ceramic filter, and then by several iterations of a JFET mixer. A varicap tuned MOSFET RF amplifier followed, and then a local oscillator. Finally it became a fully-functional FM radio, with probably far better performance than most commercial radios. He admits tuning is a little impractical though, with what appears to be a cermet preset potentiometer covering the entire band.

We suspect this project isn’t finished, and we hope he posts the schematic. But it doesn’t really matter if he doesn’t, because the value here isn’t in the design. Instead it lies in the joy of creating an ad-hoc radio just for the fun of it, and that’s something we completely understand.

We’ve covered a lot of radios in our time, and while it might be the first to feature a TV sound chip, it’s not the first built on bare PCB.

Grey Gear: French TV Encryption, 1980s Style

Who among us didn’t spend some portion of their youth trying in vain to watch a scrambled premium cable TV channel or two? It’s a wonder we didn’t blow out our cones and rods watching those weird colors and wavy lines dance across the screen like a fever dream.

In the early days of national premium television in America, anyone who’d forked over the cash and erected a six-foot satellite dish in the backyard could tune in channels like HBO, Showtime, and the first 24-hour news network, CNN. Fed up with freeloaders, these channels banded together to encrypt their transmissions and force people to buy expensive de-scrambling boxes. On top of that, subscribers had to pay a monthly pittance to keep the de-scrambler working. Continue reading “Grey Gear: French TV Encryption, 1980s Style”

Run Your Favorite 8-bit Games On An ESP32

Here at Hackaday HQ we’re no strangers to vintage game emulation. New versions of old consoles and arcade cabinets frequently make excellent fodder for clever hacks to cram as much functionality as possible into tiny modern microcontrollers. We’ve covered [rossumur]’s hacks before, but the ESP_8-bit is a milestone in comprehensive capability. This time, he’s topped himself.

There isn’t much the ESP 8-bit won’t do. It can emulate three popular consoles, complete with ROM selection menus (with menu bloops). Don’t worry about building a controller, just connect any old (HID compliant) Bluetooth Classic keyboard or WiiMote you have at hand. Or if that doesn’t do it, a selection of IR devices ranging from joysticks from the Atari Flashback 4 to Apple TV remotes are compatible. Connect analog audio and composite video and the device is ready to go.

The system provides this impressive capability with an absolute minimum of components. Often a schematic is too complex to fit into a short post, but we’ll reproduce this one here to give you a sense for what we’re talking about. Come back when you’ve refreshed your Art of Electronics and have a complete understanding of the hardware at work. We never cease to be amazed at the amount of capability available in modern “hobbyist” components. With such a short BOM this thing can be put together by anyone with an ESP-32-anything.

There’s one more hack worth noting; the clever way [rossumur] gets full color NTSC composite video from a very busy microcontroller. They note that NTSC can be finicky and requires an extremely stable high speed reference clock as a foundation. [rossumur] discovered that the ESP-32 includes a PLL designed for audio work (the “APLL”) which conveniently supports fractional components, allowing it to be trimmed to within an inch of the desired frequency. The full description is included in the GitHub page for the project and includes detailed background of various efforts to get color NTSC video (including the names of a couple hackers you might recognize from these pages).

Continue reading “Run Your Favorite 8-bit Games On An ESP32”