[ad_1]
If you are a bibliophile, going to a used bookstore is a distinctly pleasant experience. Sure, you might discover an old book that you want to read. But at least some of the endorphin rush comes from seeing old friends. Not humans, but books you read years or even decades ago. Most often, you don’t buy the book — you probably have one stashed in a box somewhere. But it is a happy feeling to see an old friend and maybe thumb through it reading a passage or two among shelves of musty books. I wish we had something like that for chips. Outside of a few notable exceptions, chips tend to have a short life span of popularity and then give way to other chips. This is especially true of CPUs. One that I especially miss is the Scenix/Ubicom/Parallax SX chip.
I had a bookstore-like experience with this processor the other day. I produced a few products based around these chips and I have a small stash of them left. I jealously guard the hardware needed to program them “just in case.” Well, naturally, someone needed a few for some reason so I had to dig it all up. Knowing these might be some of the last of the unprogrammed SX chips in the world made me a little nostalgic.
The Story
In the late 1990s, a company called Scenix started producing a microcontroller called the SX in a few footprint sizes. So the SX18 was, for example, an 18-pin part. By 1999, they were already in full swing with the SX18 and SX28 and they introduced the SX52.
Of course, a lot of companies produced microcontrollers. The Scenix offering was a bit special. In those days, the Microchip PIC was the king of the hill. The PIC is an odd beast that evolved from a very limited controller made to be small and inexpensive. Notably, while it could support relatively high clock frequencies — 20 MHz was common — each normal instruction took 4 clock cycles. So when your crystal said 20 MHz, you were running instructions at 5 MHz.
The SX duplicated the Microchip instructions, but not the opcode mnemonics, since that was legally encumbered. In theory, you could take binary code meant for a PIC and deploy it on the SX. So the device had all the same architectural quirks as the PIC which was both a plus and a minus. However, it did have one huge advantage over the PIC: It could run at 50 MHz for real. The SX used a pipelined architecture so it was able to run one instruction per clock once the pipeline was full (and assuming you didn’t invalidate the pipeline with a jump).
That was 10 times the actual speed of a PIC. Granted, at 50 MHz, the chip drew a lot of power, but you could tune that by scaling down the frequency. Even at 10 MHz, you were running twice as fast as a PIC. Later versions could run at 75 MHz and even 100 MHz, although these were rather quickly discontinued. However, these chips were routinely overclocked to at least 80 MHz in, for example, the XGameStation.
There was another killer feature that seems normal today but was a revolution at the time: cheap in-circuit debugging. Most older CPUs had to have an expensive special part to do live debugging with no extra software on the chip. Sure, you could write a debugger that talked to a serial terminal, but that assumes a lot of things are already working. To do real hardware-level debugging was generally very pricey. But the SX had all the hardware required on every chip. A small serial port dongle that didn’t cost very much was available and with it, you could debug the chip in your circuit with no real impact on your code.
Peripherals Virtually
One key concept to the SX was that the CPU was kept very simple to hold down costs and increase speed. The trend, of course, was to add things to CPUs like UARTs, timers, PWM generators, and things like that. The SX did it differently. Running fast and having a very deterministic way to handle interrupts, Scenix touted a “virtual peripheral” library. The idea was that by using interrupts, you could build software peripherals and even if they ate up, say, half of your CPU time, you were still running many times faster than a PIC with peripherals.
Of course, if that works, it is great because you can tailor all the things you want. Need three UARTs and one PWM channel? No problem. If the next project needs five PWM channels and no UART, you can do that too. Of course, this was always better in theory than in practice. The “library” was little more than some example code and sometimes integrating it into your code was challenging. This was especially true if you were trying to integrate more than one since they would sometimes have conflicting requirements.
Still, you could do quite a few things that would have been almost impossible to do in software on a slower CPU.
The Parallax Connection
Scenix eventually became Ubicom, which would eventually get vacuumed into Qualcomm, but these chips are also associated with Parallax, a company well known for their Basic Stamps which were once the gateway drug to microcontrollers. Their products used the Microchip PIC, and they started selling a line of SX-based Stamps that were pretty much drop-in replacements for their existing products but much faster. (And of course more power hungry.) They also offered the chips and programming hardware they designed at affordable prices making the SX somewhat popular in the hobby community.
Parallax also developed books and courses for the chip. (I even wrote some of them.) A library existed that had code to do many common operations like FSK, I2C, SPI, run LCDs and stepper motors, and a lot more.
By 2005, Ubicom would step away from the SX and sell them only to Parallax with Parallax branding. By the middle of 2009, Parallax announced the end of the road for the SX. These days, you can pick up a 32-bit processor that can run at 100 MHz for a song, and integrated debugging is common. Modern CPUs will have architectures that are a bit saner than the PIC’s old bank-switching scheme and more amenable to C compilers, too. So I don’t miss those old days. But like an old book in a bookstore, it is good to see my old friend the SX.
What old processors are your friends? I’m very fond of the RCA 1802. I did a lot of work on old Motorola devices, too, like the 6805 and the 68HC11. I enjoyed the Basic Stamp, too. I can’t help but wonder if, in 30 years, people will fondly look back at an STM32 device or maybe the Raspberry Pi Pico?
[ad_2]
Source link