Retro PC ATX PSU latch switch

My early 90ties retro PC project includes a flexATX PSU ( Power Supply Unit ) along with a micro ATX case . The power button on front of the micro ATX case is a push button, normally connected to an ITX mainboard, that in turn keeps the PSU PS-On signal active for the PSU to provide power. The old 90ties AT type mainboards dont control the PSU, so a small circuit is made to latch the PSU PS-On control signal via the micro ATX case power button.

The PSU purple wire provides 5V standby when the mains supply is connected.  The green wire PS-On is the PSU input control signal to enable power output. The control pin sinks approx. 0.4 mA when grounded in order to enable the PSU power output.

A simple circuit with a Attiny25/45/85 is used:

The C software is made with Atmel Studio 7 and flashing the Attiny25 ( or Attiny45 , Attiny85 )  goes on with an AVRISP mkII programmer.

When the PSU is powered off, a short push on the power button starts the PSU. To turn off the PSU, a long power button press of 1.5 second is required.

The software is to be seen here: ATX_Attiny_latch_switch_SW