BMOW title
Floppy Emu banner

Archive for the 'Bit Bucket' Category

Classic Macintosh Video Signals Demystified, Designing a Mac-to-VGA Adapter with LM1881

In the late 1980s When Apple released its first Macintosh models supporting external color monitors, the company made some design choices that continue to cause trouble even today. Computers like the Macintosh IIci supported 640 x 480 video resolution, the same resolution as the VGA standard that was common in the PC world, but they used a different physical connector for the monitor cable, a different vertical refresh rate, and a different method of encoding sync information. It’s those sync differences that have proven to be most problematic over the years. Let’s look at what all is required to use my Macintosh IIci with a modern LCD monitor. Grab some coffee and get comfortable, because this will be a long one.

 
Monitor Connector Comparison

The classic Macintosh video connector is a DB-15, with two rows of pins. The correct name for this is actually DA-15, but nearly everybody calls it DB-15 and we’ll follow that convention. The VGA connector is a DE-15 with three rows of pins. This is sometimes called HD-15 owing to its “high density” arrangement of pins. Despite the physical differences, the video signals on the two connectors are mostly the same: (pinout data from sfiera)
 

Signal Mac VGA
Red video 2 1
Red ground 1 6
Green video 5 2
Green ground 6 7
Blue video 9 3
Blue ground 13 8
HSYNC 15 13
HSYNC ground 14 5
VSYNC 12 14
CSYNC 3 NC
VSYNC/CSYNC ground 11 10
Sense 0 4 NC
Sense 1 7 NC
Sense 2 10 NC
Ground shell shell

This difference in physical connectors is fairly easy to solve with an adapter. During the 1990s and 2000s you could find a Mac-to-VGA adapter at any computer store. Today they’re more rare, but still available from surplus electronic suppliers or eBay.

 
Signals and Sync

A very brief primer on video signal formats: A video signal is composed of a series of lines, organized into frames. The lines are output from the video hardware one by one, at a fixed rate, and the timing of each line is indicated with an HSYNC pulse from the video hardware. After all the lines in a frame have been output, there’s a VSYNC pulse before the start of the next frame. The monitor needs these sync pulses to keep its display operating in lockstep with the video signal.

The 640 x 480 VGA standard uses 60 frames per second – its vertical refresh rate is 60 Hz. But Apple chose a 67 Hz refresh rate for its 640 x 480 video format (actually 66.666666…), which could be argued is slightly better than 60 Hz because the higher rate results in reduced flickering on CRTs. The difference is negligible, however, and the 67 Hz rate only serves to complicate things. Fortunately most modern moderns support a fairly wide range of vertical refresh rates, where a range like 50-75 Hz is common. This means that the 67 Hz refresh rate usually isn’t a problem. If you know of a counter-example, please tell me.

What about those sync signals? In the VGA standard, HSYNC and VSYNC are provided as separate input signals on VGA pins 13 and 14. It’s nice and simple, end of story. But in the classic Macintosh video world, sync is… complicated. There’s a fair amount of misunderstanding and myth about this topic floating around the web, so I’m here to explain the truth. From the table above we can see that the Mac has outputs for HSYNC and VSYNC, but also for CSYNC composite sync (HSYNC xor VSYNC). Many people have also heard about sync on green, where composite sync is mixed directly into the green video channel. So what exactly is the Mac video sync standard? Does it output separate HSYNC and VSYNC, or CSYNC, or sync on green?

The answer is yes, the Mac generates all of those sync standards at different times, depending on what type of monitor it thinks is connected. But it doesn’t generate all of them all of the time. The video hardware checks the voltages on the connector’s three sense pins, which form a 3-bit monitor ID for the connected monitor type. If it’s a supported monitor type, the video hardware configures itself for an appropriate output signal and sync method. If it’s not a supported monitor type, the video hardware shuts off and outputs nothing.

Here’s a page from a Macintosh IIsi hardware developer note. The IIsi’s video hardware is nearly identical to my IIci:

We can see that four different types of monitors are supported, but two of them share the same monitor ID and signal format. For a 15 inch portrait monitor, the Mac outputs separate HSYNC and VSYNC signals exactly like VGA requires, but at the mostly-useless portrait resolution of 640 x 870. For the 13 inch RGB monitor standard that we’re interested in, with 640 x 480 resolution, HSYNC and VSYNC are stuck high and the sync information is provided via CSYNC.

What about sync on green? Although it’s not mentioned anywhere in the developer note, the Mac also outputs sync on green any time it outputs composite sync. It outputs both CSYNC and sync on green. In fact, it also outputs sync on red and sync on blue too – all three color channels have embedded sync information when composite sync is used. This was recently proven conclusively with a video hardware schematic analysis followed by a series of tests by dougg3 (Doug Brown), who kindly gave me permission to reproduce his oscilloscope captures here.

Doug hotwired his IIci’s monitor connector, grounding pin 4 (sense 0) to produce the monitor ID for 640 x 480 RGB. He made this scope capture showing the Mac’s CSYNC output (yellow trace) and red video signal (cyan trace). On CSYNC you can see the shorter HSYNC pulses and the longer VSYNC pulse combined with the HSYNC pulses during it. On the red channel, you can see some red video data on the left, with the sync info clearly also present in the lower voltage range.

Looking at the green channel also showed the same thing – embedded composite sync in the green video data. Doug then looked at the VSYNC output (cyan trace):

Nothing. VSYNC was just a constant high voltage. Nothing to see here. This confirms the information from the developer note: when CSYNC is output, VSYNC and HSYNC are turned off.

 
DIP Switch VGA Adapters

Now we know enough to begin peeking inside the common Mac to VGA adapters, with their confusing arrays of DIP switches, to understand how they work. If you’ve been around classic Macintosh computers for a while, you’ve surely seen many variations of these:

Obviously they are physical adapters from DB-15 to HD-15, but what do all those DIP switches do? For nearly all such adapters, the guts are simply a passive switch matrix, controlling how the Mac pins are connected to the VGA pins. There’s no signal processing of any kind. The DIP switches typically perform two functions:

Monitor ID – Configure how the sense pins are connected to ground, or to each other, to set the desired monitor ID. This tells the Mac what kind of video signal to generate.

Sync mapping – VGA VSYNC can optionally be connected to Mac VSYNC. VGA HSYNC can be connected to Mac HSYNC or Mac CSYNC.

They’re pretty simple devices. Maybe you’re wondering why you’d ever want to connect the Mac’s CSYNC to the VGA monitor’s HSYNC. Many newer monitors are able to accept composite sync as an alternative to HSYNC and VSYNC, and if they have that capability, they will normally expect CSYNC on their HSYNC input. Providing a DIP switch mapping for this will enable the Mac to work directly with such monitors.

Note that there are no DIP switch settings related to sync on green. If the monitor supports sync on green, it will use the sync info in the green video channel with no extra configuration needed. If the monitor doesn’t support sync on green, too bad.

 
The Sad Tale of One Macintosh IIci, Four Monitors, and No Joy

Are you still awake? With all of this background exposition finished, we’re finally ready to tell the story that inspired this whole investigation. It’s the story of my Macintosh IIci, four different monitors, a host of different Mac-to-VGA adapters, and a lot of frustration leading to eventual understanding and the design of a new video adapter.

For several years I’ve been using my Macintosh IIci with the Griffin Mac PnP adapter pictured above and a Dell 2001FP LCD monitor, and it’s worked great. This particular monitor also has a composite video input that works with Apple II and other classic computer hardware, so it’s an excellent tool for computer collectors. As to exactly how the Mac IIci video worked with this monitor, I never gave it any thought. I just plugged it in and got a picture.

A couple of weeks ago I went on a shopping spree and purchased a ViewSonic VG900b 19-inch LCD, a Viewsonic 6 TX-14H30 14-inch CRT, and an E-Machines ColorPage T16 II 1108DT16MR 16-inch CRT. These are all multisync displays, with a max resolution of 1024 x 768 on the CRTs and 1280 x 1024 on the LCD. But when I connected them to my Mac IIci with the Griffin adapter, I got no picture from any of them. I tried zillions of DIP switch settings, I tried different adapters, but nothing helped. All three of these fussy monitors simply refused to show any image from my IIci. They behaved as if nothing were connected.

Now that we understand the video signals and the inner workings of the DIP switch adapters, we can see the likely reason that nothing worked. In 640 x 480 mode the Mac IIci outputs composite sync and sync on green. My 2001FP must support one or both of those sync standards, but the new monitors probably don’t support them. In the case of the VG900b this was confirmed in the hardware specifications listed in its manual, where it lists support for “H/V Separated (TTL)” video sync. Other Viewsonic LCDs from the same era specifically mention composite sync and sync on green in their specifications, so this isn’t likely just an accidental omission from the documentation. I haven’t been able to find detailed specifications for the two CRT monitors, but I’m guessing it’s the same issue. These monitors require separate HSYNC and VSYNC signals, and won’t support any other sync format.

 
LM1881 to the Rescue

What do you do when your computer outputs composite sync, but your monitor requires separate HSYNC and VSYNC? Say hello to the Texas Instruments LM1881 Video Sync Separator.

This chip is designed to extract composite sync from composite video, a video standard in which composite sync is mixed with RGB color data. In our case the composite sync is already separated from the color data and doesn’t need to be extracted, but the LM1881 has another feature we can take advantage of: synthesis of a separate VSYNC signal from the composite sync input. Unfortunately the LM1881 doesn’t have a complementary HSYNC output. There are other rarer and more expensive chips that can extract both HSYNC and VSYNC, but I haven’t investigated these.

Fortunately for us, I’ve learned that many (most?) monitors will accept CSYNC as a substitute for HSYNC, so long as a separate VSYNC signal is also provided. So all we really need is VSYNC, and the LM1881 can do the job.

Armed with this information, I set out to build a Mac to VGA adapter with an integrated LM1881 that would enable my Macintosh IIci to work on those three fussy monitors. I would use the LM1881 to extract VSYNC from CSYNC, passing the VSYNC to the VGA monitor, and I would pass CSYNC to HSYNC with my fingers crossed.

I began with a DB-15 breakout. I connected up all the grounds, and grounded pin 4 (sense 0) to request Mac 13 inch 640 x 480 mode. I plugged the breakout into my Macintosh IIci, and connected a logic analyzer to all three sync outputs. CSYNC showed the expected composite sync with a period of 15 ms (66.67 Hz), while HSYNC and VSYNC remained high.

Next I soldered some wires to an LM1881 breakout PCB. The LM1881 requires a 5V supply, which isn’t present on the monitor connector, so I stole 5V from the floppy disk port. Later I intend to try self-powering the LM1881 using the (otherwise unused) VSYNC and HSYNC signals as a power source.

Examining the LM1881 composite sync output, I saw that the output followed the input as expected.

But zooming in, the signals were not quite the same. The LM1881 output lagged the CSYNC input by about 100ns, and included a very short low pulse before going high and low again, for each pulse on the CSYNC input. This might have been an artifact of using a logic analyzer to view the signal, rather than an analog oscilloscope.

Then I soldered another wire to LM1881 pin 3, the synthesized VSYNC output. It worked! But the extracted VSYNC lagged the input VSYNC by a whole line, and extended several lines past the end of the input VSYNC. This was unexpected, but I believe the exact timing and duration of the VSYNC signal isn’t critical, so long as the refresh frequency is correct.

So far, so good. I finished the adapter by adding an HD-15 breakout. I connected the LM1881’s VSYNC output to VGA VSYNC, and LM1881 CSYNC output to VGA HSYNC. Remember, this second connection isn’t really correct – CSYNC is not HSYNC – but we’re relying on the premise that monitors will accept CSYNC on their HSYNC input as long as they also have a separate VSYNC signal. Thanks to the LM1881, we now had that missing VSYNC signal.

Here’s the finished adapter, including the floppy port adapter for stealing 5V: it really is a big mess o’ wires, and something so ugly that only a mother could love it.

I’ve mentioned that I have one monitor that’s worked with my IIci’s built-in video all along: the Dell 2001FP. And three monitors that do not work, no matter what settings I have tried on the VGA adapters: the Viewsonic VG900b LCD, Viewsonic 6 CRT, and E-Machines CRT.

As a sanity check, I tried the Dell first:

It still worked, but the video quality was lousy: there was all kinds of shimmering and noise in the image. Maybe it was a result of my messy nest of wires snaking everywhere? At least there was a usable image.

Next I tried the Viewsonic VG900b LCD. This was the real test, since this monitor had refused to sync with my IIci video before. Would it work now?

Whomp whomp, so sorry. There was no love from the VG900b, which still complained there was no video signal and then went to sleep. That was disappointing. Maybe the VG900b doesn’t like CSYNC as HSYNC substitute, or maybe it’s confused by the CSYNC that’s also still present on the RGB channels.

OK, how about this Viewsonic 6 CRT? It never worked with the IIci video before, but how about now?

Success, it worked! The image quality was pretty good too. There was still a little bit of shimmer, but much less than with the Dell 2001FP. I’m not sure why there was such a difference, maybe something about digital versus analog video circuitry?

The final test was the E-Machines 16 inch CRT. This was the third member of the fussy trio that had refused to work with my IIci built-in video before:

Huzzah! It also worked (minus some image centering). The image quality was similar to the Viewsonic CRT: some shimmer, but not too bad.

 
Design of a New Mac-to-VGA Adapter

That’s a score of 2 out of 3 for this Mac-LM1881 adapter. I think that’s useful enough to deserve being made into a proper PCB kit, for other classic Macintosh computer owners who’ve faced the same monitor challenges. Since it’s such a simple circuit, I’ll probably share the whole PCB design for anybody who wants to make their own, and also stock a few in the BMOW store for anybody that wants a pre-built adapater.

To assist with troubleshooting, I’d also like to include some LEDs in the adapter to show which of the Mac sync outputs have activity, and maybe also which of the RGB outputs have activity. I haven’t quite figured out how to do this. The RGB outputs are only 0.7V, and may have negative voltage swings if sync on green is used. The sync outputs are standard TTL levels with 0 to 5V swing. I’ve been brainstorming how to build an “activity detector” circuit to turn on an LED without involving a microcontroller. Maybe something with a flip-flop where the sync signal is used as the clock input, and there’s an RC circuit with appropriate time constant connected to the flip-flop’s asynchronous clear. If you have any great ideas for this, please share them.

Some questions about the LM1881 remain. I belatedly read the chip’s data sheet only after I’d finished my experimentation, and realized that I may be using it incorrectly, and that many of the similar circuits seen on the web are using it incorrectly. Referring to the canonical LM1881 circuit diagram shown above:

  1. Why didn’t the Viewsonic VG900b work with the LM1881 sync signals? Is there something simple I could do to fix it?
  2. The datasheet says the recommended input voltage on pin 2 is 1.5V and the absolute max is 3V, but I’m feeding it a 5V sync signal from the Mac.
  3. A different RC filtering scheme on input pin 2 may be needed – the 0.1 uF blocking capacitor is just an example. “Typical Applications” in the datasheet shows an alternative design with an RC lowpass filter on pin 2.
  4. The value of the R-set resistor may need to be adjusted, depending on video timing. The default value of 680 kOhm may be inappropriate for this.
  5. The LM1881 output pins can only source a few mA of current, but if I’m putting 5V into a 75 ohm terminated monitor input, won’t that be 67 mA? Do I need to buffer these signals? 67 mA is a pretty large amount of current, and more than even most buffers can provide. Perhaps I’ve misunderstood this. Do I also need a 75 ohm resistor at the source? Does 75 ohm termination even apply to the sync signals, or is that only for the RGB signals?

The investigation continues. More updates soon, I hope!

Read 15 comments and join the conversation 

Announcing the Tetris Max High Score Contest, October 14

Oh yes, this is happening. This is the moment. Put your peril-sensitive sunglasses on, warm up your wrists, and prepare your ergonomic keyboards. Saturday October 14 at Mactoberfest Meetup will feature the first-ever public Tetris Max high score contest, with the winner taking home a complete and newly-restored Performa computer system plus other fabulous prizes TBD, and international acclaim as Tetris Max World Champion. There’s also an online competition category that I just made up this very second. You won’t want to miss it. ESPN has nothing on the excitement of this sporting event!

tetris max 2

 
Contest Rules

To keep the contest as fair as possible, we need some ground rules. The contest will run from 11:00 am to 3:30 pm Pacific Daylight Time or UTC−07:00 on Saturday October 14. Practice all you want before then, but qualifying high scores must be set during this time window. Games already in progress at 3:30 pm may continue until finished. The score must be achieved on a real 68030 or 68040-equipped Macintosh (no emulators) with CPU speed of 25 MHz or faster, with ADB keyboard (no USB adapters) or PowerBook built-in keyboard, and with Tetris Max v2.9.x as the only open application. The game must be started with the Begin New Game menu option – the Practice or Repeat Last Game options must not be used. The minimum qualifying high score is 16000 points. In case of any rules ambiguity, the contest organizer will make a final decision.

Live Contest at Mactoberfest

To be eligible for the live contest you must be physically present at Mactoberfest Meetup in Belmont California, and set a high score on a computer at the meetup. I will have two computers prepared for the contest, and other computers can also be used as long as they meet the contest rules criteria. The highest scorer at the end of the contest will win a complete Macintosh Performa 460 computer system, described below. There may be runner-up prizes as well. You must be present at the meetup at 3:30 pm to be eligible for a prize.

Online Contest

High scores must be set during the same time window as the live contest, with computers meeting the same rules criteria. The entire game session from start to finish must be recorded in one continuous video with no cuts. Use your phone camera or other device for recording. If you achieve a high score over 16000 then KEEP RECORDING and include these at the end of the video, with no cuts:

  • show the contents of the “About This Macintosh” window
  • show the actual computer the game is running on
  • open news.google.com or 68k.news in your phone or PC browser and show the current news headlines

Submit the video by uploading it to your favorite platform (YouTube or just Google Drive if you want to keep it private), then email your score and a link to your video to mactoberfest@bigmessowires.com. Submissions must be received by 5:00 pm Pacific Daylight Time to be considered. Videos that don’t include all the required elements, or that show signs of editing or ResEdit tampering or other creative shenanigans, will be disqualified. The highest scorer at the end of the contest will win the internet for a day and receive a $100 gift certificate to the BMOW store.

Pro Tip #1: What better time than now to drop some secret knowledge? There are two hidden bonuses in Tetris Max, both worth a major amount of points. They’re hinted at in the game’s instructions, but have never been explained. Bonus 1 is worth an extra 2500 points if you clear a row that’s entirely made of a single color. Bonus 2 will gain you a hefty 10000 extra points if you clear the entire playfield, with no squares remaining visible. Each bonus has a special accompanying sound effect too. Go try it!

Pro Tip #2: Enable “accelerated left/right piece motion” in the game’s preferences. Without this you have virtually no chance of surviving at higher levels. It reduces the key repeat delay to almost nothing, so even at level 10 speeds you can hold down the J or L key and it’ll slam the piece into the side of the playfield before it falls too far.

Fabulous Prizes Can Be Yours

The winner of the live competition will receive a Macintosh Performa 460 system, recapped and recently restored, with an Apple Extended Keyboard II, mouse, and LCD monitor. This is a sweet system and I must be crazy for giving it away.

The history of this computer makes an interesting story. It was assembled from bits and pieces of several other computers and spare parts I’d had languishing in the closet for years. The motherboard was originally an LCIII, but was recapped with tantalum capacitors and modified to increase the clock speed from 25 MHz to 33 MHz. This is sometimes informally called an LCIII+ but it corresponds to the Performa 460. The case and power supply were donated by a dead Performa 405.

Hard disk? Yes, I had a spare working SCSI disk to donate to the cause. Floppy drive – are you kidding? Of course I already had too many to count, and could spare one for this system.

The keyboard is an Apple Extended Keyboard II in nice condition with all keys working. I recently got another one of these and don’t need two. The mouse is a regular Apple Desktop Bus Mouse II, the rounded style that was in use at the time this computer would have been new.

The monitor is a Viewsonic VG900b 19 inch 1280×1024 LCD. I purchased this LCD only a week ago and I’d planned to use it with my Mac IIci, but couldn’t get the sync settings working. It does work nicely with the multisync-capable video hardware in the P460, at either 640×480 or the Performa’s maximum resolution of 832×624 with thousands of colors. A Mac DA-15 to VGA monitor adapter is included with the prize system.

  • Performa 460 (in a Performa 405 case)
  • 33 MHz 68030, 4MB RAM, 768K VRAM
  • 80 MB SCSI HD with System 7.1 and custom software collection
  • Apple Extended Keyboard II
  • Apple Desktop Bus Mouse II
  • Viewsonic VG900b LCD monitor
  • VGA cable with DA-15 adapter
  • everything tested and working
  • Price: all this can be yours for the price of one Tetris Max high score

Do you have what it takes to set the high score? You’ve got two weeks to practice. Get going!

disclaimer: not responsible for causation of severe carpal tunnel syndrome

Read 2 comments and join the conversation 

ATX to Mac 10-pin Power Supply Adapter Kit

If you dabble with old computers, then you know the power supplies can fail just as often as the computers themselves. In the case of classic Macintosh computers, Apple didn’t use any kind of standard PSU, so buying new replacements isn’t possible. When a classic Mac PSU fails, the options are to recap and rebuild it, or make an adapter for another type of power supply. PC-style ATX supplies are cheap and readily available, and they offer the same +12V, +5V, -12V, and standby power outputs as Mac supplies. Wouldn’t an ATX-to-Mac PSU adapter be nice?

George Rudolf designed this simple ATX adapter and shared it on GitHub. It coverts a standard ATX 20-pin connector to the 10-pin connector found in the Macintosh IIcx, IIci, IIsi, IIvx, IIvi, Performa 600, Centris/Quadra 650, Quadra 800, and PowerMac 7100.

Aside from the different connectors, there’s also one small bit of active electronics on the adapter: an inverter for the ON signal. Classic Macs and PCs both support soft power, where the computer can be turned on from the keyboard or via software instead of with a hard on/off switch. This requires a power supply enable signal from a circuit using standby power, but the polarity of the ATX enable signal is the opposite of the Mac. Inverter to the rescue.

I was able to get 20 adapters assembled and shipped from JLCPCB for the princely sum of just $1.39 each. The connectors had to be sourced separately, but they’re readily available. Soldering the connectors only takes a few minutes, and they’re easy through-hole components.

I put together one of the 20 kits and installed it in my Macintosh IIci, and it worked great. I think it’s more useful for bench testing purposes than as a full PSU replacement, unless you want to go the extra mile of fashioning custom brackets to secure the ATX PSU inside the case.

For people who are attending Mactoberfest Meetup on October 14, I’ll have nineteen more of these ATX-to-Mac kits as free give-away items. You can assemble the kit right there at the meetup’s repair/work center. One of the Mactoberfest computer demos will also be a Mac IIci powered by an external ATX PSU, so you can see this adapter in action. I hope you enjoy these!

Read 6 comments and join the conversation 

ImageWriter II Printer Resurrected

I’ve had an ImageWriter II printer gathering dust in the back of my closet for at least a decade. Originally purchased at the Silicon Valley Electronics Flea Market for 25 cents, it was an obsolete anachronism even then, and the seller was desperate to get rid of it. It came home with me, but I never used it and the printer was quickly forgotten.

Recently I wondered: Will it still work? Have the internal capacitors leaked their caustic innards all over the PCB? Has the ink ribbon from Bill Clinton’s presidency ossified into solid rock? Will those tiny and fantastic dot-matrix pins be stuck forever in tar-like goo?

Somewhat shockingly, I discovered that you can still buy new ImageWriter II ink ribbons in 2023. And also continuous feed paper, with the tractor holes on the sides. You can even find newly-made Mini DIN 8 printer cables, if you know where to look.

It was a journey back in time, straining to remember setup steps that I’d last done 30 years ago. In the classic Mac OS, where is printer setup done? In the vaguely-named Chooser desk accessory? Is it supposed to show me a list of installed printers? Do I need driver software? Which classic Mac OS programs even support printing?

After a few minutes of awkward experiments, I discovered TeachText and its six glorious built-in bitmap fonts, with a choice of six specific font sizes. No Postscript, vector fonts, or arbitrary text size scaling here.

I typed a few lines of text, clicked the print button, and… nothing. Seconds passed, and I felt the sting of failure, but then the printer sprang to life. Hooray, success! I was rewarded for my efforts with a soothing bzzzt-bzzzt-bzzzt symphony of print head movement as the ImageWriter slowly processed the page. And I do mean slowly. Even in normal quality mode, it takes about a minute to print a single page of text. I shudder to imagine the speed of high-quality print mode.

We are spoiled with today’s laser printers that can render a full page in seconds. For now it’s fun to relive the world of 1980s printing. I feel like I should be writing an 8th grade history report about Julius Caesar and then creating Happy Birthday banners with Print Shop.

For people who are attending Mactoberfest Meetup on October 14, I’ll have a computer running MacWrite and connected to this Imagewriter, so you can experience the good old days too. Bring your school history report on a 3.5 inch floppy.

Read 2 comments and join the conversation 

Mactoberfest Bay Area Meetup is October 14!

Classic Macintosh fans, don’t miss your chance to revisit the halcyon days of Hypercard, desk accessories, and flying toasters! Mactoberfest Meetup is coming to the San Francisco Bay Area on Saturday October 14, hosted by Big Mess o’ Wires in Belmont California. Bring your classic Macintosh, your 1993 issues of MacUser magazine, your LocalTalk cables, and your test and repair tools. I’ve rented an old church building for the day, with enough space for about 50 to 100 of the Macintosh faithful. Come join the fun! And if you don’t live in California, steal a car and drive here. If you’re in jail, break out! You don’t want to miss this.

This is a meetup, so the main activities will be meeting other classic Macintosh fans and admiring everybody’s collection – hardware, media, collectibles, or anything else. If you feel that you don’t have anything special enough to be worth showing – don’t worry! A common Macintosh running an old popular game can make for great conversation.

What you’ll definitely find at Mactoberfest:

  • Rooms full of vintage Macintosh fanatics and crusty old computers
  • Display tables, chairs, electricity, bathrooms
  • Flea market – Items can be offered for sale at display tables or in the “marketplace corner”. Label your for-sale items with your name and phone number so that interested buyers can text you if you’re away from the table.
  • Freebies table – Got anything you can give away for free? Put your donations of extra disk drives, cables, adapters, and peripheral cards here. See something you like? Take it!
  • Workshop table – Stocked with soldering irons, tools, a multimeter, and maybe an oscilloscope or logic analyzer. Troubleshoot your broken computers here, or build a kit.
  • Kits – I’m donating some ATX PSU conversion kits that are easy to assemble with simple soldering. These kits can adapt a standard ATX power supply for use with the Macintosh IIcx, IIci, IIsi, IIvx, IIvi, Performa 600, Centris/Quadra 650, Quadra 800, or PowerMac 7100.
  • Tetris Max high score competition – It’s on! Warm up your wrists, the best score by the end of the day will win a complete vintage Macintosh system, including keyboard, mouse, and monitor. See the contest details and rules.
  • BMOW products – Buy any BMOW vintage computer product at Mactoberfest, and get it at the meetup.

What you’ll hopefully find at Mactoberfest:

  • A knowledgeable person at the workshop table to advise on repairs or kit assembly
  • LAN game competition – I nominate Bolo at 3:00 PM. Start practicing now!
  • Spontaneous ideas – System 6 trivia quiz? 2400 baud modem demos?

Please bear in mind there’s no “staff” for this meetup, and you’ll pay no admission fee. There’s only me and my desire to enjoy a fun day with other Macintosh nuts, but I definitely can’t do it all by myself. I need help from you! I’m happy to pay the building rental fee and other costs, but I need you to bring Mac-stuff to show, and to help coordinate some of the activities, and to chill out when things don’t go as planned. Set your expectations for a boisterous ad-hoc get-together, rather than a polished trade show experience, and we’ll get along just fine.

What you should bring:

  • Vintage computer hardware, media, and collectibles.
  • Extension cords and power strips for your computers – I definitely won’t have enough for everybody.
  • Items to sell in the flea market.
  • Soldering irons and tools like tweezers, cutters, and magnifiers. Multimeters and test equipment. Capacitors and components for common repairs.
  • Odds-and-ends to donate for the Freebies Table – How many old SCSI drives and spare motherboards do you really need, anyway? Stop hoarding them.
  • Kits and DIY stuff – Can you donate anything that ‘just needs assembly’, like a microcontroller kit or a set of replacement floppy drive gears? I’ll have the ATX conversion kits, but it would be fantastic to have other DIY stuff too.
  • Cool stuff you can donate as prizes for the Tetris Max competition.
  • Snacks, water, or drinks – Donations will be very appreciated.

How you can help:

Can you take a turn for an hour at the workshop table, helping somebody to troubleshoot a Sad Mac error code or recap a motherboard? How about organizing the LAN tournament? Or if you have another idea for a fun activity, great! Your willingness to help is the critical ingredient for the meetup’s success.

Details

MACTOBERFEST
Bay Area Classic Macintosh Meetup / Demo / Workshop / Swap-Meet / Tournament / Whatever
Hosted by Big Mess o’ Wires
Saturday October 14, 11:00am to 5:00pm
Belmont, California
(event address is on the RSVP form)

Please don’t forget to RSVP if you’re if you’re maybe, probably, or definitely planning to attend. This will help me keep track of who’s bringing what items, and the likely overall attendance level. The street address in Belmont is on the RSVP form.

RSVP here for Mactoberfest

You’ve got Mactoberfest questions! I will try to answer them. Leave a comment below, or shoot me an email. See you in a few weeks.

Read 12 comments and join the conversation 

A Tale of Three Bidirectional Level Shifters

Level shifters, voltage translators: whatever you call them, these devices are very handy when interfacing 5V and 3.3V logic for devices that aren’t 5V-tolerant. The 74LVC244 has long been my go-to solution for unidirectional 5V to 3.3V level shifting, and for 3.3V to 5V I’ll typically do nothing, since the 5V inputs generally work OK without shifting. But sometimes you need bidirectional level shifting with automatic direction sensing, and you may also want to step up those 3.3V signals to a full 5V. Enter three solutions from Texas Instruments: TXB0104, TXS0104, and TXS0108. These three chips all provide 4 or 8 channels of bidirectional level shifting with auto direction sensing, and at first glance they all seem very similar. But as I recently discovered, under the hood you’ll find significant differences in how they work and the types of applications they’re best suited for.

 
TXB0104

TI describes this chip as a “4-Bit Bidirectional Voltage-Level Translator With Automatic Direction Sensing.”

This TXB0104 4-bit noninverting translator uses two separate configurable power-supply rails. The A port is designed to track VCCA. VCCA accepts any supply voltage from 1.2 V to 3.6 V. The B port is designed to track VCCB. VCCB accepts any supply voltage from 1.65 V to 5.5 V. This allows for universal low-voltage bidirectional translation between any of the 1.2-V, 1.5-V, 1.8-V, 2.5-V, 3.3-V, and 5-V voltage nodes. VCCA must not exceed VCCB.

Power VCCA with 3.3V, power VCCB with 5V, and then it just works without any further configuration. Signals on pins A1..4 are propagated to pins B1..4 and vice-versa, while performing level shifting. But how? Scroll down to page 16 of the datasheet to find this block diagram of a single level shifter channel:

It’s complicated, but the most important thing here is that when the pins are treated as outputs, they’re actively driven to a high or low voltage with a pair of inverters. The output drive current is supplied by the TXB0104, through these inverters. When the pins are treated as inputs, the input signal is supplied to another inverter. In many ways it’s like the 74LVC245 except the direction is sensed automatically.

Elsewhere in the datasheet, it mentions a maximum data rate of 100 Mbps when VCCA is at least 2.5 volts.

 
TXS0104

Change a single letter in the part name, and you get TXS0104. What’s different? TI describes it as a “4-Bit Bidirectional Voltage-Level Translator for Open-Drain and Push-Pull Applications”. That sounds awfully similar to the TXB.

This 4-bit non-inverting translator uses two separate configurable power-supply rails. The A port is designed to track VCCA. VCCA accepts any supply voltage from 1.65 V to 3.6 V. VCCA must be less than or equal to VCCB. The B port is designed to track VCCB. VCCB accepts any supply voltage from 2.3 V to 5.5 V. This allows for low-voltage bidirectional translation between any of the 1.8-V, 2.5-V, 3.3-V, and 5-V voltage nodes.

That’s virtually identical to the text in the TXB datasheet. But the block diagram of a single level shifter channel reveals something that’s completely different!

The chip uses a pass transistor to connect the A and B pins. It’s the same basic concept as the classic single-transistor level shifter, commonly built with a BSS138 MOSFET, whose theory of operation is described in section 2.3.1 of this Philips application note. The drive current for low signals is supplied by the external device that’s driving the pin, and not by the TXS0104. For high signals, there’s a 10K pull-up resistor. The TXS0104 improves on the classic design by adding one-shots that can accelerate rising edge times compared to what’s possible with the pull-up alone.

This type of level shifter is best suited to open-drain applications like I2C communication, but can also be used with push-pull input signals that are actively driven high and low. The datasheet mentions a maximum data rate of 2 Mbps for open-drain and 24 Mbps for push-pull.

I won’t be using I2C, but I will be relying on the ability to put signals in a tri-state (floating) condition, and that’s something TXB0104 can’t really do. Yes the TXB has an enable input that can place the whole chip into a tri-state condition, but it requires a separate enable signal from my 3.3V microcontroller, and it doesn’t allow for individual signals to be tri-stated. But the TXS0104 supports this quite well. If a pin on the A side is tri-stated and left to float, the 10K pull-up will lift it to 3.3V, which turns off the pass transistor. Another 10K pull-up on the B side pin lifts it to 5V. This is a weak pull-up, so other devices on the 5V side can actively drive the signal high or low without problems. The TXB0104 can’t do this since it’s always actively driving the pin.

At least this is my analysis based on the datasheets, but I’m happy to be proven wrong here. Perhaps the TXB might also work if the A side is tri-stated and it auto-configures the data direction from B to A. As far as I can see, though, the TXS0104 looks like the best choice for my needs. 24 Mbps (with inputs driven push-pull) should be plenty fast enough, since my application only requires 1 or 2 Mbps at most.

 
TXS0108

Many people would assume the TXS0108 is simply an 8-bit version of the TXS0104, with twice as many channels but everything else the same. The datasheet seems to support this, calling it a “8-Bit Bi-directional, Level-Shifting, Voltage Translator for Open-Drain and Push-Pull Applications”:

This device is a 8-bit non-inverting level translator which uses two separate configurable power-supply rails. The A port tracks the VCCA pin supply voltage. The VCCA pin accepts any supply voltage between 1.4 V and 3.6 V. The B port tracks the VCCB pin supply voltage. The VCCB pin accepts any supply voltage between 1.65 V and 5.5 V. Two input supply pins allows for low Voltage bidirectional translation between any of the 1.5 V, 1.8 V, 2.5 V, 3.3 V, and 5 V voltage nodes.

But once again, the block diagram of a single level shifter channel reveals something that’s quite different from either the TXB0104 or TXS0104:

It’s conceptually similar to a TXS0104, but with many additions that are designed to support faster signal rates. Instead of a single one-shot to accelerate rising edges, there are separate one-shots to accelerate both rising and falling edges. The pull-up resistors aren’t fixed at 10K ohms anymore, but dynamically change their values depending on whether the signal is rising or falling. There’s also some extra resistance in series with the pass transistor.

The datasheet mentions a maximum data rate of 110 Mbps for push-pull, which is much faster than 24 Mbps on the TXS0104. Faster is better, right? Maybe not. The TXS0108 datasheet also contains a warning that’s not found in the TXS0104 datasheet:

PCB signal trace-lengths should be kept short enough such that the round trip delay of any reflection is less than the one-shot duration… The one-shot circuits have been designed to stay on for approximately 30 ns… With very heavy capacitive loads, the one-shot can time-out before the signal is driven fully to the positive rail… Both PCB trace length and connectors add to the capacitance of the TXS0108E output. Therefore, TI recommends that this lumped-load capacitance is considered in order to avoid one-shot retriggering, bus contention, output signal oscillations, or other adverse system-level affects.

Sparkfun sells a TXS0108 level shifter breakout board, and their hookup guide mentions struggling with this problem:

Some users may experience oscillations or “ringing” on communication lines (eg. SPI/I2C) that can inhibit communication between devices. Capacitance or inductance on the signal lines can cause the TXS0108E’s edge rate accelerators to detect false rising/falling edges.

When using the TXS0108E, we recommend keeping your wires between devices as short as possible as during testing we found even a 6″ wire like our standard jumper wires can cause this oscillation problem. Also make sure to disable any pull-up resistors on connected devices. When level shifting between I/O devices, this shifter works just fine over longer wires.

The TXS0108E is designed for short distance, high-speed applications so if you need a level shifter for a communication bus over a longer distance, we recommend one of our other level shifters.

This statement confuses me a bit. At first it says even a 6 inch wire is problematic, then it says it works just fine over longer wires, before concluding that you should choose a different solution if you need communication over a long distance. For disk emulation applications I may need to drive signals on a cable that’s several feet long. My take-away is that the TXS0108 is much more fiddly to use successfully than the TXS0104, and is prone to oscillation problems when circuit conditions aren’t ideal – which will probably be the case for me. Since I don’t need 110 Mbps communication, there’s no compelling reason for me to use the TXS0108 except the minor space and cost savings compared to a pair of TXS0104’s. I can run at slower speeds with a TXS0104 and hope to minimize problems with oscillations.

My conclusion? When selecting parts, read the datasheet, the whole datasheet. All three of these chips have nearly identical titles and descriptions on page 1, and it’s only after digging further down that their significant differences become apparent.

Read 3 comments and join the conversation 

« Newer PostsOlder Posts »