I am putting a count-down timer by the hardware on Electronic Circuits Application Garage. Time range is 1 minute - 99 minutes. The timer is count-downed every second by hardware timer. During count-down, it controls a voltageless contact. It lights up an LED as the display during control.
The selection of the device is done by setting the output of the decoder into the PNP-type transistor(2SA1015).
The flow of the current through the transistor at the selected device is possible. The transistor of the device which isn't selected is detached from the circuit because it is in the OFF condition.
BCD switch (Input), Start switch (Input) and LED (Output) are controlled only by port B. According to the selected device, a mode of port B is changed.
As for the terminal of the BCD switch, the terminals become a short circuit condition each other with the specified figure. The illegal current flow through the BCD switch. The diodes are used to prevent from this.
The 7 segment LEDs are connected with port B,too, but the illegal current dosen't flow because LED itself is a diode.
When only one BCD-SW is connected with port B, this circuit is unnecessary. However, when more than one BCD-SW and 7 segment LED are connected, it is indispensable.
http://www.hobby-elec.org/e_pic6_3.htm