• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

TashIO: Clone of BeeHive Technologies's ADB I/O

tashtari

PIC Whisperer
So I'm starting to think about a supplementary firmware design to TashIO, going for extended capabilities instead of full compatibility with the original. The mode of Port B where all the pins are analog allows the device to communicate whole bytes back to the Mac, and the write command to Port A that includes a delay allows the Mac to communicate a whole byte to the device, so I'm thinking I can take advantage of that and switch into the extended modes by means of a series of delay writes to Port A where the bytes spell out a word - very unlikely to happen unintentionally.

The 8-pin PIC12F1840 seems like a good candidate for this and could make a wide selection of capabilities available to Mac-side programmers, like UART, SPI, I2C, DAC, and PWM, in addition to emulating the basic GPIO and ADC capabilities of Port B.

Does anyone find this prospect interesting or is it a solution in search of a problem? =)
 

Melkhior

Well-known member
The 8-pin PIC12F1840 seems like a good candidate for this and could make a wide selection of capabilities available to Mac-side programmers, like UART, SPI, I2C, DAC, and PWM, in addition to emulating the basic GPIO and ADC capabilities of Port B.
I2C opens a lot of possibilities (starting with temperature monitoring), and PWM enables finer fan control among other things. The issue will be the software framework to leverage those. I've thought about adding I2C to NuBusFPGA (works fine in SBusFPGA for NetBSD/sparc), but so far haven't because unless running NetBSD there isn't going to be a driver or anything to do with it (and I've run out of pins).
 

tashtari

PIC Whisperer
The issue will be the software framework to leverage those.
Yeah, that's the rub. My thought was to add software support via trickery, staying within the confines of the existing protocol but repurposing Port A's delays and the analog reads of Port B to do more than was intended... but the more I plan it out, the less I like it. I feel like it'd be altogether better to start with a clean sheet, protocol wise, and contend with writing new XCMD/XFCNs and such.
 

Phipli

Well-known member
I've just put my order in for a batch of ADB I/O boards.

1668731222648.png

Also some ADB Hub boards, little overclocking boards (although I'm struggling to get the SMD clocks I need), some RAM and some test PDS relocator boards for Nubus Powermacs.
 

olePigeon

Well-known member
My brain isn't working right now so I can't remember the name, but I have a nifty surge protector that's controlled via the ADB port. Would this be ideal for something like that? Control some relays to turn on/off a power plug?

It's very useful for machines that don't have soft-power.
 

jeremywork

Well-known member
My brain isn't working right now so I can't remember the name, but I have a nifty surge protector that's controlled via the ADB port. Would this be ideal for something like that? Control some relays to turn on/off a power plug?

It's very useful for machines that don't have soft-power.
Sophisticated Circuits’ PowerKey / PowerKey Pro? IIRC there were early versions with a form factor designed more around the compact Macs.
 

Melkhior

Well-known member
Yeah, that's the rub. My thought was to add software support via trickery, staying within the confines of the existing protocol but repurposing Port A's delays and the analog reads of Port B to do more than was intended... but the more I plan it out, the less I like it. I feel like it'd be altogether better to start with a clean sheet, protocol wise, and contend with writing new XCMD/XFCNs and such.
Given how limited ADB is, running anything on top of it will be slow. But for I2C for instance, there's only a handful of registers needed to control the bus. The one I use only need 11 registers, one of which is 16 bits (usually split in 2 8-bits, Hi & Lo) and the other 8 bits (and looking at the driver, 3 seems unused). Maybe one could do an 'adb bridge', where registers #1 is an index and registers #2 is used as a data register ?
So to write to I2C register at 0x04, you'd write 0x04 to ADB register #1 then write whichever value to ADB register #2.
And to read to I2C register at 0x08, you'd write 0x08 to ADB register #1 then read whichever value from ADB register #2.
It would be very slow, but I suspect for e.g. connecting a LM75-compatible temperature sensor it would probably be enough... Basically emulating a memory-mapped device via indirect ADB accesses.
And any software on top of the I2C controller would be compatible with alternative implementations, typically truly memory-mapped I2C controller on a NuBus or a PDS card.
 

tashtari

PIC Whisperer
Maybe one could do an 'adb bridge', where registers #1 is an index and registers #2 is used as a data register ?
I was thinking along similar lines, though maybe at a lower level, to allow the user to select I2C or SPI or PWM or UART mode and configure pins and such... but that's the easy part (as far as I'm concerned). The hard part is building software support for these extended capabilities. I don't know how to write an XCMD/XFCN. =D

It'd be neat if someone was able to write a set of XCMD/XFCNs (at least, maybe other stuff too) just for general communications with the ADB - XCMDs for Flush and Listen, an XFCN for Talk...
 

Melkhior

Well-known member
@tashtari I was thinking more along the line of a dedicated "ADB-to-I2C" device, and then some "dedicated" software for some specific functions at first. Like something that would poll a "(ADB-to-I2C)-LM75" temperature controller every minute or so, and display the temperature in the menu bar or something similar (not even sure if you can easily display something in the menu bar in 7 and/or 8, I'm thinking of stuff available in more recent MacOS, maybe in a floating window or some other mechanisms). Something fairly basic to begin with.
But this probably should be in another thread, sorry.
 

aladds

Well-known member
It's working! I had a few hiccups and I'm going to need to do a new board revision due to:
  • Back to front TVS diodes
  • Missing connection between pins 2 and 13 of the "replacement" relays I've used (Littlefuse HE721A0500). I can join these on the PCB with no ill effects to the original relays or to the original optoisolators.
I'll put together a BOM too, since it's very nearly correct now. If anyone is interested in a PCB in the UK please let me know as I ordered 5 and I doubt I'll put all of them together. Note that of course these have the errors as above.

Enjoy this little chase sequence testing all of the outputs. I used the ADB 5v supply for the LEDs but I wouldn't use it for much more than that! I used the RealBasic project (with modifications) from here: http://web.archive.org/web/20010430141311/http://www.msystems.com/rb/ which needs the ADB I/O scripting addition from here: http://web.archive.org/web/19971210...com/BeeHive/ADB_IO/downloads.html#AppleScript - the download link for that actually works. I used RealBasic 3.2 since it's one of the last 68k releases and I'm very familiar with it; see attached! Very happy to share my modified project but honestly it's very quick and dirty code (isn't most BASIC? :D)

View attachment IMG_7518.MOV


EDIT: Fixed schematic/PCB layout attached

EDIT 2: CSV of the BOM attached. For some reason the forum blocks both ODS and CSV documents so I've also given it a .txt extension
 

Attachments

  • D312AFA1-3D39-43A1-BE58-697309D03A7E.jpeg
    D312AFA1-3D39-43A1-BE58-697309D03A7E.jpeg
    4.5 MB · Views: 23
  • 658191F4-4CF4-46F3-A7DB-F1F0B2067D76.jpeg
    658191F4-4CF4-46F3-A7DB-F1F0B2067D76.jpeg
    4.6 MB · Views: 22
  • E54EA5B6-14A5-4433-BA9B-D79C7C8291AB.jpeg
    E54EA5B6-14A5-4433-BA9B-D79C7C8291AB.jpeg
    2 MB · Views: 21
  • 25B05FF2-E431-4023-B4C4-87656300441B.jpeg
    25B05FF2-E431-4023-B4C4-87656300441B.jpeg
    1.6 MB · Views: 34
  • WaspIO-FixedTVSandRelay.zip
    3.2 MB · Views: 2
  • BOM.csv.txt
    421 bytes · Views: 5
Last edited:

Phipli

Well-known member
It's working! I had a few hiccups and I'm going to need to do a new board revision due to:
  • Back to front TVS diodes
  • Missing connection between pins 2 and 13 of the "replacement" relays I've used (Littlefuse HE721A0500). I can join these on the PCB with no ill effects to the original relays or to the original optoisolators.
I'll put together a BOM too, since it's very nearly correct now. If anyone is interested in a PCB in the UK please let me know as I ordered 5 and I doubt I'll put all of them together. Note that of course these have the errors as above.

Enjoy this little chase sequence testing all of the outputs. I used the ADB 5v supply for the LEDs but I wouldn't use it for much more than that! I used the RealBasic project (with modifications) from here: http://web.archive.org/web/20010430141311/http://www.msystems.com/rb/ which needs the ADB I/O scripting addition from here: http://web.archive.org/web/19971210...com/BeeHive/ADB_IO/downloads.html#AppleScript - the download link for that actually works. I used RealBasic 3.2 since it's one of the last 68k releases and I'm very familiar with it; see attached! Very happy to share my modified project but honestly it's very quick and dirty code (isn't most BASIC? :D)

View attachment 49551


EDIT: Fixed schematic/PCB layout attached

EDIT 2: CSV of the BOM attached. For some reason the forum blocks both ODS and CSV documents so I've also given it a .txt extension
Excellent work! I'm still waiting on my boards. I had some issues where they asked for a huge additional fee because I'd panalised a board, and I cancelled the whole order because I'd panalised all 5 boards I'd ordered and they weren't answering whether they'd treat the rest the same.

They say they'll be here by the 6th.
 

Phipli

Well-known member
Note!

For those following along at home, to compile TashTari's code, you need to download a non-current version of MPLAB X. The latest version has removed support for the assembler that the software is targeting, and so compilation fails.

Grab yourself version 5.35 of MPLAB X, as this is the last version that supports the project. Thankfully it supports Mac OS and Linux 64bit (as well as Windows).

Don't ask how I spent my day.

Also, turns out that the PicKit 3 doesn't power the chip, unlike my old PicKit 2. But I have a programmed chip :) I just need to wait for my PCBs to be delivered.
 

tashtari

PIC Whisperer
The latest version has removed support for the assembler that the software is targeting, and so compilation fails.
They removed support for MPASM? Those dirtbags. I'll have to add your instructions to the READMEs for my projects. Thanks for stumbling over this, hopefully others will be spared the pain...
 

Phipli

Well-known member
They removed support for MPASM? Those dirtbags. I'll have to add your instructions to the READMEs for my projects. Thanks for stumbling over this, hopefully others will be spared the pain...
All things considered, it could have been worse, at the point I gave up on the open source alternative and switched to trying to use MPLAB, I was expecting to need to run MPLAB in WINE, and then use a native Linux tool to flash the chips... one which doesn't support two byte chip ids and so you have to use some work around to ignore the chip id...

But yup, they've removed MPASM. Even more crazy, if you're going that new route, after you download MPLAB X, you can't actually do anything with it because they force you to get PIC-AS by installing their C compiler... even if you don't actually want it. You'd think they'd combine the packages if you can't use one without the other.
 

olePigeon

Well-known member
Think ADB would have enough power to run a small string of Christmas lights around your monitor? :) Bonus points to make it programmable. Just like the old "Holiday Lights" shareware, but real. :D
 

tashtari

PIC Whisperer
Think ADB would have enough power to run a small string of Christmas lights around your monitor?
Possibly! Though it'd have to be quite a small string, ADB is rated for max 100 mA per peripheral, 500 mA for all peripherals, if I recall correctly...
 

Phipli

Well-known member
Possibly! Though it'd have to be quite a small string, ADB is rated for max 100 mA per peripheral, 500 mA for all peripherals, if I recall correctly...
Think ADB would have enough power to run a small string of Christmas lights around your monitor? :) Bonus points to make it programmable. Just like the old "Holiday Lights" shareware, but real. :D
The TashIO designs are able to switch external loads, so you only need to power the relays, or transistors in mine.

You could do a 4 colour chase :)

Once my boards arrive I'll write it up if people want, in time for christmas.
 

aladds

Well-known member
Designed some nice front & back inserts for the box. Turns out adding a symbol which is already in a font makes it really easy to print, so since the ADB symbol is in the “MAC DING” font which is available on a few websites I was able to use that. Plus I used Garamond for the labels, although that doesn’t look especially good since I generally trade off time vs quality when I print (and indeed, note that the Vref hole is too low so I need to print it again anyway!)

STLs to follow :)
 

Attachments

  • F58BF9DF-42C0-4F17-B23D-61878122FA43.jpeg
    F58BF9DF-42C0-4F17-B23D-61878122FA43.jpeg
    3.4 MB · Views: 28
  • 5C5FE82D-6422-498C-9FDE-42441E884500.jpeg
    5C5FE82D-6422-498C-9FDE-42441E884500.jpeg
    3.4 MB · Views: 26
Top