Swap The Clock Chip On The Mac SE/30 With An ATTiny85

As [Phil Greenland] explains in the first part of his excellent write-up, the lithium battery used to keep the real-time clock (RTC) going on the Macintosh SE/30 has a nasty habit of exploding and leaking its corrosive innards all over the board. Looking to both repair the damage on a system that’s already had a battery popped and avoid the issue altogether on pristine boards, he started researching how he could replace the battery with something a bit more modern.

Damage from a ruptured RTC battery.

It turns out, the ATtiny85 is pin-compatible with the Mac’s original RTC chip, and indeed, [Andrew Makousky] had already written some code that would allow the microcontroller to emulate it. This is actually a bit more complex than you might realize, as the original RTC chip was doing double-duty: it also held 256 bytes of parameter random access memory (PRAM), which is where the machine stored assorted bits of info like which drive to boot from and the mouse cursor speed.

But after getting the mod installed, the computer refused to start. It turns out the project targeted earlier machines like the Macintosh Plus and SE, and not his higher-performance SE/30. Thanks to community resources like this KiCad recreation of the SE/30’s motherboard, contemporary technical documents, and his trusty logic analyzer, [Phil] was able to figure out that the timing was off — the code was simply struggling to respond to the faster machine.

[Phil] got things largely working by pushing a lot of the code off into an interrupt handler, thereby increasing the response time. But it operated on a very fine line, the new code only just got the timing within specs, and occasionally it would drift off and result in an error. It was good enough to get the machine up and running again, but not the long-term solution he’d hoped for.

It’s not until we get to the second part of this retrocomputing adventure that [Phil] finally cracks the case. He realized that the solution to get better performance out of the ATtiny85 was to leverage its universal serial interface (USI), which is generally used for SPI and I2C communications. Luckily, the Apple RTC protocol was close enough to I2C that getting everybody speaking the same language wouldn’t be a problem. The only downside was that he needed to use a different set of pins to pull it off.

In the end, he had to abandon the classic DIP-8 style ATtiny85 and design a tiny custom PCB around the SOIC-8 version. This not only let him route the pins differently, but enabled him to tack on an external crystal oscillator that boasts a bit higher resolution than the chip’s built-in facilities.

We’ve previously seen creative (or just desperate) hackers “re-pin” an ATtiny85 by flipping the leads around and adding bodge wires; a very literal hack that might have also worked here. But we think the custom PCB was worth the extra effort to produce a permanent drop-in solution that other Mac SE/30 owners can benefit from. After all, what some consider the best computer ever made deserves no less.

20 thoughts on “Swap The Clock Chip On The Mac SE/30 With An ATTiny85

    1. At least in the context of what “PC” meant at the time, they certainly are not PCs :)
      And I don’t think 80s Macs are particularly locked down, often there is more information in the official manuals than of PC clones from the same era.

      “Logic board” is the term Apple used in their own manuals. Do you have a particular reason why you think that we should prefer the term from IBM manuals instead?

      1. >The Macintosh SE/30 is a personal computer designed, manufactured and sold by Apple Computer from January 1989 to October 1991.
        >
        Making people actually think Macs are not just PCs was the biggest social engineering win for them.

          1. PC refers solely to HOW the machine is used and by whomst, as opposed to mainframes and AS/400, so you sort of refute your own argument. Adding IBM refers only to their ecosystem. Sometimes it is just easier to drop it than dig deeper.

          2. That’s the fine difference between a personal computer and an Personal Computer (PC). 😉

            The first one simply is a computer that can be used by a single person without the need to share it with others.

            This is from the days of mainframes and minicomputers, before microcomputers got so ubiquitous in our lives.

            Back then, a mainframe or host computer was attached to multiple teletypes or terminals, sharing its resources with multiple users.

            It also was the time when “CPU” referred not to the tiny microprocessor chip on your mainboard, but a big metal box (CPU, ALU etc were discreet components). That’s why old people keep calling the chassis of a tower PC “the CPU”. Sad, but true.

            The second one is associated with IBM©®™ compatible PCs, often. At least in the western world. In Japan, PC-88 and PC-98 (among others) also were true blue PCs, desbite being not IBM compatible.

            From our perspective, the PC-98 was an MS-DOS compatible, at least.

            That’s a category of PCs that’s being forgotten by history. PCs like the Sanyo MBC-555, DEC Rainbow, Zenith Z-100 or Sirius-1/Victor-9000 were MS-DOS compatibles, but not IBM PC compatibles.

            Of course, this definition by society isn’t completely correct, either. It merely turned into common knowledge.

            Certain microcomputers from the 70s or 80s were being called “Personal Computer” by their manufacturers, too. Say, the Commodore PET, the Apple II or the Sharp MZ-80K.

            These often were computers with a reasonable good mechanical keyboard and the ability to run CP/M, the first big OS for microcomputers. CP/M compatibility was sometimes provided by installing optional CPU cards.

            Unfortunately, all this regularly causes an argument between people or users of equally obsolete systems.

            Is the C64 a home computer, a Personal Computer or both?
            The official box art sometimes screamed “PERSONAL COMPUTER”, for example. In capitals, of course, to not to clearly fall into either category. ;)

            https://www.shutterstock.com/de/image-photo/7518-phoenix-arizona-commodore-64-early-1127896733

            Personally, I think the whole problem could be avoided if we’d simply use the British term, “Micro”.
            And that’s from me, someone from Germany. 😄

        1. Believe it or not, I knew someone who called it “Mutterbrett” all the time. He worked at Siemens, I vaguely remember. You know, the company which according to legends used the physical polarity in its schematics rather than the technical polarity. ;)

          “Grundkarte” was a real existing term, though.
          It was sometimes used in the late 80s to early 90s in Germany.
          In the days when English terms still had their German equivalents in daily life.

          Like Echtzeituhr (RTC), Zentralprozessor (CPU), numerischer Ko-Prozessor (FPU), Befehlsinterpreter (command.com) or Herkules-Karte (popular misspelling of Hercules Monochrome card) etc.
          Of course, “Mainboard” and “Hauptplatine” were also around.

    2. In the context of these macs however, it is very common to identify the two boards as analog and logic board respectively. Using the term mainboard would cause confusion since the two are fairly large in size and relevance.

      1. Thank you – as somebody who rebuilds compact Macs I was just about to write it similar :-)

        And yes, typical “PC users” are not necessarily familiar with the history and nomenclature of the classic 68×00 Macs ;-)

        1. Gerhard, I am curious – the restoration of classic Macs often runs aground on the need to replace the flyback transformer on the analog board. They seem unavailable these days. Do you have or know of any replacement or workaround? TIA.

  1. Just a minor detail, the article says: “… thereby increasing the response time”, but based on the context I think it should say “… thereby reducing the response time” or “… thereby increasing the response speed”, as the problem was the fix having to operate in a faster machine.

    Thanks for a greate article, a great hack and a great site.

    Best regards,
    A/P Daniel F. Larrosa
    Montevideo – Uruguay

Leave a Reply to Brian WeirCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.