Abstract:
A control unit of a peripheral device enables data to be exchanged between a unit of the peripheral device and one of a plurality of higher-order devices by using one of a plurality of interface units. Thus, the unit of the peripheral device is controlled by the higher-order device corresponding to the used interface unit.

Description:
BACKGROUND OF THE INVENTION  
         [0001]    1. Field of the Invention  
           [0002]    The present invention generally relates to a peripheral device, and more particularly, to a peripheral device controlled by a predetermined higher-order device so as to operate.  
           [0003]    2. Description of the Related Art  
           [0004]    Personal computers include a desktop computer and a notebook computer. Here, a description will be given, with reference to the drawings, of the desktop computer and the notebook computer.  
           [0005]    [0005]FIG. 1A and FIG. 1B illustrate conventional computers. FIG. 1A is a perspective view of a desktop computer  1 . FIG. 1B is a perspective view of a notebook (personal) computer  52 .  
           [0006]    The desktop computer  1  includes a computer body  11 , a keyboard  12 , a mouse  13 , and a display  14 . The keyboard  12 , the mouse  13  and the display  14  are connected to the computer body  11 . The computer body  11  executes programs according to commands from the keyboard  12  and the mouse  13 . The display  14  displays a screen, such as a screen showing a result of an operation performed in the computer body  11 .  
           [0007]    [0007]FIG. 2 is a block diagram of the computer body  11 .  
           [0008]    The computer body  11  includes a CPU (central processing unit) unit  21 , a CPU slot  22 , a system controller  23 , a memory  24 , a graphics controller  25 , an image output connector  26 , a PCI (peripheral component interconnect) bus  27 , PCI slots  28 , a bridge circuit  29 , a floppy disk drive (FDD) connector  30 , a floppy disk drive (FDD)  31 , an IDE (integrated device electronics) connector  32 , a hard disk drive (HDD)  33 , an IDE connector  34 , a CD-R/RW (compact disk-recordable/rewritable) drive  35 , ISA (industry standard architecture bus) slots  36 , a ROM (read only memory)  37 , USB (universal serial bus) connectors  38  and  39 , a power supply unit  40 , and a power supply switch  41 .  
           [0009]    The CPU slot  22  is a slot for mounting the CPU unit  21 ; thus, the CPU unit  21  is mounted on the CPU slot  22 . The CPU unit  21  mounted on the CPU slot  22  is connected to the system controller  23 . The CPU unit  21  incorporates a CPU, a secondary cache and so forth, and executes processes based on programs and data supplied from the system controller  23 .  
           [0010]    Besides the CPU slot  22 , the memory  24 , the graphics controller  25  and the PCI bus  27  are connected to the system controller  23 . The memory  24  is composed of a RAM so as to temporarily store programs and data, and is used as a working storage.  
           [0011]    The graphics controller  25  converts data supplied from the system controller  23  into image data of an RGB format, for example, and outputs the image data via the image output connector  26 . The image output connector  26  is connected to the display  14 . The display  14  displays a screen according to the image data from the image output connector  26 .  
           [0012]    The PCI slots  28  and the bridge circuit  29  are connected to the PCI bus  27 . The PCI bus  27  is a high-speed bus for exchanging data among the system controller  23 , the PCI slots  28  and the bridge circuit  29 . Various PCI devices, such as a modem, an audio processing board, an image processing board, can be mounted on the PCI slots  28 .  
           [0013]    Besides the PCI bus  27 , the floppy disk drive connector  30 , the IDE connectors  32  and  34 , the ISA slots  36 , the ROM  37 , and the USB connectors  38  and  39  are connected to the bridge circuit  29 . The bridge circuit  29  functions as a bridge for exchanging data among the PCI bus  27 , the floppy disk drive connector  30 , the IDE connectors  32  and  34 , the ISA slots  36 , the ROM  37 , and the USB connectors  38  and  39 .  
           [0014]    The floppy disk drive  31  is connected to the floppy disk drive connector  30 . A floppy disk can be mounted and dismounted on/from the floppy disk drive  31 . The floppy disk drive  31  exchanges data with the floppy disk. The hard disk drive  33  is connected to the IDE connector  32 . The hard disk drive  33  stores an OS, programs and data.  
           [0015]    The CD-R/RW drive  35  is connected to the IDE connector  34 . A CD-ROM disk and a CD-R/RW disk can be mounted and dismounted on/from the CD-R/RW drive  35 . The CD-R/RW drive  35  exchanges data with the CD-ROM disk and the CD-R/RW disk.  
           [0016]    ISA devices are mounted on the ISA slots  36 . The ROM  37  stores a BIOS and a variety of setting data for starting the device. The keyboard  12  and the mouse  13  are connected to the USB connector  38 . USB devices can be mounted on the USB connector  39 .  
           [0017]    The power supply unit  40  is supplied with a commercial power. When the power supply switch  41  is turned on, the power supply unit  40  generates a direct current power from the commercial power, and supplies the direct current power to the floppy disk drive  31 , the hard disk drive  33  and the CD-R/RW drive  35 , and also supplies a driving power to a circuit unit. The floppy disk drive  31 , the hard disk drive  33  and the CD-R/RW drive  35  are driven by the direct current power supplied from the power supply unit  40 . When the power supply switch  41  is turned off, the power supply unit  40  stops supplying the direct current power to each of the units (drives). That is, when the power supply switch  41  of the computer body  11  is turned off, the power supply to the CD-R/RW drive  35  is stopped; and when the power supply switch  41  of the computer body  11  is turned on, the power is supplied to the CD-R/RW drive  35  so that the CD-R/RW drive  35  becomes drivable.  
           [0018]    In this course, when the OS is started upon the power supply switch  41  being turned on so that the floppy disk drive  31 , the hard disk drive  33  and the CD-R/RW drive  35  are recognized by the OS, the floppy disk drive  31 , the hard disk drive  33  and the CD-R/RW drive  35  are managed under the OS such that the floppy disk drive  31 , the hard disk drive  33  and the CD-R/RW drive  35 -can be controlled by application programs on the OS.  
           [0019]    On the other hand, when a user intends to use a CD-R/RW drive with the notebook personal computer  52  incorporating no CD-R/RW drive, an exterior CD-R/RW drive  51  needs to be used, as shown in FIG. 1B, for example.  
           [0020]    The CD-R/RW drive  51  is connected to a USB connector  53  of the notebook personal computer  52  by a USB cable  54 , for example. Besides, the CD-R/RW drive  51  is driven by a direct current power generated from an alternating current commercial power by an AC adaptor  55 .  
           [0021]    When the CD-R/RW drive  51  is connected to the USB connector  53  of the notebook personal computer  52  by the USB cable  54 , the CD-R/RW drive  51  is recognized by an OS of the notebook personal computer  52  so that the CD-R/RW drive  51  operates under management of the notebook personal computer  52 .  
           [0022]    In such conventional personal computers as described-above, however, when a drive is recognized by an OS, the drive is controlled in operation under management of the OS; therefore, it has been impossible for the drive to be shared among a plurality of personal computers. Thus, it has not been arranged that a drive incorporated in a desktop personal computer be connected to and used by another personal computer.  
           [0023]    Accordingly, when a user intends to use a drive with a notebook computer system, an exterior drive has had to be purchased separately, although a drive is incorporated in a desktop computer system.  
         SUMMARY OF THE INVENTION  
         [0024]    It is a general object of the present invention to provide an improved and useful peripheral device in which the above-mentioned problems are eliminated.  
           [0025]    A more specific object of the present invention is to provide a peripheral device having a simple structure including a unit capable of being shared among a plurality of higher-order devices by a simple operation.  
           [0026]    In order to achieve the above-mentioned objects, there is provided according to one aspect of the present invention a peripheral device comprising a unit controlled by a higher-order device, a plurality of interface units enabling data to be exchanged between the unit and the higher-order device, and a control unit enabling data to be exchanged between the unit and the higher-order device by using one of the interface units.  
           [0027]    According to the present invention, a unit of a peripheral device can be shared among a plurality of higher-order devices.  
           [0028]    Other objects, features and advantages of the present invention will become more apparent from the following detailed description when read in conjunction with the accompanying drawings. 
       
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0029]    [0029]FIG. 1A is a perspective view of a conventional desktop computer;  
         [0030]    [0030]FIG. 1B is a perspective view of a conventional notebook computer;  
         [0031]    [0031]FIG. 2 is a block diagram of a computer body shown in FIG. 1A;  
         [0032]    [0032]FIG. 3 is a system configuration diagram of a desktop personal computer according to an embodiment of the present invention;  
         [0033]    [0033]FIG. 4 is a block diagram of the desktop personal computer shown in FIG. 3;,  
         [0034]    [0034]FIG. 5 is a perspective view of a CD-R/RW drive shown in FIG. 3;  
         [0035]    [0035]FIG. 6 is a block diagram of the CD-R/RW drive shown in FIG. 5;  
         [0036]    [0036]FIG. 7 is an operational flowchart of a process conducted by an MPU of the CD-R/RW drive shown in FIG. 6;  
         [0037]    [0037]FIG. 8 is a block diagram of a first variation of the CD-R/RW drive;  
         [0038]    [0038]FIG. 9 and FIG. 10 are flowcharts of a process conducted by the MPU according to the present variation;  
         [0039]    [0039]FIG. 11 is a flowchart of an eject process;  
         [0040]    [0040]FIG. 12 is a block diagram of a second variation of the CD-R/RW drive;  
         [0041]    [0041]FIG. 13 is a process flowchart of the second variation;  
         [0042]    [0042]FIG. 14 is a block diagram of a third variation of the CD-R/RW drive; and  
         [0043]    [0043]FIG. 15 and FIG. 16 are process flowcharts of the third variation. 
     
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0044]    A description will now be given of a peripheral device according to the present invention by taking a built-in CD-R/RW drive incorporated in a desktop computer system as an example thereof.  
         [0045]    [0045]FIG. 3 is a system configuration diagram of a desktop personal computer  100  according to an embodiment of the present invention. FIG. 4 is a block diagram of the desktop personal computer  100 . Elements in FIG. 3 and FIG. 4 that are identical to the elements shown in FIG. 1A to FIG. 2 are referenced by the same reference marks, and will not be described in detail.  
         [0046]    The desktop personal computer  100  according to the present embodiment is different from the desktop (personal) computer  1  shown in FIG. 1A to FIG. 2 in regard of a configuration of a CD-R/RW drive  101 . The CD-R/RW drive  101  is incorporated in the computer body  11  according to the present embodiment. The CD-R/RW drive  101  is connected via an IDE cable  102  to the IDE connector  34  incorporated in the computer body  11 , and is connected via a power supply cable  103  to the power supply unit  40  incorporated in the computer body  11 . The CD-R/RW drive  101 , connected with the IDE cable  102  and the power supply cable  103 , is mounted on an extension bay  11   b  formed in a front panel  11   a  of the computer body  11 . When the CD-R/RW drive  101  is mounted on the extension bay  11   b  of the computer body  11 , the surface of a front panel  104  of the CD-R/RW drive  101  is exposed from the front panel  11   a  of the computer body  11 .  
         [0047]    Next, a description will be given of the configuration of the CD-R/RW drive  101 .  
         [0048]    [0048]FIG. 5 is a perspective view of the CD-R/RW drive  101 . FIG. 6 is a block diagram of the CD-R/RW drive  101 .  
         [0049]    The CD-R/RW drive  101  includes a tray  111 , a loading motor  112 , a turntable  113 , a spindle motor  114 , a pickup  115 , a sled motor  116 , a laser driver  117 , an RF (radio frequency; high frequency) amplifier  118 , a servo circuit  119 , an encode/decode circuit  120 , an MPU (micro-processing unit)  121 , a ROM  122 , a gate circuit  123 , an IDE connector  124  (an interface unit), a USB-ATAPI (advanced technology attachment packet interface) conversion circuit  125 , a USB connector  126  (an interface unit), a switch  127 , a tray open/close switch (an eject switch; an eject button)  128 , a tray open/close detection unit  129 , a power supply circuit  130 , and a power supply connector  131 . At least the MPU  121  composes a control unit. At least the switch  127  composes a selection unit.  
         [0050]    In a state where the tray  111  is pulled out, a disk  132  is mounted. When the tray open/close switch  128  is operated in the state where the tray  111  is pulled out, the MPU  121  recognizes this operation so that the loading motor  112  is driven. The tray  111  engages the loading motor  112 ; therefore, when the loading motor  112  is driven, the tray  111  is thereby pulled into the device (the CD-R/RW drive  101 ).  
         [0051]    When the tray  111  is pulled into the device, the disk  132  is mounted on the turntable  113 . The turntable  113  is fixed to a rotary shaft of the spindle motor  114  so that the turntable  113  rotates with the rotation of the spindle motor  114 . The spindle motor  114  rotates at a predetermined rotation speed by a driving signal from the servo circuit  119 . The turntable  113  rotates due to the rotation of the spindle motor  114  so that the disk  132  rotates at the predetermined rotation speed.  
         [0052]    Additionally, when the disk  132  is mounted on the turntable  113 , the pickup  115  is positioned opposite the disk  132 . The pickup  115  incorporates a laser diode and a photodetector not shown in the figure so as to apply a laser beam emitted from the laser diode onto the disk  132 , and detect the reflected light by the photodetector. A detection signal detected by the pickup  115  is supplied to the RF amplifier  118 . The RF amplifier  118  amplifies the detection signal supplied from the pickup  115 , and supplies the amplified detection signal to the servo circuit  119  and to the encode/decode circuit  120 .  
         [0053]    The encode/decode circuit  120  demodulates the signal detected by the pickup  115  so as to decode data represented by the signal, and performs a control for an interface compliant to ATAPI. The decoded data is supplied to the gate circuit  123  and the conversion circuit  125 .  
         [0054]    The gate circuit  123  is controlled by the MPU  121 , and connects or disconnects the encode/decode circuit  120  and the IDE connector  124 . The conversion circuit  125  is connected between the USB connector  126  and the encode/decode circuit  120  so as to convert data between the USB connector  126  and the encode/decode circuit  120 . Besides, the conversion circuit  125  is controlled by the MPU  121  so as to enable/disenable operations thereof.  
         [0055]    The MPU  121  operates on firmware stored in the ROM  122  so as to control the CD-R/RW drive  101  as a whole.  
         [0056]    The IDE connector  124  is provided at a backside of the CD-R/RW drive  101 , and is connected to the IDE connector  34  by the IDE cable  102 . Besides, the position for providing the IDE connector  124  is not limited to the backside of the CD-R/RW drive  101 , and may be a position inside the computer body  11  where the IDE cable  102  can be connected.  
         [0057]    The USB connector  126  is a B-type USB connector for example, and can be engaged to a B-type USB connector end of a USB cable  105 . The USB connector  126  is so mounted as to be exposed at the front surface of the front panel  104 , as shown in FIG. 5.  
         [0058]    The switch  127  is composed of a slide switch, and is so mounted as to be exposed at the front surface of the front panel  104 . The switch  127  is so mounted that an operation part thereof does not protrude from the front surface of the front panel  104 . For instance, the switch  127  is so mounted as to recede from the-front surface of the front panel  104 , or a part of the front panel  104  around the switch  127  is formed in a protruding form. Thereby, the switch  127  can be prevented from being operated erroneously.  
         [0059]    The eject switch  128  is a push switch which is operated upon pulling out the tray  111  and housing the tray  111  into the device. An eject process as described hereinafter is executed by the eject switch  128 .  
         [0060]    Besides, in the CD-R/RW drive  101  according to the present embodiment, the USB connector  126 , the switch  127  and the eject switch  128  are provided at the front surface of the front panel  104 , because the front surface of the front panel  104  is exposed from the front surface of the computer body  11 ; accordingly, the positions for providing the USB connector  126 , the switch  127  and the eject switch  128  are not limited to the front surface of the front panel  104 , and may be other positions of the CD-R/RW drive  101  which are exposed from the computer body  11 .  
         [0061]    [0061]FIG. 7 is an operational flowchart of a process conducted by the MPU  121  of the CD-R/RW drive  101 .  
         [0062]    When the power is supplied from the power supply unit  40  of the computer body  11  to the power supply circuit  130  in step S 1 - 1 , the MPU  121  turns off the gate circuit  123 , and disenables the conversion circuit  125  in step S 1 - 2 . Next, the MPU  121  judges whether the switch  127  is on or off in step S 1 - 3 .  
         [0063]    When the switch  127  is off in step S 1 - 3 , the MPU  121  judges that the CD-R/RW drive  101  is used as a drive of the computer body  11 . Then, the MPU  121  turns on the gate circuit  123  so as to connect the IDE connector  124  to the encode/decode circuit  120  in step S 1 - 4 , and brings the drive into operation in step S 1 - 5 .  
         [0064]    Thus, the CD-R/RW drive  101  is recognized by the computer body  11 , and operates as the drive of the computer body  11 .  
         [0065]    On the other hand, when the switch  127  is on in step S 1 - 3 , the MPU  121  judges that the CD-R/RW drive  101  is used as a drive of a computer connected to the USB connector  126 . Then, the MPU  121  enables the conversion circuit  125  in step S 1 - 6 . By enabling the conversion circuit  125 , the USB connector  126  is connected to the encode/decode circuit  120 . Subsequently, the MPU  121  brings the drive into operation in step S 1 - 5  in the state where the USB connector  126  is connected to the encode/decode circuit  120  via the conversion circuit  125 .  
         [0066]    Thus, the CD-R/RW drive  101  operates as the drive of the computer connected to the USB connector  126 .  
         [0067]    Accordingly, upon switching the connection of the CD-R/RW drive  101 , the OS of the computer body  11  is closed, and the power supply is stopped; thereafter, the switch  127  is turned on/off; and thereafter, the power supply of the computer body  11  is applied again. When the switch  127  is on, the CD-R/RW drive  101  operates as the drive of the computer connected to the USB connector  126  with the USB connector  126  functioning as an interface therewith. When the switch  127  is off, the CD-R/RW drive  101  operates as the drive of the computer body  11  with the IDE connector  124  functioning as an interface therewith.  
         [0068]    Besides, in the present invention, upon switching the connection of the CD-R/RW drive  101 , the OS of the computer body  11  is restarted; however, it is also possible to switch the connection of the CD-R/RW drive  101  at any time.  
         [0069]    [0069]FIG. 8 is a block diagram of a first variation of the CD-R/RW drive. Elements in FIG. 8 that are identical to the elements shown in FIG. 6 are referenced by the same reference marks, and will not be described in detail.  
         [0070]    A CD-R/RW drive  200  according to the present variation further includes a connection switching circuit  201  and a response circuit  202 , and the process conducted by the MPU  121  is changed. The IDE connector  124  is connected to an A-terminal of the connection switching circuit  201 . The conversion circuit  125  is connected to a B-terminal of the connection switching circuit  201 . The response circuit  202  is connected to an X-terminal of the connection switching circuit  201 . The encode/decode circuit  120  is connected to a Y-terminal of the connection switching circuit  201 . The connection switching circuit  201  switches connections between the A/B-terminal and the X/Y-terminal according to a switching signal supplied from the MPU  121 .  
         [0071]    When the switching signal supplied from the MPU  121  is high-level, the connection switching circuit  201  connects the A-terminal to the X-terminal, and connects the B-terminal to the Y-terminal. On the other hand, when the switching signal supplied from the MPU  121  is low-level, the connection switching circuit  201  connects the A-terminal to the Y-terminal, and connects the B-terminal to the X-terminal. The response circuit  202  is connected to the X-terminal of the connection switching circuit  201 . Upon receiving a request command, such as a read or write command, from the X-terminal, the response circuit  202  supplies the X-terminal with a response command to the effect that no disk is present.  
         [0072]    Next, a description will be given of the process conducted by the MPU  121 .  
         [0073]    [0073]FIG. 9 and FIG. 10 are flowcharts of the process conducted by the MPU  121  according to the present variation.  
         [0074]    When the power supply of the computer body  11  is turned on, and the power is supplied from the computer body  11  to the power supply circuit  130  in step S 2 - 1 , the MPU  121  judges whether the switch  127  is on or off in step S 2 - 2 .  
         [0075]    When the switch  127  is judged to be off in step S 2 - 2 , the MPU  121  makes the switching signal to supply to the connection switching circuit  201  low-level in step S 2 - 3 . According to the switching signal, the connection switching circuit  201  connects the A-terminal to the Y-terminal, and connects the B-terminal to the X-terminal. In this state, the IDE connector  124  is connected to the encode/decode circuit  120 , and the conversion circuit  125  is connected to the response circuit  202 .  
         [0076]    On the other hand, when the switch  127  is judged to be on in step S 2 - 2 , the MPU  121  makes the switching signal to supply to the connection switching circuit  201  high-level in step S 2 - 4 . According to the switching signal, the connection switching circuit  201  connects the A-terminal to the X-terminal, and connects the B-terminal to the Y-terminal. In this state, the IDE connector  124  is connected to the response circuit  202 , and the conversion circuit  125  is connected to the encode/decode circuit  120 .  
         [0077]    Next, in step S 2 - 5 , it is judged whether or not the disk  132  is recognized. When the disk  132  is recognized in step S 2 - 5 , the CD-R/RW drive  200  is caused to start operating in step S 2 - 6 .  
         [0078]    When the disk  132  is not recognized in step S 2 - 5 , or when the CD-R/RW drive  200  is being operated in step S 2 - 6 , the MPU  121  judges in step S 2 - 7  whether or not the disk  132  is recognized. When the disk  132  is recognized in step S 2 - 7 ,,the MPU  121  judges in step S 2 - 8  whether or not the response circuit  202  receives a request.  
         [0079]    When the response circuit  202  receives a request in step S 2 - 8 , the MPU  121  causes the response circuit  202  to respond to the effect that the disk is not recognized, in step S 2 - 9 . When the encode/decode circuit  120  receives a request in step S 2 - 10 , the MPU  121  executes operations according to the request in step S 2 - 11 , and thereafter, the process returns to step S 2 - 7 . When the eject process is performed in step S 2 - 12 , the process returns to step S 2 - 7 .  
         [0080]    Here, a description will be given of the eject process.  
         [0081]    [0081]FIG. 11 is a flowchart of the eject process.  
         [0082]    In the eject process, it is judged whether or not the eject button  128  is operated in step S 3 - 1 . When the eject button  128  is operated in step S 3 - 1 , it is judged in step S 3 - 2  whether the tray  111  is open or close according to a detection signal supplied from the tray open/close detection unit  129 .  
         [0083]    When it is judged in step S 3 - 2  that the tray  111  is open, the MPU  121  controls the loading motor  112  to close the tray  111  in step S 3 - 3 , whereby the process ends.  
         [0084]    When it is judged in step S 3 - 2  that the tray  111  is close, it is judged whether or not the tray  111  is in an ejectable state in step S 3 - 4 . When the tray  111  is in an ejectable state in step S 3 - 4 , the MPU  121  controls the loading motor  112  to open the tray  111  in step S 3 - 5 , whereby the process ends. On the other hand, when the tray  111  is not in an ejectable state in step S 3 - 4 , the process ends.  
         [0085]    Thus, the eject process is finished.  
         [0086]    Here, the description will be continued of the process being described above with reference to FIG. 9 and FIG. 10.  
         [0087]    When the disk  132  is not recognized in step S 2 - 7 , it is judged in step S 2 - 13  whether or not the response circuit  202  receives a request. When the response circuit  202  receives a request in step S 2 - 13 , the MPU  121  causes the response circuit  202  to respond to the effect that the disk is not recognized, in step S 2 - 14 . When the encode/decode circuit  120  receives a request in step S 2 - 15 , the MPU  121  executes operations according to the request in step S 2 - 16 .  
         [0088]    When the eject process is performed in step S 2 - 17 , the MPU  121  judges in step S 2 - 18  whether or not the disk  132  is recognized. When the disk  132  is judged to be not recognized in step S 2 - 18 , the process returns to and continues from step S 2 - 13 . On the other hand, when the disk  132  is recognized in step S 2 - 18 , the process returns to and continues from step S 2 - 2 . An exchange of the disk  132  can be recognized by the foregoing step S 2 - 17  and step S 2 - 18 .  
         [0089]    Thus, according to the present variation, upon applying the power or exchanging the disk, the switch  127  is judged to be whether on or off so that the connection switching circuit  201  switches the connections. Accordingly, by turning on/off the switch  127  prior to exchanging the disk, the IDE connector  124  and the USB connector  126  can be switched without restarting the computer body  11 .  
         [0090]    Besides, in the above-described embodiment, the connections between the encode/decode circuit  120  and each of the IDE connector  124  and the USB connector  126  are switched by turning on/off the switch  127 ; however, the connections may be switched when a computer is connected to the USB connector  126 , and the computer body  11  is restarted, or when the disk is exchanged.  
         [0091]    [0091]FIG. 12 is a block diagram of a second variation of the CD-R/RW drive according to the present embodiment. Elements in FIG. 12 that are identical to the elements shown in FIG. 6 are referenced by the same reference marks, and will not be described in detail.  
         [0092]    A CD-R/RW drive  300  according to the present variation comprises a voltage detection circuit  301  in place of the switch  127  of the CD-R/RW drive  101  shown in FIG. 6. At least the voltage detection circuit  301  composes a selection unit. It is arranged that, when a computer is connected to the USB connector  126 , a voltage of 5 [V] is impressed between a power supply terminal and a ground terminal of the USB connector  126 . The voltage detection circuit  301  detects the voltage impressed between the power supply terminal and the ground terminal of the USB connector  126  so as to switch the connections between the encode/decode circuit  120  and each of the IDE connector  124  and the USB connector  126 .  
         [0093]    The voltage detection circuit  301  is connected between the power supply terminal and the ground terminal of the USB connector  126 . The voltage detection circuit  301  detects the voltage between the power supply terminal and the ground terminal, and compares the detected voltage with a reference voltage so as to output a result of the comparison. When the voltage between the power supply terminal and the ground terminal is larger than the reference voltage of 3 volts, for example, the voltage detection circuit  301  outputs a high-level signal. When the voltage between the power supply terminal and the ground terminal is smaller than 3 volts, the voltage detection circuit  301  outputs a low-level signal. The output of the voltage detection circuit  301  is supplied to the MPU  121 .  
         [0094]    [0094]FIG. 13 is a process flowchart of the second variation according to the present embodiment. Elements in FIG. 13 that are identical to the elements shown in FIG. 7 are referenced by the same reference marks, and will not be described in detail.  
         [0095]    In place of the judgment of whether the switch  127  is on or off made in step S 1 - 3  shown in FIG. 7, the output of the voltage detection circuit  301  is used in making the following judgment. That is, when the output of the voltage detection circuit  301  is high-level in step S 1 - 11 , step S 1 - 6  is performed because it can be judged that a computer is connected to the USB connector  126 . On the other hand, when the output of the voltage detection circuit  301  is low-level in step S 1 - 11 , step S 1 - 4  is performed because it can be judged that no computer is connected to the USB connector  126 .  
         [0096]    According to the present variation, inserting a USB cable from a computer into the USB connector  126  enables an automatic switching of the connection to the computer.  
         [0097]    Besides, in place of the switch  127 , the method of detecting a computer being connected to the USB connector  126  is applicable to the first variation.  
         [0098]    [0098]FIG. 14 is a block diagram of a third variation of the CD-R/RW drive according to the present embodiment. Elements in FIG. 14 that are identical to the elements shown in FIG. 8 are referenced by the same reference marks, and will not be described in detail.  
         [0099]    A CD-R/RW drive  400  according to the present variation comprises a voltage detection circuit  401  in place of the switch  127  of the CD-R/RW drive  200  shown in FIG. 8. At least the voltage detection circuit  401  composes a selection unit. It is arranged that, when a computer is connected to the USB connector  126 , a voltage of 5 [V] is impressed between a power supply terminal and a ground terminal of the USB connector  126 . The voltage detection circuit  401  detects the voltage impressed between the power supply terminal and the ground terminal of the USB connector  126  so as to switch the connections between the encode/decode circuit  120  and each of the IDE connector  124  and the USB connector  126 .  
         [0100]    The voltage detection circuit  401  is connected between the power supply terminal and the ground terminal of the USB connector  126 . The voltage detection circuit  401  detects the voltage between the power supply terminal and the ground terminal, and compares the detected voltage with a reference voltage so as to output a result of the comparison. When the voltage between the power supply terminal and the ground terminal is larger than the reference voltage of 3 volts, for example, the voltage detection circuit  401  outputs a high-level signal. When the voltage between the power supply terminal and the ground terminal is smaller than 3 volts, the voltage detection circuit  401  outputs a low-level signal. The output of the voltage detection circuit  401  is supplied to the MPU  121 .  
         [0101]    [0101]FIG. 15 and FIG. 16 are process flowcharts of the third variation according to the present embodiment. Elements in FIG. 15 and FIG. 16 that are identical to the elements shown in FIG. 9 and FIG. 10 are referenced by the same reference marks, and will not be described in detail.  
         [0102]    In place of the judgment of whether the switch  127  is on or off made in step S 2 - 2  shown in FIG. 9, the output of the voltage detection circuit  401  is used in making the following judgment. That is, when the output of the voltage detection circuit  401  is high-level in step S 2 - 21 , step S 2 - 4  is performed because it can be judged that a computer is connected to the USB connector  126 . On the other hand, when the output of the voltage detection circuit  401  is low-level in step S 2 - 21 , step S 2 - 3  is performed because it can be judged that no computer is connected to the USB connector  126 .  
         [0103]    According to the present variation, inserting a USB cable from a computer into the USB connector  126  enables an automatic switching of the connection to the computer.  
         [0104]    Besides, although an IDE interface is used for connecting the computer body  11  and the CD-R/RW drive in the above-described embodiment, other interfaces, such as a USB interface, may also be used. Also, although an USB interface is used for connecting an external computer and the CD-R/RW drive in the above-described embodiment, the interface is not limited thereto, and other interfaces, such as IEEE1394, may also be used. Thus, interfaces used for connecting the computer body  11  and the CD-R/RW drive, and for connecting an external computer and the CD-R/RW drive are not limited to the IDE interface and the USB interface.  
         [0105]    Additionally, although one interface is provided between one external computer and the CD-R/RW drive in the above-described embodiment, a plurality of interfaces may be provided.  
         [0106]    Additionally, although the above-described embodiment is described by taking a CD-R/RW drive as an example of a peripheral device, the present invention is not limited thereto, and is applicable to peripheral devices in general, including a storage drive, such as a floppy disk drive, a CD-ROM drive, a DVD-ROM drive, a DVD-RAM drive, and a tape drive, which are connected to and controlled by a computer.  
         [0107]    The present invention is not limited to the specifically disclosed embodiments, and variations and modifications may be made without departing from the scope of the present invention.  
         [0108]    The present application is based on Japanese priority application No. 2001-249095 filed on Aug. 20, 2001, the entire contents of which are hereby incorporated by reference.