A METHOD ENABLING COMMUNICATION BETWEEN AN ELECTRONIC DEVICE AND A BATTERY, AN APPARATUS COMPRISING AN ELECTRONIC DEVICE AND A BATTERY, AND A BATTERY ENABLING COMMUNICATION

Abstract: Digital, serial communication over an interface between an electronic device (102) and a battery (103) attached thereto comprises transmission of bytes (300) consisting of a number of bits. Each bit is defined by one of a high level and a low level, and a leading bit (304) of each byte is of a first one of said high and low levels. The method comprises the step of transmitting the other of said high and low levels for a first period of time (403, 405) immediately prior to said leading bit (304). When the leading bit of a byte is always of the same level (i.e. either high or low) and a period of the opposite level procedes the leading bit, it is very easy and simple to ensure that the sending as well as the receiving party is ready for the communication to take place and adjusted to the actual direction of communication.

Description: A method enabling communication between an electronic device and a battery, an apparatus comprising an electronic device and a battery, and a battery enabling communication The invention relates to a method enabling digital, serial communication over an interface between an electronic device and a battery attached thereto, said digi- tal, serial communication comprising transmission of bytes consisting of a number of bits, each bit being defined by one of a high level and a low level, wherein a leading bit of each byte is of a first one of said high and low levels. Further, the invention relates to an ap- paratus comprising an electronic device and a battery attached thereto, and to a battery. In recent years the cellular telephone technology has developed rapidly and thus created a similar need for de- velopment in the area of batteries and battery packs, and more specifically, for communicating between a battery and an electronic device, such as a cellular telephone. Cellular telephones must utilize batteries in order to provide mobile capabilities. The battery is critical to the user of a cellular telephone, since the battery provides the ability to move about freely without being tied to a stationary power source. Thus, in order to maximize the use of a cellular tele- phone, and other portable electronic devices, it is important that a user achieves maximum performance from the attached battery. This may be achieved by correctly charging the battery and always being able to identify the exact charging status of the battery. This enables the user to know how much standby time is left on the phone. This type of information enables the user to in- telligently decide whether the charge in a battery is sufficient for his needs, or whether charging of the battery is required. Recent developments of battery and battery pack related technologies have provided users with so-called "smart" batteries which can provide a user with a power source for an electronic device and further provide data transmission capabilities between the battery and the attached electronic device. This type of batteries may include storage means containing various data representing information which may be presented to a user, e.g. in a display of the portable device. The information in a battery may include an identification number, the maximum capac- ity, the present capacity, etc. Some information from the battery is only used internally in the portable electronic device, while other information from the battery can be presented to the user, e.g. after having been processed by a processor in the battery or in the portable electrical device. For example, the stored information about the maximum capacity of the battery can be used in the electronic device only, while the current capacity may be calculated by the electronic de- vice using the maximum capacity (or a previous value of the current capacity) and knowledge about the power consumption of the electronic device. Therefore, information is exchanged between the elec- tronic device and the battery by means of e.g. digital, serial communication over an interface between an electronic device and a battery attached thereto. Such communication also needs some sort of handshaking in order to ensure that the communication is working correctly. Many protocols are known from the computer tech- nology. However, these techniques, while satisfactory in a computer environment, are too complex and expensive for use with smaller and cheaper electronic devices, such as a cellular telephone. A simple, minimal protocol for se- rial communication is needed. Therefore, it is an object of the invention to provide a method of the above-mentioned type which can overcome the described limitations, i.e. a method that is simple and cheap to implement. In accordance with the invention, this object is accom ¬ plished in that the method comprises the step of trans ¬ mitting the other of said high and low levels for a first period of time immediately prior to said leading bit. When the leading bit of a byte is always of the same level (i.e. either high or low) and a period of the opposite level precedes the leading bit, it is very easy and simple to ensure that the sending as well as the receiv ¬ ing party is ready for the communication to take place and adjusted to the actual direction of communication. As stated in claim 2, the method may further comprise the steps of transmitting each byte with a trailing bit of the other of said high and low levels, and transmitting the other of said high and low levels for a second period of time immediately following said trailing bit. When a period of the opposite level also follows the trailing bit of the byte, the interface is left in a state where it is ready for the next state to be transmitted. As stated in claim 3, the sum of said first and second periods of time may define a waiting state between two consecutive bytes in the case where at least two bytes are transmitted following each other. This waiting state may be used for a change of the direction of transmis ¬ sion, as stated in claim 4. Further, as stated in claim 5, a byte transmitted in one direction over said interface may be retransmitted in the opposite direction after the direction of transmission has been changed, which enables a simple error detection. If, as stated in claim 6, the second period of time exceeds a preset value, the interface may be set to an idle state wherein the first one of said high and low levels is transmitted. By setting the interface to an idle state it is possible to turn off the circuitry placed in the battery. This means that this circuitry is only powered up when needed for transmission, and thus energy from the battery can be conserved. As stated in claim 7, said first period of time may define a wake-up state when a byte is transmitted as the first byte after an idle state. This means that the cir- cuitry in the battery will have time for power-up and initiation before the byte is transmitted. As mentioned, the invention further relates to an appara ¬ tus comprising an electronic device, a battery attached thereto, and means enabling digital, serial communication over an interface between the electronic device and the battery, and comprising first communications circuitry in the electronic device and second communications circuitry in the battery, said digital, serial communication com- prising transmission between said first and second commu ¬ nications circuitry of bytes consisting of a number of bits, each bit being defined by one of a high level and a low level, wherein a leading bit of each byte is of a first one of said high and low levels. When at least one of said first and second communications circuitry is adapted to transmit the other of said high and low levels for a first period of time immediately prior to said leading bit, an apparatus of the above- mentioned type capable of overcoming the described limitations is provided, i.e. an apparatus that is simple and cheap to implement. Thus it is very easy and simple to ensure that the sending as well as the receiving party is ready for the communication to take place and adjusted to the actual direction of communication. Expedient embodiments of the apparatus are described in claims 9 to 14 having the benefits mentioned above. Further, as stated in claim 15, the electronic device may expediently be a cellular telephone. As mentioned, the invention further relates to a battery comprising means enabling digital, serial communication over an interface between the battery and an electronic device, and comprising communications circuitry in the battery, said digital, serial communication comprising transmission between said communications circuitry and the electronic device of bytes consisting of a number of bits, each bit being defined by one of a high level and a low level, wherein a leading bit of each byte is of a first one of said high and low levels. When said communications circuitry is adapted to transmit the other of said high and low levels for a first period of time immediately prior to said leading bit, a battery of the above-mentioned type capable of overcoming the de ¬ scribed limitations is provided, i.e. a battery that is simple and cheap to implement. Thus it is very easy and simple to ensure that the sending as well as the receiv- ing party is ready for the communication to take place and adjusted to the actual direction of communication. Expedient embodiments of the battery are described in claims 17 to 22 having the benefits mentioned above. The invention will now be described more fully below with reference to the drawing, in which figure 1 shows an apparatus according to the invention, figure 2 illustrates a part of an electronic device interfacing with a part of the battery, figure 3 is an example of a byte to be used in relation to the above-mentioned transmission, and figure 4 illustrates the transmission of bytes. Figure 1 shows an apparatus 101 comprising an electronic device 102 and a battery or battery pack 103 attached thereto. The apparatus 101 further comprises a number of connections 104, 105, 106 connecting the electronic device 102 and the battery 103 and thus allowing communication between the electronic device 102 and the battery 103. The electronic device 102 comprises a transceiver 108, which is also called the first communications means in the following, and a micro-controller 109. The transcei ¬ ver 108 and the micro-controller 109 are adapted to ex- change data, which is illustrated by means of the nume ¬ rals 110 and 111 in the figure. The micro-controller 109 can transmit information to the transceiver 108 by means of the connection 111. Likewise the connection 110 can be used to transmit data from the transceiver 108 to the mi- cro-controller 109. The transceiver 108 may be a univer ¬ sal asynchronous receiver transmitter (UART) . The battery includes one or more battery cells 113, a mi ¬ cro-controller 114 (which may be a state machine) , a bat ¬ tery information acquisition unit 115, a transceiver 117 and a memory 116. It is noted that the transceiver 117 is also called the second communications means in the fol ¬ lowing. Also the transceiver 117 may be a universal asynchronous receiver transmitter (UART) . The connections 104 and 105 are used to supply power from the battery 103 to the electronic device 102. For example, the connector 104 may be connected to the positive pole of the battery cells 113 in the battery 103, and the connector 105 may be connected to a battery negative pole (GND) of the battery cells 113 in the battery 103. The transceiver 108 included in the electronic device 102 is connected to the transceiver 117 in the battery 103 by means of the connection 106 enabling digital, serial com- munication comprising transmission of bytes consisting of a number of bits between the first and the second commu ¬ nications means. The memory 116 is adapted to store a number of data information, for example an identification number of the battery, the maximum capacity of the batte- ry, the current capacity of the battery, etc. The micro-controller 114 is connected to the transceiver 117, to the battery information acquisition unit 115, and to the memory 116. The battery information acquisition unit 115 is connected to the battery cells 113 and is adapted to retrieve battery information, such as the cur ¬ rent battery capacity, etc. from the battery cells 113. The battery information acquisition unit 115 is adapted to transmit the information to the micro-controller 114 when instructed to do so by the micro-controller 114. The micro-controller 114 is adapted to store and retrieve the information from the memory 116 and to transmit the information to the electronic device 102 by means of the transceiver 117. Figure 2 illustrates a part of the electronic device 102 interfacing with a part of the battery 103 and shows the connection 106 adapted to connect the electronic device 102 and the battery 103 in relation to the connection 106 shown in Figure 1. The left side of Figure 2 illustrates a part of the electronic device 102 while the right side of Figure 2 illustrates a part of the battery 103. As shown in the figure, the electronic device 102 and the battery 103 are connected by means of an interface 201. The electronic device 102 includes a control unit 202 and a Universal Asynchronous Receiver Transmitter unit 203, i.e. a so-called UART . Likewise, the battery 103 includes a control unit 204. The electronic device 102 and the battery 103 are adapted to transmit data via the inter- face 201. The transmission is performed by means of a pull-up resistor 207, a switch 205, and a switch 206. The switch 205 in the electronic device is connected to be controlled by the control unit 202. Likewise, the switch 206 in the battery 103 is connected to be controlled by the control unit 204. The switch 205 and the switch 206 are both connected to ground potential. This enables the control units 202, 204 to transmit information over the interface 201 in turn. The transmission of information from the electronic device 102 to the battery 103 is controlled by the control unit 202. The control unit 202 is adapted to control the switch 205 and hereby send the information to the battery 103. For example, when the switch 205 is open, the pull- up resistor 207 pulls the potential at the communications line 106 to a high level. On the other hand, when the switch is closed, the potential at the communications line 106 is at a low level. Hereby, by controlling the position of the switch 205 the control unit 202 controls the potential at the communications line 106, and as the communication line is connected to the battery 103 information can be transmitted from the electrical device 102 to the battery 103. Likewise, the control unit 204 can transmit information from the battery 103 to the electronic device 102 by means of the switch 206. The data generated by the switch 205 in the electronic device 102 are received in a UART 211 which can be similar to the UART 203 in the electro ¬ nic device 102. In a preferred embodiment, bytes including a number of bits are transmitted between the electronic device 102 and the battery 103. The format of these bytes is illu ¬ strated in Figure 3. Figure 3 shows an example of a byte consisting of a number of bits which can be used in relation to the above- mentioned transmission. The byte 300 is divided into three sections: a first section 301 including two start bits, a second section 302 including a number of data bits, and a third section 303 including a stop bit. The first section 301 includes two start bits 304, 305 and is used to indicate the start of the byte 300 during transmission. Preferably, the start bits have different values, e.g. the start bit 304 is a logic "0" while the start bit 305 is a logic l". The second section 302 in ¬ cludes a number of data bits (for example eight) having values depending on the information being transmitted. The third section 303 includes a stop bit used to indicate the end of the byte. As will become clear from the following, the stop bit is often not necessary, e.g. when the transmitted bytes are separated by periods having a signal level corresponding to the value of the stop bits, or when bytes transmitted have a fixed length. Figure 4 is a timing diagram illustrating the transmission of bytes over the communications line 106 between the electronic device 102 and the battery 103. Note that the time is increasing from the left to the right in the fi- gure . The figure shows a first byte 401 being transmitted from electronic device 102 to the battery 103 via the communi ¬ cations line 106 followed by a second byte 402 being transmitted in the reverse direction via the communicati ¬ ons line 106, i.e. from the battery 103 to the electronic device 102. The time intervals illustrating the transmission of the first byte and the transmission of the second byte are separated by a time interval indicated by 405 in the figure. The duration of the time interval 405 is specified by the required response time and minimum set-up time for reversing the direction of communication. One or more of the electronic means in the battery, e.g. the micro-processor 114 can be in an active state or in a power saving state. In the power saving state the communications line is in a so-called idle state. Hereby, the power consumption of these electronic means can be redu ¬ ced during periods when no bytes are transmitted between the electronic device 102 and the battery 103. Prior to the transmission of the first byte the trans is- sion line is in idle state in which the signal level on the transmission line equals a level of logic "0". In the figure the idle period situation is indicated by the nu ¬ meral 403. The control unit 202 brings the transmission line into an so-called active state by bringing the signal level on the transmission line 106 to a high level, as indicated by the period 404 in the figure. The period 404 is a so-called wake-up period in which one or more of the electronic means in the battery are brought from a power saving state to a normal power consumption state. As illustrated to the right in the figure, the byte 402 is followed by a an interval 406 in which the signal le ¬ vel at the transmission line 106 equals a level of logic λX l", i.e. a situation similar to the situation indicated by the interval 405. The minimum duration of the time in- terval 406 is specified by the required response time and minimum set-up time for reversing the direction of commu ¬ nication. The interval 406 is followed by a shift from the level of logic "1" to a level of logic "0" indicating a situation in which the transmission line 106 is brought into an idle state. Alternatively, the shift could be in ¬ dicating the start of a new byte being transmitted, i.e. the shift corresponds to the beginning of a new start bit. It is noted that the transmission line can be brought into an idle state when the duration of the time interval 406 exceeds a given predefined value. The bytes transmitted via the transmission line 106 can include instructions as well as data. The instructions may include so-called read-only instructions sent by the electronic device 102 and instructing the battery 103 to read specified information from the memory 116 and send the information as one or more data bytes in response. For example, the read-only instruction may instruct the battery to send information on the nominal capacity or the battery serial number. The instruction may also in ¬ clude so-called read/write instructions. For example in- structions causing reading or writing the presently remaining capacity of the battery. Further, the instruction set may include instructions causing sending and receiving information of the battery communications bus revi- sion, and causing reading and writing of a dynamic identification number. The revision information specifies the communications bus revision supported. After exchanging the revision number of the battery communications bus, the micro-controllers 109, 114 can use a common communications standard supported by both the electronic device 102 and the battery 103. Hereby, communication between an electronic device 102 and a battery can be obtained even if one of those only supports a later communications standard than the other. The dynamic identification number is used for communication purposes. The electronic device 102 is adapted to store a given dynamic identification number in both the memory 116 of the battery 103 and in a memory of the electronic device 102. The dynamic identification number may be stored when a battery 103 is connected to the electronic device 102 but can also be stored at an arbi- trary time, provided the battery 103 is connected to the electronic device 102. When the battery is connected to the electronic device 102 the dynamic identification number is transmitted from the battery 103 to the electronic device 102. Hereafter, the dynamic identification number from the battery 103 is compared to one or more dynamic identification numbers stored in the electronic device 102. If the dynamic iden ¬ tification number of the battery does not correspond to a dynamic identification number from the electronic device 102, it means that the battery has been used by other e- quipment or it may be a completely brand new battery. Therefore, the electronic device 102 does not have current information about the status of the battery, and the electronic device will retrieve information from the bat- tery 102, e.g. information about the presently remaining capacity of the battery 102. If, on the other hand, the dynamic identification number of the battery corresponds to a dynamic identification number from the electronic device 102, the battery has not been used by other equip- ment, and the electronic device may use information on the battery stored in the electronic device instead of information retrieved from the battery. Whether the information from the electronic device 102 or information from the battery 103 is used depends on other information stored in the battery 103, e.g. information indicating if the battery has been recharged since being disconnected from the electronic device. If this is the case, the mobile phone retrieves the battery capacity from the battery. If this is not the case, the mobile phone uses previ- ously stored internal information on the battery capacity instead. The reason why it is of interest to use internally stored information instead of information from the battery is that the electronic device is normally able to store the information with a higher resolution because of the greater available memory. It is noted that the electronic device may be a mobile phone or a battery charger. For example, both a mobile phone and a battery charger may perform the above- mentioned reading and writing of dynamic identification numbers and on this basis decide whether to use previously stored information about the battery 103 or alternatively retrieve the information from the battery 103. Error handling is essentially based upon an echoing mechanism used for commands and data, i.e. retransmission in relation to commands and data. Referring to Figure 4, the first byte 401 may be transmitted by the electronic device 102 to the battery 103. When the byte 401 is received by the battery 103, the byte is re-transmitted as the byte 402 from the battery 103 to the electronic device 102. When the byte 402 is received in the electronic device 102, the byte 402 is compared with the byte 401 originally sent. If the bytes 401 and 402 do not coincide an error is detected. In relation to write commands, re-transmission can be carried out in the following way. Firstly, the byte 401 sent by the electronic device 102 is received by the battery 103. Secondly, the received byte is written into a non-volatile memory 116 of the battery 103. Thirdly, the byte is read from the battery non-volatile memory. And finally, the read byte is retransmitted from the battery 103 to the electronic device 102 and the error detection can be performed. Thus it is also checked that the byte was correctly written into the memory 116. Note, the above mentioned error detection can also be performed on bytes transmitted from the battery 103 to the electronic device 102. Although a preferred embodiment of the present invention has been described and shown, the invention is not restricted to it, but may also be embodied in other ways within the scope of the subject-matter defined in the following claims.

Claims: P a t e n t C l a i m s : 1. A method enabling digital, serial communication over an interface between an electronic device (102) and a battery (103) attached thereto, said digital, serial communication comprising transmission of bytes (300) consisting of a number of bits, each bit being defined by one of a high level and a low level, wherein a leading bit (304) of each byte is of a first one of said high and low levels, c h a r a c t e r i z e d in that the method comprises the step of transmitting the other of said high and low levels for a first period of time (403, 405) immediately prior to said leading bit (304) . 2. A method according to claim 1, c h a r a c t e r ¬ i z e d in that the method further comprises the steps of transmitting each byte with a trailing bit (310) of the other of said high and low levels, and transmitting the other of said high and low levels for a second period of time (405, 406) immediately following said trailing bit. 3. A method according to claim 2, c h a r a c t e r i z e d in that the sum of said first and second periods of time defines a waiting state between two consecutive bytes in the case where at least two bytes are transmit- ted following each other. 4. A method according to claim 3, c h a r a c t e r ¬ i z e d in that the direction of transmission is changed during said waiting state. 5. A method according to claim 4, c h a r a c t e r ¬ i z e d in that a byte transmitted in one direction over said interface is retransmitted in the opposite direction after the direction of transmission has been changed. 6. A method according to claim 1 or 2, c h a r a c t e r i z e d in that the interface is set to an idle state wherein the first one of said high and low levels is transmitted, if said second period of time (406) ex- ceeds a preset value. 7. A method according to claim 6, c h a r a c t e r i z e d in that said first period of time (404) defines a wake-up state when a byte is transmitted as the first byte after an idle state. 8. An apparatus comprising an electronic device (102), a battery (103) attached thereto, and means enabling digital, serial communication over an in ¬ terface between the electronic device (102) and the bat ¬ tery (103), and comprising first communications circuitry (108) in the electronic device and second communications circuitry (117) in the battery, said digital, serial communication comprising transmis ¬ sion between said first and second communications cir ¬ cuitry of bytes (300) consisting of a number of bits, each bit being defined by one of a high level and a low level, wherein a leading bit (304) of each byte is of a first one of said high and low levels, c h a r a c t e r i z e d in that at least one of said first and second communications circuitry is adapted to transmit the other of said high and low levels for a first period of time (404, 405) immediately prior to said leading bit. 9. An apparatus according to claim 8, c h a r a c ¬ t e r i z e d in that the at least one of said first and second communications circuitry comprises means for transmitting each byte with a trailing bit (310) of the other of said high and low levels, and means for transmitting the other of said high and low levels for a second period of time (405, 406) immediately following said trailing bit. 10. An apparatus according to claim 9, c h a r a c t e r i z e d in that the sum of said first and second periods of time constitutes a waiting state between two consecutive bytes in the case where at least two bytes are transmitted following each other. 11. An apparatus according to claim 10, c h a r a c t e r i z e d in that at least one of said first and second communications circuitry comprises means for changing the direction of transmission during said wait- ing state. 12. An apparatus according to claim 11, c h a r a c t e r i z e d in that at least one of said first and second communications circuitry comprises means for re- transmitting a byte, transmitted in one direction over said interface, in the opposite direction after the direction of transmission has been changed. 13. An apparatus according to claim 8 or 9, c h a r - a c t e r i z e d in that the interface is adapted to assume an idle state wherein the first one of said high and low levels is transmitted, if said second period of time (406) has exceeded a preset value. 14. An apparatus according to claim 13, c h a r a c ¬ t e r i z e d in that said second communications cir- cuitry is adapted to assume a wake-up state defined by said first period of time (404) prior to receiving a byte as the first byte after an idle state. 15. An apparatus according to claims 8 - 14, c h a r a c t e r i z e d in that the electronic device is a cellular telephone. 16. A battery comprising means enabling digital, serial communication over an interface between the battery and an electronic device, and comprising communications circuitry (117) in the battery, said digital, serial communication comprising transmission between said communications circuitry and the elec- tronic device of bytes consisting of a number of bits, each bit being defined by one of a high level and a low level, wherein a leading bit (304) of each byte is of a first one of said high and low levels, c h a r a c t e r i z e d in that said communications circuitry (117) is adapted to transmit the other of said high and low levels for a first period of time (404, 405) immediately prior to said leading bit. 17. An apparatus according to claim 16, c h a r a c - t e r i z e d in that said communications circuitry comprises means for transmitting each byte with a trailing bit (310) of the other of said high and low levels, and means for transmitting the other of said high and low levels for a second period of time (405, 406) immediately following said trailing bit. 18. An apparatus according to claim 17, c a r a c ¬ t e r i z e d in that the sum of said first and second periods of time constitutes a waiting state between two consecutive bytes in the case where at least two bytes are transmitted following each other. 19. An apparatus according to claim 18, c h a r a c - t e r i z e d in that said communications circuitry comprises means for changing the direction of transmission during said waiting state. 20. An apparatus according to claim 19, c h a r a c - t e r i z e d in that said communications circuitry comprises means for retransmitting a byte, transmitted in one direction over said interface, in the opposite direction after the direction of transmission has been changed. 21. An apparatus according to claim 16 or 17, c h a r a c t e r i z e d in that said communications circuitry is adapted to assume an idle state wherein the first one of said high and low levels is transmitted, if said sec- ond period of time (406) has exceeded a preset value. 22. An apparatus according to claim 21, c h a r a c t e r i z e d in that said communications circuitry is adapted to assume a wake-up state defined by said first period of time (404) prior to receiving a byte as the first byte after an idle state.

Inventors: BENGTSSON JONAS, FORSBERG CHARLES, KELLERMAN MICHAEL, MERCKE JOHAN, PTASINSKI KRISTOFFER, RUBBMARK JAN, WENDELRUP HEINO, BENGTSSON, JONAS, FORSBERG, CHARLES, KELLERMAN, MICHAEL, MERCKE, JOHAN, PTASINSKI, KRISTOFFER, RUBBMARK, JAN, WENDELRUP, HEINO
Applicants: ERICSSON TELEFON AB L M, TELEFONAKTIEBOLAGET LM ERICSSON
Application year: 2000
Main classification: G06F13
IPC codes: G06F13, H01M10, H02J7, H04B7, H04L29, H04M1