Inverting the deposit switch in software

41 views
Skip to first unread message

Sven Moritz Hallberg

unread,
Jul 31, 2025, 2:29:42 PMJul 31
to PiDP-8
Hi all,

I made a post to the fossil forum on tangentsoft.com some months ago, but it has been stuck "awaiting moderator approval"...

I don't normally use this gmail account - is there any way to participate in this group with a regular email address?

Anyhow, below is a copy of my post:

I recently got the PiDP-8 kit and it's awesome!

However, I did not realize during the build that the Deposit switch is mounted in the opposite orientation on the real thing. Of course I had to turn it around! A stressful (but successful) bit of desoldering ensued...

Anyway, I patched the software to invert the signal, selected with a configure flag (--invert-dep).

I chose to introduce the inversion in the function report_ss() because it forms a bottleneck between the lower-level GPIO handling and its higher-level "user" code, so both sides can remain otherwise oblivious to this. The function is only called when the switch state actually changes (after debounce) so the extra code does not run on every scan.

Patch against Fossil trunk [3fee766e68] below. Tested with pidp8i-test.

Regards, pesco

PS: With this (not requiring a hardware mod), maybe a note could be placed in the build instructions about the possibility. It would have saved me some rework. ;)

invdep.patch
Reply all
Reply to author
Forward
0 new messages