Close

Qualify the moduli

A project log for A Tiny Sieve | Lehmer's Math Machine in ATtinys

Until the late 1990s, this device outperformed general purpose computers at certain number theory problems.

kbsriramkbsriram • 09/12/2026 at 00:44•0 Comments

The boards are here, and they are smol!

Soldering headers across 30 cards is 240 joints, and any one could break the sieve silently. An open joint only costs time. More candidates survive, and the Pico has to check each one. A bridge to ground on VOTE is worse. The card will reject candidates that should pass, and the run ends without a solution.

On a shared bus, any of the thirty could be the culprit. I have to flash each card individually anyway, so I can also test each in isolation before flashing it.

Soldering headers

Soldering a right angle header on a small board like this can be tricky to keep the pcb aligned with the pins. I used a sacrificial female header under the ground side of the pcb, which is component free and flat. I inserted the right angle pins in another female header, which keeps the pcb in the same plane as the pins, and then solder the headers.

The test jig

The jig is just a small stripboard with two 8-pin male headers to secure it to a breadboard and a female header for the card under test. A Pico to test for open/shorts and a UPDI Friend to flash the code stay on the breadboard. The cards are never inserted or removed from the breadboard directly, avoiding damage over 30 cards.

The test software

I first flash test code that just leaves the four bus lines in high-Z with pullups, and blinks the LED as a visual check it works. The Pico drives each line low in turn and checks the others are still high. This find bridges between lines. It then releases everything and checks all lines are high. The pullups are in the tiny, so any open connection would stay low.

Here's a successful run.

==================================================
 Stage 2: Running electrical self-test via Pico
==================================================
Local directory . is mounted at /remote

==================================================
 ATtiny412 Flash-Time Self-Test Jig
==================================================
[1/4] Check 1: Shorts to GND ... [PASS]
[2/4] Check 2: Pin Bridges & VCC Shorts ... [PASS]
[3/4] Check 3: Open Circuits ... [PASS]
[4/4] Check 4: JP1 & PA7 Isolation (3.0s) ... [PASS]

==================================================
RESULT: ALL CHECKS PASSED.
Card is verified. Ready for final shipping image.
==================================================

Here's one with a failure, indicating a bridge between two pins.

==================================================
 Stage 2: Running electrical self-test via Pico
==================================================
Local directory . is mounted at /remote

==================================================
 ATtiny412 Flash-Time Self-Test Jig
==================================================
[1/4] Check 1: Shorts to GND ... [PASS]
[2/4] Check 2: Pin Bridges & VCC Shorts ... [FAIL]
  -> ERROR: Bridge detected: driving PA6 (H1-2) pulled down PA7 (H1-3)

--------------------------------------------------
RESULT: FAILED. Do NOT flash final image.
--------------------------------------------------

Finally, the real code is flashed over. There's more to say about the actual code, but I'll save that for the next log.

The code for the test jig is here on GitHub.

Here's a video of how using the test jig looks like.

Discussions