Abstract:
A portable semiconductor memory device includes an internal memory for storing data, an address bus, a control bus, and a data bus which are connected to the internal memory, a connector for electrically connecting the address bus, the control bus, and the data bus to terminal equipment, and a contact confirmation/control circuit which is connected to the address bus, the control bus, and the data bus and in which known data is previously stored and which outputs the known data to the data bus when a read control signal is input from the terminal equipment over the control bus and when a given address is specified on the address bus to indicate the proper connection of the memory device to the terminal equipment through the connector.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a portable semiconductor memory device and particularly, to a memory device which allows access to an internal memory when connected to terminal equipment through a connector. 
     2. Description of the Related Art 
     FIG. 7 shows the configuration of a circuit of a conventional portable semiconductor memory device. The memory, device has as an internal memory a static RAM 1, to which a battery 4 is connected through an internal power line 8 for supplying a voltage, a reverse charge preventing diode 6 and a current limiting resistor 5. A power input line 7 is connected to the internal power line 8 through a power control circuit 3 and to a connector 35. A buffer circuit 2 is connected to the internal power line 8, RAM 1, and the connector 35. The buffer circuit is connected to the connector 35 by an address bus 10, a control bus 11 and a data bus 12. The power control circuit 3 and the buffer circuit 2 are connected to each other by a control line 9. In the drawing, reference numeral 33 denotes a pull-up resistor connected between the internal power line 8 and the control bus 11. 
     When the memory device having the above-mentioned configuration is used, it is mounted on terminal equipment (not shown) through the connector 35. If a voltage greater than a defined value is applied to the power input line 7, the power control circuit 3 connects the power input line 7 and the internal power line 8 and sends a high level control signal to the buffer circuit 2 over the control line 9. This operation causes the voltage to be supplied to the RAM 1 and the buffer circuit 2 over the internal power line 8. The high level control signal brings the buffer circuit 2 into an enable (operable) state. In other words, the terminal equipment can get access to the RAM 1, i.e, reading from or writing in the RAM 1, over the address bus 10, the control bus 11 and the data bus 12. During this operation, since the potential of the internal power line 8 is set to a value higher than the potential of the positive side of the battery 4, the current of the battery 4 is not consumed. 
     When access to the RAM 1 is completed, and when a given power voltage is not applied to the input line 7, the power control circuit 3 detects that the voltage of the power input line 7 is less than the defined value and disconnects the power input line 7 from the internal power line 8 and sends a low level control signal to the buffer circuit 2 over the control line 9. The control signal brings the buffer circuit 2 into a disable (non-operating) state wherein any access to the RAM 1 is prohibited. 
     In this state, although no voltage is supplied to the RAM 1 through the power input line 7, the voltage of the battery 4 is supplied through the resistor 5 and the diode 6. Even if the memory device is removed from the terminal equipment, therefore, the data stored in the RAM 1 is not erased or lost but in the memory device. 
     However, since the connection between the memory device and the terminal equipment is effected through the connector 35 having many contact points, when foreign substances adhere to the contact points, when a contact point is deformed or broken or when the memory device is attached to the terminal equipment at an angle, in some cases unstable or poor contacts or contact errors occur. If writing to or reading from a given address area of the memory device is performed from the terminal equipment in these circumstances, there is danger of a malfunction. In particular, there is a danger of erasing the valuable data stored in the RAM 1. It is impossible to perfectly connect the connector 35 to accurately combine the memory device with the terminal equipment. 
     SUMMARY OF THE INVENTION 
     The present invention has been achieved with a view to resolving the above-mentioned problem, and it is an object of the present invention to provide a portable semiconductor memory device preventing any malfunction causing trouble in the connection of a connector. 
     A portable semiconductor memory device in accordance with the present invention comprises an internal memory for storing data, an address bus, a control bus and a data bus which are connected to the internal memory, a connector for electrically connecting the address bus, the control bus, and the data bus to terminal equipment, and a contact confirmation/control circuit connected to the address bus, the control bus the data bus and in which known data is previously stored to output the known data to the data bus when a reading control signal is input from the terminal equipment over the control bus and when a given address is specified on the address bus. 
     The contact confirmation/control circuit can be a full-address bus &#34;L&#34; coincidence circuit for determining that all the bits of the address bus are in the &#34;L&#34; level, a full-address bus &#34;H&#34; coincidence circuit for determining that all the bits of the address bus are in the &#34;H&#34; level, a first memory circuit for storing first known data and outputting it to the data bus through the AND output of the read control signal input from the terminal equipment and the detection signal from the full-address bus &#34;L&#34; coincidence circuit, and a second storage circuit for storing second known data and outputting it to the data bus through the AND output of the read control signal input from the terminal equipment and the detection signal from the full-address bus &#34;H&#34; coincidence circuit. 
     The first storage circuit may be provided with a change means for changing the level of a given bit of the first known data when a write control signal is input from the terminal equipment over the control bus. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a drawing of the circuit of a portable semiconductor memory device according to an embodiment of the present invention; 
     FIG. 2 is a drawing of the circuit of the contact confirmation/control circuit according to the embodiment of FIG. 1; 
     FIG. 3 is a drawing of the circuit of the &#34;55 H  &#34; memory circuit in a contact confirmation/control circuit; 
     FIG. 4 is a drawing of the circuit of the &#34;AA H  &#34; memory circuit in a contact confirmation/control circuit; 
     FIG. 5 is a flow chart which shows the operation of a confirming contact; 
     FIG. 6 is a drawing of the timing of a signal in each unit of a contact confirmation/control circuit; and 
     FIG. 7 is a drawing of the circuit of a conventional portable semiconductor memory device. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     In FIG. 1, a portable semiconductor memory device A has as an internal memory a static RAM 1 to which a battery 4 is connected through an internal power line 8 for supplying a voltage, a reverse charge preventing diode 6 and a current limiting resistor 5. A power input line 7 is connected to the internal power line 8 through a power control circuit 3 and to a connector 35. A buffer circuit 2 is also connected to the internal power line 8. The RAM 1 is connected to the connector 35 through the buffer circuit 2 by an address bus 10, a control bus 11, and a data bus 12. The power control circuit 3 is connected to the buffer circuit 2 by a control line 9. In the drawing, reference numeral 33 denotes a pull-up resistor which is connected between the internal power line 8 and the control bus 11. 
     A contact confirmation/control circuit 15 is connected to the address bus 10, the control bus 11, and the data bus 12. Specifically, each of the address bus 10 and the data bus 12 comprises a 8-bit bus, and the control bus 11 includes a write-enable signal line 13, a card-enable signal line 14, and an output-enable signal line 26. A test signal line 16 is also connected between the contact confirmation/control circuit 15 and the connector 35, and a pull-down resistance 22c is connected to the test signal line 16. The power input line 7 is connected to the contact confirmation/control circuit 15 for supplying power thereto. 
     In the memory device in this embodiment, the contact confirmation/control circuit 15 is connected to the address bus 10, the control bus 11, and the data bus 12 which are provided in the conventional memory device shown in FIG. 7, and the test signal line 16 is connected between the connector 35 and the contact confirmation/control circuit 15, the pull-down resistor 22c being connected to the test signal line 16. 
     FIG. 2 shows the internal configuration of the contact confirmation/control circuit 15. A full-address bus &#34;L&#34; coincidence circuit 17 and a full-address bus &#34;H&#34; coincidence circuit 18 are connected to the address bus 10, the output lines 23a and 23b of the coincidence circuits 17 and 18 being connected to the first input terminals of AND circuits 19a and 19b, respectively. The full-address bus &#34;L&#34; coincidence circuit 17 and the full-address bus &#34;H&#34; coincidence circuit 18 output &#34;H&#34; level detection signals to the output lines 23a and 23b when all the bits of the address bus 10 are in the &#34;L&#34; level and the &#34;H&#34; level, respectively. The card-enable signal line 14 is connected to the second input terminals of the AND circuits 19a and 19b through an inverter circuit 25c, and the test signal line 16 is connected to the third input terminals of the AND circuits 19a and 19b. The output terminals of the AND circuits 19a and 19b are respectively connected to the first input terminals of AND circuits 34a and 34b, and the output-enable signal line 26 is connected to the second input terminals of the AND circuits 34a and 34b through an inverter circuit 25b. 
     The output lines 24a and 24b of the AND circuits 34a and 34b are respectively connected to a &#34;55 H  &#34; memory circuit 20 and an &#34;AA H  &#34; memory circuit 21 as first and second memory circuits, respectively. The output line 25d of the inverter circuit 25a connected to the AND circuit 34b and the write-enable signal line 13 are connected to the &#34;55 H  &#34; memory circuit 20. The data bus 12 is connected to the &#34;55 H  &#34; memory circuit 20 and the &#34;AA H  &#34; memory circuit 21. In the drawing, reference numerals 22a and 22b respectively denote pull-down resistors connected to the output lines 24a and 24b of the AND circuits 34a and 34b, respectively. 
     As shown in FIG. 3, the &#34;55 H  &#34; memory circuit 20 comprises non-inverting amplifiers 27a to 27h which respectively correspond to 8 bits from a least significant bit LSB to a most significant bit MSB of the data bus 12, pull-up resistors 29a, 29c, 29e and 29g are respectively connected to the circuits 27a, 27c, 27e and 27g of the bits in odd numbers counted from the LSB and a latch circuit 30 connected to the circuit 27h of the MSB. The latch circuit 30 forms a change means in which a 5-V power source, the output line 25d of the inverter circuit 25a, the write-enable signal line 13, and the non-inverter circuit 27h are connected to the input terminal D, the (reset) terminal R, the input terminal T, and the output terminal Q, respectively. The latch circuit 30 latches to the output terminal Q the value of D input when the signal at the input terminal T rises. When the power source is turned on, since the terminal R is in the &#34;L&#34; level for a moment because of to the action of the resistor 31 connected to the terminal R and a reset capacitor 32, the Q output is in the &#34;L&#34;  level. 
     If the &#34;H&#34; level 5-V potential and the &#34;L&#34; level which is the ground level are expressed by &#34;1&#34; and &#34;0&#34;, respectively, in binary representation, therefore, the input of each of the non-inverter circuits 27a to 27h is as shown in Table 1, and &#34;55 H  &#34; (first known data) is coded in hexadecimal representation. 
     
                       TABLE 1______________________________________Hexadecimal           5  5Binary               01010101______________________________________ 
    
     However, when a write-enable signal in the &#34;H&#34; level is input to the input terminal T of the latch circuit 30, the output terminal Q is in the &#34;H&#34; level. The MSB thus becomes &#34;1&#34;, and &#34;D5H&#34; is coded in hexadecimal representation, as shown in Table 2. 
     
                       TABLE 2______________________________________Hexadecimal           D  5Binary               11010101______________________________________ 
    
     When an &#34;H&#34; level signal is input from the output line 24a of the AND circuit 34a, therefore, the data indicating &#34;55 H  &#34; or &#34;D5 H  &#34; is output to the data bus 12. 
     On the other hand, as shown in FIG. 4, the &#34;AA H  &#34; memory circuit 21 comprises non-inverting amplifiers 28a to 28h which correspond to 8 bits from the LSB to the MSB of the data bus 12, and pull-up resistances 29b, 29d, 29f, and 29h which are connected to the circuits 28b, 28d, 28f and 28h of the even bits counted from the LSB. The &#34;AA H  &#34; (second known data) of the input to the non-inverter circuits 28a to 28h is coded in hexadecimal representation, as shown in Table 3. 
     
                       TABLE 3______________________________________Hexadecimal           A  ABinary               10101010______________________________________ 
    
     When an &#34;H&#34; level signal is input from the output line 24b of the AND circuit 34b, data indicating &#34;AA H  &#34; in hexadecimal representation is output to the data bus 12. 
     The operation of this embodiment will be described below. 
     As shown in FIG. 1, the memory device A is connected to terminal equipment B through the connector 35. The terminal equipment B supplies a voltage to the power input line 7 of the memory device A, confirming the connection of the connector 35 in accordance with the flow chart described below and shown in FIG. 5. 
     In Step S1, the terminal equipment B first specifies the most significant address (all the bits are in the &#34;H&#34; level) in the address bus 10 while sending an &#34;H&#34; level test signal to the contact confirmation/control circuit 15 over the test signal line 16 and reading the most significant address by sending an &#34;L&#34; level control signal to each of the card-enable signal line 14 and the output-enable signal line 26 of the control bus 11. During this process, if the connector is accurately connected, in FIG. 2, since the full-address bus &#34;H&#34; coincidence circuit 18 outputs the &#34;H[ level detection signal, all the first to third input terminals of the AND circuit 19b are in the &#34;H&#34; level, and both the first and second input terminals of the AND circuit 34b are in the &#34;H&#34; level. As a result, an &#34;H&#34; level signal is input to the &#34;AA H  &#34; memory circuit 21, and the data indicating &#34;AA H  &#34; is output to the data bus 12. FIG. 6 is a drawing which shows the timing of a signal in each unit of the contact confirmation/control circuit 15 during this process. 
     In Step S2, the terminal equipment B then confirms that the data read is &#34;AA H  &#34;, and if the data is not &#34;AA H  &#34;, it is decided in Step S3 that there is trouble in the contact of the connector 35. The &#34;H&#34; level signal output to the output line 24b of the AND circuit 34b is inverted by the inverter circuit 25a and then input to the terminal R of the latch circuit 30 of the &#34;55 H  &#34; memory circuit 20 so that the latch circuit 30 is reset, with the output terminal Q being in the &#34;L&#34; level. 
     On the other hand, when it is confirmed that the data read in Step S2 is &#34;AA H  &#34;, in Step S4, the terminal equipment B specifies again the least significant address (all the bits are in the &#34;L&#34; level) in the address bus 10 while sending an &#34;H&#34; level test signal to the contact confirmation/control circuit 15 over the test signal line 16 and reading the least significant address by sending an &#34;L&#34; level control signal to each of the card-enable signal line 14 and the output-enable signal line 26 of the control bus 11. During this process, if the connector is accurately connected, since the full-address bus &#34;L&#34; coincidence circuit 17 outputs an &#34;H&#34; level detection signal, all the first to third input terminal of the AND circuit 19a are in the &#34;H&#34; level, and both of the first and second input terminals of the AND circuit 34a are in the &#34;H&#34; level. As a result, the &#34;H&#34; level of signal is input to the &#34;55 H  &#34; memory circuit 20, and the data indicating &#34;55 H  &#34; is output to the data bus 12. During this process, since the output from the AND circuit 34b is in the &#34;L&#34; level, the output from the &#34;AA H  &#34; memory circuit 21 is floating, and thus the data and memory circuit output do not collide. 
     In Step S5, the terminal equipment B confirms that the data read is &#34;55 H  &#34;, and if the data is not &#34;55 H  &#34;, it is decided in Step S3 that there is trouble in the contact of the connector 35. On the other hand, if is confirmed that the data is &#34;55 H  &#34;, in Step S6, pseudo writing is performed by outputting an &#34;H&#34; level pulses to the write-enable signal line 13. In other words, the Q output becomes the &#34;H&#34; level at the rise of the write-enable signal which is input to the input terminal T of the latch circuit 30 of the &#34;55 H  &#34; memory circuit 20 whereby &#34;D5 H  &#34; is coded. 
     In Step S7, the least significant address is then read in the same way as in Step S4. In Step S8, the terminal equipment B confirms that the read data is &#34;D5 H  &#34;, and if the data is not &#34;D5 H  &#34;, it is decided in Step S3 that there is trouble in the contact of the connector 35. While if it is confirmed that the data is &#34;D5 H  &#34;, it is decided in Step S9 that the connector 35 is accurately connected, and access to the RAM 1 of the memory device A shown in FIG. 1 is obtained. Although the access to the RAM 1 is obtained when the test signal of the test signal line 16 is in the &#34;L&#34; level, the access is the same as the access to the conventional memory device shown in FIG. 7 and is not described below. 
     When there is trouble in the contact of the connector 35, in Step S3, after an attempt has been made to remove the cause of the trouble in the contact and the connector 35 has been connected again, the contact is confirmed again in accordance with the flow chart shown in FIG. 5. 
     As described above, it is possible to confirm the &#34;H&#34; level state and the &#34;L&#34; level state of each of the bits of the address bus 10 and the data bus 12, as well as confirming the contact of each of the signal lines 13, 14, and 26 of the control bus 11 by reading and pseudo writing. When the RAM 1 of the memory device A is accessed, since the test signal is in the &#34;L&#34; level, the data and text signal does not collide on the data bus 12. 
     An address bus of more significance than the address bus required for accessing to the RAM 1 or an input/output port may be utilized as the test signal line 16 in place of an independent signal line as the test signal line 16. 
     The full-address bus &#34;L&#34; coincidence circuit 17 and the full-address bus &#34;H&#34; coincidence circuit 18 can be easily constructed by using OR circuits, NOR circuits, AND circuits, digital comparators, or the like. 
     Although the data bus 12 comprises 8 bits, even if it comprises 16 bits or another number of bits, the same memory device can be formed. 
     The contact confirmation/control circuit 15 may be constructed by using general ICS or dedicated IC or may be incorporated in a dedicated IC together with the buffer circuit 2. 
     The first and second known data are not limited to &#34;55 H  &#34; and &#34;AA H  &#34;, other data values may be used. 
     The internal memory may be a semiconductor memory other than the static RAM 1. When a nonvolatile memory is used as the internal memory, the battery 4, the current limiting resistor 5, and the reverse charge preventing diode 6 which are provided for maintaining data storage without external power are not required.