Вы находитесь на странице: 1из 2

SMALL CIRCUITSCOLLECTION

Hard Disk Selector 050


Switching from one operating system
K1 K2 K3
to another — that’s a risky business,
RESET 1 2 RESET 1 2 RESET 1 2
DD7 3 4 DD8 DD7 3 4 DD8 DD7 3 4 DD8 isn’t it? Although this may be a bit of
DD6 5 6 DD9 DD6 5 6 DD9 DD6 5 6 DD9 an exaggeration, the safest approach
DD5 7 8 DD10 DD5 7 8 DD10 DD5 7 8 DD10
DD4 9 10 DD11 DD4 9 10 DD11 DD4 9 10 DD11
is still to install two different operat-
DD3 11 12 DD12 DD3 11 12 DD12 DD3 11 12 DD12 ing systems on the same PC, so you
DD2 13 14 DD13 DD2 13 14 DD13 DD2 13 14 DD13
DD1 15 16 DD14 DD1 15 16 DD14 DD1 15 16 DD14
can always easily use the ‘old’ oper-
DD0 17 18 DD15 DD0 17 18 DD15 DD0 17 18 DD15 ating system if the new one fails to
19 20 19 20 19 20
meet your needs (or suit your taste).
DMARQ 21 22 DMARQ 21 22 DMARQ 21 22
DIOW 23 24 DIOW 23 24 DIOW 23 24 A software solution is often used for
DIOR 25 26 DIOR 25 26 DIOR 25 26 such a ‘dual system’. A program
IORDY 27 28 IORDY 27 28 IORDY 27 28
DMACK 29 30 DMACK 29 30 DMACK 29 30
called a ‘boot manager’ can be used
INTRQ 31 32 IOCS16 INTRQ 31 32 IOCS16 INTRQ 31 32 IOCS16 to allow the user to choose, during
DA1 33 34 PDIAG DA1 33 34 PDIAG DA1 33 34 PDIAG
DA0 35 36 DA2 DA0 35 36 DA2 DA0 35 36 DA2
the start-up process, which hard disk
CS0 37 38 CS1 CS0 37 38 CS1 CS0 37 38 CS1 will be used for starting up the com-
DASP 39 40 DASP 39 40 DASP 39 40
puter. Unfortunately, this does not
always work flawlessly, and in most
cases this boot manager is replaced
U+ by the standard boot loader of the
RESET
R5
operating system when a new oper-
ating system is installed. In many
10k

T1
BC557B
cases, the only remedy is to reinstall
U+
T2 the software.
R4
R1
R2
2k7 The solution presented here does not
15k

suffer from this problem. It is a hard-


10k

R3 BC547B
1k

ware solution that causes the pri-


5 1 D1
D
IC1.A
mary and secondary hard disk drives
3 C 2 to ‘swap places’ when the computer
S1 R S
R6
U+ is started up, if so desired. From the
4 6
perspective of the computer (and the
15k

R9
10k

T3 software running on the computer),


BC557B
IC1 = 4013 it appears as though these two hard
U+
R8
T4 disks have actually changed places.
9
D
13 2k7 This trick is made possible by a fea-
K4 IC1.B R7 BC547B ture of the IDE specification called
1k

R 11 C 12
14
B
IC1
C1
D2
‘CableSelect’. Every IDE hard disk
R S
B
7 100n 10 8 can be configured to use either Mas-
Y
ter/Slave or CableSelect. In the latter
034050 - 11
case, a signal on the IDE cable tells
the hard disk whether it is to act as
P. Goossens
the master or slave device. For this reason, in every IDE cable
In the last few years, the available range of operating systems one lead is interrupted between the connectors for the two
for PCs has increased dramatically. Various free (!) operating disk drives, or the relevant pin is omitted from the connector.
systems have been added to the list, such as BeOS, OpenBSD This causes a low level to be present on the CS pin of one of
and Linux. These systems are also available in different the drives and a high level to be present on the CS pin of the
colours and flavours (versions and distributions). Windows is other one (at the far end of the cable).
also no longer simply Windows, because there are now sev- The circuit shown here is connected to the IDE bus of the
eral different versions (Windows 95, 98, ME, NT and XP). Com- motherboard via connector K1. Most of the signals are fed
puter users thus have a large variety of options with regard to directly from K1 to the other connectors (K2 and K3). An IDE
the operating system to be used. One problem is that not all hard disk is connected to K2, and a second one is connected
hardware works equally well under the various operating sys- to K3. When the computer is switched on or reset, a pulse will
tems, and with regard to software, compatibility is far from appear on the RESET line of the IDE interface. This pulse
being universal. In other words, it’s difficult to make a good clocks flip-flop IC1a, and depending on the state of switch S1,
choice. the Q output will go either high or low. The state on the Q out-

Elektor Electronics 7-8/2003


SMALL CIRCUITSCOLLECTION
Y B B R
K1 K2 K3
HOEK1

HOEK3

K4 C1

R1

D2
D1
R2

IC1
S1
034050-1

034050-1 (C) ELEKTOR


ROTKELE )C( 1-050430

R6

R3
R7
T3 T1
R8
T2
R5

R9
T4

HOEK4
R4
HOEK2

COMPONENTS LIST through T1 will cause LED D1 to light up and transistor T2 to


yellow conduct. The hard disk attached to connector K2 will thus see
Resistors: D2 = LED, low-current, a low level on its CS pin, which will cause it to act as the mas-
R1 = 10kΩ green
ter drive and thus appear to the computer as the C: drive.
R2,R6 = 15kΩ IC1 = 4013
T1,T3 = BC557B A high level will appear on the Q output following the reset
R3,R7 = 1kΩ
R4,R8 = 2kΩ7 T2,T4 = BC547B pulse. This will prevent T3 and T4 from conducting, with the con-
R5,R9= 10kΩ sequence that LED D2 will be extinguished and the hard disk
Miscellaneous: attached to connector K3 will see a high level on its CS pin. For
Capacitors: K1,K2,K3 = 40-way this disk, this indicates that it is to act as a slave drive (D: drive).
C1 = 100 n boxheader If S1 is open when the reset pulse occurs, the above situation
K4 = 4-way SIL pinheader
Semiconductors: is of course reversed, and the hard disk attached to connector
S1 = switch, 1 make contact
D1 = LED, low-current, PCB, order code 034050-1 K2 will act as the D: drive, while the hard disk attached to con-
nector K3 will act as the C: drive.
Flip-flop IC1a is included here to prevent the hard disks from
put is naturally always the opposite of that on the Q output. swapping roles during use. This could have disastrous con-
If we assume that the switch is closed during start-up, a low sequences for the data on the hard disks, and it would most
level will be present on D input of IC1a, so the Q output will likely cause the computer to crash. This means that you do
be low following the reset pulse. This low level on the Q out- not have to worry about affecting the operation of the com-
put will cause transistor T1 to conduct. The current flowing puter if you change the switch setting while the computer is
running. The state of the flip-flop, and thus the con-
figuration of the hard disks, can only be changed
during a reset.
The circuit is powered from a power connector for a
3.5-inch drive. This advantage of using this connec-
tor is that it easily fits onto a standard 4-way header.
However, you must observe the correct polarity
when attaching the connector. The red lead must be
connected to pin 1.
Constructing the hard disk selector is easy if the
illustrated printed circuit board is used. You will
need three IDE cables to connect the circuit. The
best idea is to use short cables with only two con-
nectors, with all pins connected 1:1 (no interruption
in the CS line). The IDE connector on the mother-
board is connected to K1 using one cable. A cable
then runs from K2 to first hard disk, and another
cable runs from K3 to the second hard disk. This
means that it is not possible to connect more than
two hard disks to this circuit. You must also ensure
that the jumpers of both disk drives are configured
for CableSelect. To find out how to do this, refer to
the user manual(s) for the drives.
(034050-1)

7-8/2003 Elektor Electronics

Вам также может понравиться