First cut at a power-down button for PiDP10 fails, but I see a clear route to a different solution

REPLICAS LIKE THE PiDP10 MAKE USE OF A RASPBERRY PI RUNNING LINUX

The base for these replicas is a version of the simh simulator running under Linux on a RPi, with the blinking lights and switches of the replica tied into the simulator. Like any machine running Linux, the coherence and integrity of file systems depends on all changes getting flushed out to permanent storage, in this case an SD card. 

A sudden drop of power can therefore result in a corrupted file system. Files can disappear, startup can be delayed by the need to attempt recovery with programs such as fsck, and over time it can lead to an unbootable system. The right way to avoid this is to do an intentional shutdown of Linux, which flushes out all buffers and thus ensures file system integrity. 

REPLICAS ARE OFTEN RUN WITHOUT A MONITOR AND KEYBOARD ATTACHED TO THE PI

This headless operation may involve the user connected via SSH, Telnet or serial terminal connections from another computer or terminal. In that case, the user can issue the shutdown now command to Linux for a graceful power off. 

On the other hand, headless operation may occur with no connections from other systems. In that case, an orderly shutdown is more complicated. The PiDP-8 and PiDP-11 replicas, also based on RPi boards, provide some button combinations on the replica panel to cause a shutdown of Linux. 

On the PiDP8, setting both Single Instruction and Start buttons on, then pressing and holding Single Step will issue the shutdown now to Linux on the RPi. On the PiDP-11, press the Halt switch down and push in on the Address knob at the same time to issue the shutdown now to Linux. 

YIKES - NO KEY COMBINATIONS FOR PiDP-10 TO ISSUE A SHUTDOWN NOW

However, the current state of the PiDP-10 is that one MUST have a terminal session to the RPi Linux in order to shut down gracefully. This can be via a monitor and keyboard or in headless mode by a remote connection from another computer. 

Where this presents problems is for a user that has no network and only wants a replica control panel to operate. This will be headless and without any remote access, thus offering no way to gracefully shut down Linux. A friend has bought an assembled PiDP-10 to use in this exact way. 

MY FIRST ATTEMPT TO PROVIDE SHUTDOWN

My first approach was the facility in RPi Linux for a GPIO shutdown. A switch connected to one of the general purpose IO pins can be sensed as a request for orderly shutdown. There is a simple change to the config.txt file to accomplish this. My first attempt was via such a change to the boot configuration, using the default GPIO3 pin. That pin was present on the back of the PiDP-10 as part of an I2C expansion port. 

When I first configured the OS for the kit and tried this, it shut down exactly as desired. However, once I added the PiDP-10 software into the system and fired up the replica, it no longer responded to the button. I realized that this GPIO3 is also used as the SCL pin of I2C and the PiDP-10 software runs I2C during its operation. 

FORTUNATELY, BOTH MY FRIEND AND I CHOOSE RASPBERRY PI 5 BOARDS

The Rpi 5 has a spot to add a connector on the board for a button that will do exactly what I wish. That is, if the button connects the two wires momentarily, the machine will issue a shutdown now to Linux if it is up and running, or if it is currently powered down it will boot up. 

Therefore I can salvage my pushbutton and move its wires over to the RPi connector. This does necessitate hooking up a connector to the RPi and then having the complementary connector wired to my pushbutton. A small bit of soldering, easily accomplished. 

AFTER TESTING THIS, I WILL PACKAGE UP THE BUTTON AND CONNECTORS

I have already set up the SD card for the friend, so that he can plug it into an RPi and bring up his PiDPD-10 as a headless replica. With the button he also has the means of providing for a safe and orderly power down of the replica. 

Comments

Popular posts from this blog

Bizarre behavior detected in a Raspberry Pi Pico based design and partially understood

Incompetent coders - the frustration of using Vivado to build FPGA designs

Found correct mod for the Arduino Mega 2560 to avoid powering it from USB