BMOW title
Floppy Emu banner

USB-to-ADB is not Dead

Long-time readers of this blog may remember a USB-to-ADB converter project that never made it past the concept stage. I wrote a series of posts about it last year, and made some decent progress with ADB emulation and USB host support. I ordered parts to build a second-generation prototype, but when they arrived, I let them sit on my desk collecting dust for 12 months. Until today.

The goal is to build a simple and reliable device for using modern USB peripherals with a vintage Macintosh or Apple IIgs computer. These classic machines normally use ADB peripherals, the Apple Desktop Bus. Last year I called this project “USB-to-ADB”, but that seemed to confuse many people into thinking it was for using ADB keyboards on a modern computer. In the hope of avoiding confusion, I’ve tentatively decided to rename this effort “Retro USB”. I welcome suggestions for better and less ambiguous names, especially names that somehow suggest a Mac and Apple II tie-in.

Today’s effort was about catching up to where I’d been a year ago. Using a breadboard and a bare PIC32MX230F256B, I assembled something more-or-less equivalent to the PIC32 USB Starter Kit board I’d used previously, and got it working. I also added an LCD screen for displaying diagnostic messages. Nothing terribly exciting yet, but it took me quite a long time just to get the PIC software installed, and learn how to wire up everything by hand for an LED blinker example.

PICs don’t seem to get much love in the hobby electronics world, so for those who didn’t read last year’s project posts, I’ll remind you how I ended up selecting the PIC32MX. To convert a USB keyboard and mouse to ADB, I need a microcontroller with USB Host support (uncommon, most only have USB Device support) and the ability to work with a USB hub, so a keyboard and mouse can be used simultaneously. This second requirement proved to be the more difficult one to meet, and the PIC32 series was the only one I found that had published sample code for accessing multiple USB devices through a HUB. In theory any microcontroller with USB Host could do it, since it’s “just software”, but I’m not interested in going deep into the bowels of writing my own USB stack.

I ran into a minor problem with the crystal oscillator. My example program worked fine with the PIC’s internal RC oscillator, but I couldn’t get it to work reliably with an external crystal and capacitors, as shown in the data sheet. It sort of worked sometimes, but was very flakey. I know crystal oscillator circuits are very sensitive to stray capacitance, and my breadboard circuits with their long component leads and loopy wires everywhere were probably too problematic. When I replaced the crystal circuit with an external clock in a can-type package, running at the same speed, it worked fine. I’m 95% sure this was just a breadboard problem, and if I reproduce the same crystal circuit on a well-designed PCB it will work fine.

It shouldn’t take me much longer to finish restoring the functionality I had with the old prototype, then I can finally begin the long-delayed work of stitching together the USB and ADB pieces of this project.

Read 5 comments and join the conversation 

5 Comments so far

  1. Keith Kaisershot April 18th, 2017 8:16 pm

    How about USB Emu? Pairs well with the other product in your retro Apple line. 😉

  2. Anonymous April 20th, 2017 6:32 am

    For you final design you might want to consider switching to a MEMS Oscillator… just because all you have to do is apply power and they oscillate… I’m considering this for some of my designs that have experienced problems with crystals.

    $0.70@QTY:100
    https://www.digikey.com/product-detail/en/microchip-technology/DSC6003JI2A-048.0000/DSC6003JI2A-048.0000-ND/6244477

  3. Steve April 20th, 2017 6:53 am

    Interesting, I’d never heard of MEMS oscillators before. Pretty cheap, too. I will probably stick with the crystal design, but it’s good to know about other options.

  4. rasz_pl April 20th, 2017 12:25 pm

    I probably said it last time, but you dont need hardware usb host (with hub support code no less) when you can bitbang two independent USB host ports on STM32 😉

  5. Jerry April 20th, 2017 6:06 pm

    The parasitic capacitance on those breadboards are amazingly high. It might just work on the breadboard without the caps.

    Where I used to work we went and took off all the crystal based circuits and used oscillator modules. We had some that just wouldn\’t start under certain conditions (in the field of course). It just wasn\’t worth it.

Leave a reply. Comments may not be monitored regularly. For product support questions, visit the Contact page.