WO2002044925A1 - Microprocessor-interface communication protocol - Google Patents

Microprocessor-interface communication protocol Download PDF

Info

Publication number
WO2002044925A1
WO2002044925A1 PCT/US2001/043952 US0143952W WO0244925A1 WO 2002044925 A1 WO2002044925 A1 WO 2002044925A1 US 0143952 W US0143952 W US 0143952W WO 0244925 A1 WO0244925 A1 WO 0244925A1
Authority
WO
WIPO (PCT)
Prior art keywords
microprocessor
property table
signal adapter
object property
data field
Prior art date
Application number
PCT/US2001/043952
Other languages
French (fr)
Original Assignee
P & S Datacom Corporation
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by P & S Datacom Corporation filed Critical P & S Datacom Corporation
Priority to AU2002225723A priority Critical patent/AU2002225723A1/en
Publication of WO2002044925A1 publication Critical patent/WO2002044925A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices

Definitions

  • the present invention relates, in general, to communication protocol and, more particularly, to communication protocol between a microprocessor and an interface .
  • Electronic devices are widely used in various aspects of daily life. Many electronic devices, such as those found in mobile telephones, automobile control systems, vending machines, utility meters, security systems, medical monitoring systems, etc., include microprocessors such as, for example, embedded microcontroller units (MCUs) for performing different functions and processes. It is often desirable to connect the MCU in an electronic device to a network such as Internet, so that the operation of the electronic device can be remotely monitored and/or controlled.
  • MCUs embedded microcontroller units
  • One approach for connecting a microprocessor such as an MCU to a network is to program a network protocol, e.g., Transmission Control Protocol/Internet Protocol (TCP/IP) , into the MCU.
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • An MCU with TCP/IP programmed therein can access Internet through a modulation and demodulation device (MODEM) .
  • MODEM modulation and demodulation device
  • This approach normally needs an MCU of at least 16 bits.. It also needs a large memory, e.g., at least 32 kilobytes, and a high operating speed in order to achieve a satisfactory performance.
  • the engineers who program the MCU chip must be familiar not only with the applications of the MCU but also with the TCP/IP protocol and related interfaces. Therefore, this approach usually requires a long development period, a high performance chip, and is cost inefficient.
  • Another approach for connecting a microprocessor such as an MCU to a network is to establish an off chip network interface, e.g., an interface developed by emWare, Inc. under the trademark "emGateway”, and program a network interface compatible protocol, e.g., a protocol developed by emWare, Inc. under the trademark "emNet", into the MCU chip.
  • An MCU with emNet programmed therein can access Internet via the network interface emGateway.
  • emNet requires less memory than TCP/IP, this approach still requires the design engineers to be familiar not only with the application of the MCU but also with the emNet and related interfaces.
  • the emNet is built on the concept of distributed memory architecture that shares variables, events, functions, and messages between the emGateway and the MCU. This shared memory concept adversely affects the application programming flexibility. Furthermore, the existing MCU chips in a user' s application systems may not satisfy the designer's expectation because of chip capability, memory, speed, etc. Therefore, this approach often also requires a long development period, a relatively high performance chip, and is cost inefficient.
  • a general aspect of the present invention is to provide a simple and cost efficient process for communicating between a microprocessor and a network.
  • a particular aspect of the present invention is to provide a communication protocol between the network and microprocessors with wide spectra of applications, capabilities, performances, bit numbers, memory sizes, etc.
  • a further aspect of the present invention is that the communication process and protocol can be readily implemented with an existing microprocessor chip.
  • a method for communicating between a microprocessor and a network is implemented by coupling a microprocessor interface or a signal adapter between a network interface or gateway and the microprocessor.
  • the signal adapter communicates with the network gateway in accordance with a local network protocol.
  • a microprocessor-interface communication protocol is implemented for the communication between the microprocessor and the signal adapter.
  • the microprocessor-interface communication protocol is referred to as MCUNet .
  • the protocol establishes a master-slave relation between the signal adapter and the microprocessor.
  • the microprocessor- interface communication protocol of the present invention is preferably compatible with the programming language, e.g., Java, C, C++, an assembly language, etc., of the microprocessor.
  • the signal adapter functions as an intermediary between the network and the microprocessor.
  • a signal in the network typically follows a network protocol.
  • a signal in the Internet typically follows Transmission Control
  • a signal in the network is sent to the microprocessor through the network gateway and the signal adapter.
  • the network gateway coverts the signal from TCP/IP to the local network protocol.
  • the signal adapter identifies, interprets, and reformats the signal received from the network gateway into a microprocessor acceptable signal, e.g., a signal in a format compatible with Java, C, C++, an assembly language, etc.
  • the signal adapter can execute the reformatted signal and/or send the reformatted signal to the microprocessor following the microprocessor-interface communication protocol.
  • the signal adapter can also ignore the reformatted signal.
  • the microprocessor can either execute or ignore the received signal. If the execution of the signal by the microprocessor requires the microprocessor to send a return signal back to the network, the return signal is sent to the signal adapter according to the microprocessor-interface communication protocol.
  • the signal adapter identifies, interprets, and reformats the return signal in accordance with the local network protocol and sends it to the network gateway.
  • the network gateway converts the signal into the network protocol and sends it to the network .
  • the microprocessor-interface communication protocol in accordance with the present invention provides an object-oriented method and treats parameters in the microprocessor as objects.
  • the objects in the object property table can be identified, described, or modified.
  • the object property table can be stored in the microprocessor, in the signal adapter, in the network gateway, or in a server connected to the network.
  • the object property table can be mapped from one place, e.g., the microprocessor, to another place, e.g., the signal adapter.
  • the objects in the object property table are identified through object names and accessible through pointers.
  • the process of mapping object property table from the microprocessor to the signal adapter, or vice versa passes the pointers according to the mapping instructions .
  • An optional feature of the microprocessor- interface communication protocol in accordance with the present invention is to support in-application re- p_rogramming (IAP) in the microprocessor.
  • IAP in-application re- p_rogramming
  • the signal adapter sends the IAP request signal to interrupts the application in the microprocessor.
  • the programming codes are subsequently transmitted to the microprocessor.
  • the microprocessor implements the new programming codes into an application memory block in the microprocessor.
  • the microprocessor-interface communication protocol of the present invention can establish communications between networks and microprocessors of various capabilities, performances, bit numbers, and memory sizes. It is compatible with microprocessors having as little as four bits. It occupies significantly less memory on the microprocessor compared with prior art communication protocols. It does not require significant modifications of the software structure and the physical structure of existing microprocessors in a user's application systems. The designers of the microprocessors are not required to be familiar with the network protocol, the local network protocol, or the microprocessor-interface communication protocol. Using the protocol in accordance with the present invention, the applications in the microprocessor can be efficiently modified and upgraded by downloading new programming codes from the network .
  • Fig. 1 is a block diagram of a microprocessor- network communication system in accordance with the present invention
  • Fig. 2 is a functional block diagram illustrating a microprocessor-interface communication protocol in accordance with the present invention
  • Fig. 3 is a block diagram of an object in an object property table in accordance with the present invention
  • Fig. 4 is a block diagram illustrating a memory structure in a microprocessor for In-Application re- Programming in accordance with the present invention.
  • Fig. 5 is a flow chart illustrating an In- Application re-Programming process in accordance with the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
  • FIG. 1 is a block diagram illustrating a microprocessor-network communication system 10 in accordance with the present invention.
  • Fig. 1 shows communication system 10 between a network 15 and a plurality of microprocessors 25A, 25B, ..., and 25N.
  • communication system 10 is capable of establishing the communications between network 15 and any number of microprocessors, e.g., one, two., three, four, and so on.
  • Microprocessors 25A-25N include any kinds of processing units such as, for example, digital signal processors (DSP) , central processing units (CPU) , microcontroller units (MCU), etc. Microprocessors 25A- 25N can be coupled to various kinds of electronic systems (not shown) such as, for example, smart devices, utility meters, refrigeration systems, home security systems, medical monitoring systems, vending machines, navigation systems, etc. for monitoring and/or controlling the operations of those electronic systems . Communication system 10 establishes communications between network 15 and microprocessors 25A-25N through a network gateway 12 and a plurality of interfaces or signal adapters 20A, 20B, ..., and 20N.
  • DSP digital signal processors
  • CPU central processing units
  • MCU microcontroller units
  • Microprocessors 25A- 25N can be coupled to various kinds of electronic systems (not shown) such as, for example, smart devices, utility meters, refrigeration systems, home security systems, medical monitoring systems, vending machines, navigation systems, etc. for monitoring and/or controlling the operations of
  • signal adapters 20A-20N can be microprocessor, communication peripheral, field programmable gate array (FPGA) , programmable logic device (PLD) , . system on chip (SOC) , application specific standard product (ASSP) , application specific integrated circuit (ASIC), DSP, CPU, MCU, etc.
  • Signal adapter 20A is coupled to microprocessor 25A via a signal transmission line 24A.
  • signal adapter 2OB is coupled to microprocessor 25B via a signal transmission line 24B
  • signal adapter 20N is coupled to microprocessor 25N via a signal transmission line 24N.
  • Signal adapters 20A-20N establish communications between network gateway 12 and respective microprocessors 25A-25N.
  • each of signal adapters 20A-20N and corresponding microprocessors 25A-25N is located adjacent to each other and close to respective electronic systems (not shown) coupled to corresponding microprocessors 25A-25N.
  • Fig. 1 shows network interface or gateway 12 being coupled to network 15 via a signal transmission line 14 and coupled to signal adapters 20A, 2OB, ..., and 2ON via corresponding signal transmission lines 16A, 16B, ..., and 16N.
  • signal adapters 20A, 2OB, ..., and 2ON via corresponding signal transmission lines 16A, 16B, ..., and 16N.
  • network 15 e.g., an Internet browser with TCP/IP, a web page, a database, a graphic user interface (GUI) , a custom application program interface, etc.
  • network gateway 12 are installed in a single system, e.g., an information server, a database server, a personal computer, a personal digital assistant (PDA) , a set-top box (STB) , an Internet appliance (IA) , etc.
  • the communications between network gateway 12 and network 15 can be either wired or wireless.
  • the communications between network gateway 12 and signal adapters 20A-20N can also be either wired or wireless.
  • wireless communication examples include radio frequency (RF) communication, the Bluetooth (having a frequency of approximately 2.4 giga-Hertz) communication, and infrared communication.
  • Wired communication can be either serial or parallel signal transmissions.
  • serial signal transmissions include asynchronous data transmissions following the RS-232, RS-485 serial communication standard published by the Electronic Industries Alliance (EIA) , universal serial bus (USB) , controller area network (CAN) , consumer electronics bus (CEBus) , etc.
  • EIA Electronic Industries Alliance
  • USB universal serial bus
  • CAN controller area network
  • CEBus consumer electronics bus
  • the serial signal transmissions are typically more cost efficient and more reliable than parallel signal transmissions.
  • the parallel signal transmissions are usually faster than the serial signal transmissions.
  • Signal transmission lines 24A-24N between signal adapters 20A- 20N and microprocessors 25A-25N are generally wired transmission lines.
  • signal transmission lines 24A-24N can be any kind of serial or parallel signal transmission lines.
  • at least one of signal transmission lines 24A-24N includes a three-wire serial synchronous communication protocol referred to as a Serial Peripheral interface (SPI) and developed by Motorola, Inc.
  • SPI Serial Peripheral interface
  • at least one of signal transmission lines 24A-24N includes a multi-master bus referred to as an Inter-Integrated Circuit (I 2 C) bus and developed by Philips Semiconductors, Inc.
  • at least one of signal transmission lines 24A-24N includes a serial bus developed by National Semiconductor Corporation under the trademark MICROWARE.
  • FIG. 2 is a functional block diagram illustrating a microprocessor-interface communication protocol 30 in accordance with the present invention.
  • communication protocol 30 which is referred to as MCUNet, governs the command and data transmissions between interfaces or signal adapters 20A-20N and respective microprocessors 25A-25N shown in Fig. 1.
  • signal adapters 20A-20N and respective microprocessors 25A-25N have a master-slave relationship, with signal adapters 20A-20N being the masters and microprocessors 25A-25N being the slaves.
  • a master can initiate a process in a slave by sending a signal to the slave, and the slave sends signals back to the master only in response to the request from the master.
  • communication protocol 30 is described herein below as a communication protocol between signal adapter 20A and microprocessor 25A. It should be understood that this is not intended as a limitation on the applications of communication protocol 30 with respect to other systems in accordance with the present invention.
  • signal adapter 20A sends command signals to microprocessor 25A.
  • a command is transmitted from signal adapter 20A to microprocessor 25A through a change in the voltage level in the command transmission line.
  • microprocessor 25A interrupts the application therein upon receiving the command signal from signal adapter 20A.
  • Microprocessor 25A executes or ignores the command signal depending on its nature and priority. After responding to the command signal, microprocessor 25A resumes the application interrupted by the command signal.
  • microprocessor 25A periodically polls the voltage levels at the command signal line. The polling can be performed at a certain time in every predetermined time interval. Typically, the polling is performed when no application is being executed in microprocessor 25A.
  • microprocessor 25A executes or ignores the command signal depending on its nature and priority. After responding to the command signal, microprocessor 25A proceeds to the next application in microprocessor 25A.
  • Communication protocol 30 has a multiple layer model as shown in Fig. 2. Specifically, protocol 30 includes an application layer 32, a data transmission layer 34, and a physical layer 36.
  • Application layer 32 performs the functions of defining device object properties, mapping object property tables, and processing commands.
  • Data transmission layer 34 performs the functions of controlling data transmission and trouble shooting. Generally, the trouble shooting process is preferably able to identify the mistakes in the signal transmission between signal adapter 20A and microprocessor 25A. Examples of such mistakes include signal transmission timeout mistakes, microprocessor clock signal mistakes, data packet size mistakes, signal transmission sequence mistakes, etc.
  • Physical layer 36 determines the physical communication model, e.g., SPI, I 2 C, MICROWARE, etc., and signal levels.
  • Object property definition is achieved using various types of objects, which include constants, variables, events, functions, and files.
  • Object property definition includes identifying an apparatus (not shown) or a parameter of the apparatus that is monitored and/or controlled through microprocessor 25A, which uses communication protocol 30 to communicate with signal adapters 20A.
  • apparatuses that can be monitored and/or controlled through microprocessor 25A in accordance with the present invention include, but are not limited to, personal communication system, television, high fidelity audio equipment, home entertainment system, refrigerator, home cooling and heating system, home security system, irrigation system, automobile control system.
  • Application layer 32 in protocol 30 describes an object, e.g., temperature, humidity, pressure, air quality, volume, bass, treble, brightness, contrast, etc., through various types of objects including constants, variables, events, functions, and files.
  • OBJECT PROPERTY TABLE MAPPING The description of the object is preferably achieved through an object property table.
  • various objects described infra fill the object property table.
  • signal adapter 20A uses the object property table associated with an object, signal adapter 20A communicates with microprocessor 25A regarding the monitoring and controlling of the object.
  • the object property table allows the mapping of the parameters/objects related to the controlling and monitoring of the object from microprocessor 25A to signal adapter 20A and, if desired, further to network gateway 12 and to network 15.
  • the mapping scheme maps pointers to the objects to signal adapter 20A.
  • the mapping scheme maps the contents of the object to signal adapter 20A. The mapping scheme significantly increases the efficiency and speed of the communication between network 15 with microprocessor 25A through network gateway 12 and signal adapter 20A.
  • the object property table includes a descriptor segment and a content segment .
  • the descriptor segment includes two words.
  • each word is two bytes in length.
  • the first word has a symbol PROP_NUM by way of example and indicates how many objects there are in the content segment of the object property table.
  • the second word has a symbol PORP_DESP by way of example and describes the type of data in the object property table.
  • An example of how PROP_DESP indicates data type of the name of the object is shown in Table 1.
  • the data type is not limited to those described above, other types of data, e.g., hexadecimal, binary coded decimal (BCD), alphanumeric code, etc., can also be used in accordance with the present invention. If more than four data types need to be defined, at least a portion of the reserved bits (D15-D4) can be used in conjunction with the bits D3D2 to define the data types. Further, the data types can be defined using any bits in the
  • PROP_DESP Using PR0P_NUM, the user can create an index to objects in the object property table. The index establishes the order of the objects, thereby facilitating the management of the objects. TABLE 1
  • the content segment of the object property table 5 contains objects.
  • the number of objects in the content segment is indicated by PROP_NUM in the descriptor segment in the object property table. Because of the object oriented mapping method in accordance with protocol 30 of the present invention, different objects 0 in the content segment of the object property table preferably have the same structure .
  • Figure 3 illustrates an exemplary structure of an object 35 in the object property table in accordance with the present invention.
  • object 5 35 includes six terms, which are object type description (OB_TYPE) , address pointer (0B_ADDR) , object memory type (OB_MEMO) , object data attribution (0B_ATTR1 and OB_ATTR2) , object data size (OB_SIZE) , and object name (OB_NAME) . These six terms form a 0 description section 33 of object 35.
  • the byte length and the function of each term in object 35 are described in Table 2 by way of example .
  • a plurality of data fields including an event control byte (ECB) , Data_Field_l, and Data_Field_2 form a data section 37 are generally located in microprocessor 25A.
  • the data fields can be stored in any memory accessible by microprocessor 25A.
  • the present invention is not limited to establishing three data fields as shown in Fig. 3.
  • any number of data fields e.g., one, two, four, five, etc., can be established.
  • the data types of Data_Field_l and Data_Field_2 include unsigned and signed binary, unsigned and signed word, unsigned and signed double word, floating point data, ASCII, UNICODE, etc.
  • Figure 3 also shows that description section 33 (OB_TYPE, OB_MEMO, OB_ADDR, 0B_ATTR1, OB_ATTR2, OB_SIZE, and OB_NAME) is stored in signal adapter 20A and data section 37 (ECB, Data_Field_l, and Data_Field_2) is stored in microprocessor 25A.
  • Description section 33 can also be stored anywhere in communication system 10 (shown in Fig. 1) where signal adapter 20A can access, e.g., in microprocessor 25A, in network gateway 12, or in a server connected to network 15 shown in Fig. 1.
  • data section 37 can be stored in any memory accessible to microprocessor 25A.
  • OB_ADDR can point to different addresses as described herein below.
  • 0B_NAME serves to identify each object 35 in the object property table . TABLE 2
  • a constant is generally used for describing fixed parameters objects such as, for example, the name, serial number, model or edition, number, protocol, etc. of the apparatus.
  • the constant functions as an object identifier.
  • the constant can be used to identify its model number, manufacturer name, serial 0 number, etc.
  • the constant can also include parameters for describing other object characteristics as defined by the user.
  • the constant is preferably a read only data in order to maintain its constancy.
  • the constant needs to fill only one data field, 5 e.g., Data_Field_l .
  • Data_Field_2 is blank when object 35 is a constant.
  • 0B_ADDR points to Data_Field_l, which stores the value of the constant
  • 0B_ATTR2 stores the code of the constant name
  • 0B_NAME is blank.
  • 0B_ATTR1 describes the data type of the constant value stored in Data_Field_l and 0B_SIZE is set to be the size of Data_Field_l .
  • OB_ADDR points to 0B_NAME, which stores the value of the constant
  • 0B_ATTR2 stores the code of the constant name
  • Data_Field_l is blank.
  • 0B_ATTR1 describes the data type of the constant value stored in 0B_NAME and 0B_SIZE is set to be zero.
  • 0B_ADDR is pointed to Data_Field_l, which stores the value of the constant, and 0B_NAME is blank.
  • 0B_ATTR1 describes the data type of the constant value stored in Data_Field_l, 0B_ATTR2 is blank, and 0B_SIZE is set to be the size of Data_Field_l .
  • 0B_ADDR is pointed to 0B_NAME, which stores the value of the constant
  • Data_Field_l is blank.
  • 0B_ATTR1 describes the data type of the constant value stored in OB_NAME
  • 0B_ATTR2 is blank
  • OB_SIZE is set to be zero.
  • a variable typically represents those quantities that do not have fixed values, e.g., temperature, humidity, current, voltage, time, etc.
  • a variable has only one data field, e.g., Data_Field_l .
  • Data_Field_2 can be left blank when object 35 is a variable.
  • 0B_ADDR points to Data_Field_l, which stores the value of the variable
  • 0B_ATTR1 describes the data type of the variable stored in Data_Field_l .
  • OB SIZE is set to the size of Data Field 1.
  • OB_NAME stores the name of the variable and 0B_ATTR2 is left blank.
  • OB_ATTR2 stores the code of the variable name and 0B_NAME is left blank.
  • the type of object 35 can also be an event. When an event happens, microprocessor 25A may report it to network 15 via signal adapter 20A shown in Fig. 1.
  • an event may be the triggering of an alarm in a home security system, a temperature surpassing a user defined temperature upper limit in an air conditioning system, a carbon monoxide concentration over a safe limit, a noise level passing a certain decibel level, etc.
  • An event is represented by the ECB in object 35.
  • bit D7 in the ECB indicates whether the event can be reported to signal adapter 20A and, therefore, is referred to as an enabling bit. For example, when the enabling bit D7 is one, the reporting is enabled and the event can be reported to signal adapter 20A. On the other hand, when the enabling bit D7 is zero, the reporting is disabled.
  • the enabling bit D7 can be set either by network gateway 12 through signal adapter 20A or by microprocessor 25A.
  • Bit D6 indicates whether the event is triggered by a change in certain parameters, e.g., temperature, humidity, carbon monoxide concentration, noise decibel, etc., and is sometimes referred to as a parameter bit.
  • the parameter bit D6 is set by microprocessor 25A. There are two situations in which the parameter bit D6 is zero. One is that the event is not associated with a parameter, and the other is that the event is not triggered by the parameter associated therewith or the parameter is not reported to signal adapter 20A.
  • Microprocessor 25A sets the parameter D6 in the ECB to one when the event is triggered by a parameter and that parameter is to be reported to signal adapter 20A with the event.
  • the parameter is stored in Data_Field__l .
  • Microprocessor 25A sends an address pointer of Data_Field_l when microprocessor 25A reports the event to signal adapter 20A.
  • Bits D5, D4, and D3 are reserved for future development.
  • Bit D2 is a user defined bit.
  • Bit DI is referred to as a connection bit and indicates whether the event requires signal adapter 20A to be connected to network gateway 12 when the event happens .
  • connection bit DI being one indicates that the reported event requires signal adapter 20A to be connected to network gateway 12, thereby enabling signal adapter 20A to report the event to network 15 through network gateway 12. If signal adapter 20A is already connected to network gateway 12 when the event is reported to signal adapter 20A, the connection bit DI in ECB is ignored. Bit DO is referred to as an event status bit. The event status bit DO is set to one upon the triggering of the event. After reporting the event to signal adapter 20A and receiving a confirmation signal from signal adapter 20A in a subsequent event polling command, microprocessor 25A resets the event status bit DO to zero.
  • the name of the event can be stored in 0B_NAME and the code of the event name can be stored in 0B__ATTR2.
  • OB_ADDR points to ECB.
  • An event has at most only one data field, e.g., Data_Field_l .
  • Data_Field_2 can be left blank when object 35 is an event.
  • the parameter bit D6 in ECB is zero, there is no parameter reporting to signal adapter 20A. In this situation, 0B_ATTR1 and Data_Field_l can be blank.
  • the parameter bit D6 in ECB is one, there is a parameter reporting from microprocessor 25A to signal adapter 20A.
  • the parameter can be stored in Data_Field_l .
  • 0B_ATTR1 indicates the data type of the parameter stored in Data_Field_l .
  • 0B_SIZE indicates the size of Data_Field_l .
  • a function includes an input parameter and an output parameter.
  • Signal adapter 20A transmits an input parameter to microprocessor 25A.
  • Microprocessor 25A receives the input parameter, executes the input parameter, and transmits an output parameter to signal adapter 20A.
  • the input parameter is a write only data and the output parameter is a read only data with respect to signal adapter 20A. Because it includes both input and output parameters, the function generally requires two data fields.
  • Data_Field_l can store the input parameter and Data_Field_2 can store the output parameter.
  • 0B_ADDR is points to Data_Field_l .
  • 0B_ATTR1 and 0B_ATTR2 indicate the data types of the input and output parameters, respectively.
  • 0B_SIZE is divided into two segments.
  • the first segment indicates the size of Data_Field_l and the second segment indicates the size of Data_Field_2.
  • 0B_NAME stores the name of the function.
  • a file in object 35 can be any kinds of file, e.g. text file (.txt), binary file (.bin), hexadecimal file (.hex), executable file (.exe), image file (.gif), word document file (.doc), hypertext mark language file (.html), etc. Because the file requires only one data field, e.g., Data_Field_l, Data_Field_2 can be blank during the file transmission.
  • OB_ADDR is points to Data_Field_l .
  • 0B_ATTR1 indicates the data type of the file in Data_Field_l
  • OB_SIZE indicates the size of the file in Data_Field_l
  • OB NAME stores the name of the file and OB ATTR2 is left blank.
  • OB_ATTR2 stores the code of the file name and OB_NAME can store the file name or be left blank.
  • a data packet transmitted between signal adapter 20A and microprocessor 25A in accordance with communication protocol 30 preferably includes a size segment, a command segment, and a data segment.
  • the size segment indicates the size of the data packet in terms of bytes.
  • the command segment controls the signal transmission between signal adapter 20A and microprocessor 25A.
  • the command segment has five bytes : one byte for the command, two bytes for command parameter, and two bytes for command subparameter.
  • the command parameter and command subparameter serves to supplement the command byte for correct and efficient command transmission and execution.
  • the data segment contains the information to be transmitted between signal adapter 20A and microprocessor 25A.
  • the byte length of the data segment is variable depending on the amount of the information to be transmitted.
  • Signal adapter 20A and microprocessor 25A has a master-slave relationship. Only signal adapter 20A can initiate commands. Microprocessor 25A responds the commands transmitted from signal adapter 20A. If microprocessor 25A does not respond a command from signal adapter 20A, signal adapter 20A preferably repeats transmitting the command to microprocessor 25A until microprocessor 25A responds. After a predetermined number of command transmissions without response from microprocessor 25A, signal adapter 20A detects a timeout mistake.
  • the commands between signal adapter 20A and microprocessor 25A belong to several categories: control commands, setup commands, read/write commands, event polling/reporting commands, object property table mapping commands, and In- Application re-Programming (IAP) commands.
  • a command byte includes two parts, command type and command status.
  • bits D4-D0 make up the command type
  • bits D7-D5 make up the command status.
  • the commands include control commands, setup commands, read commands, write commands, etc.
  • the command status includes a MORE bit (D7) , an ERROR bit (D6) , and an ONLINE bit (D5) .
  • the MORE bit (D7) indicates whether the current data packet includes all data to be transferred.
  • the value in the ERROR bit (D6) is set in a response command, indicating whether the initial command has been successfully received and executed.
  • the ONLINE bit (D5) indicates whether signal adapter 20A is connected to network 15 via network gateway 12.
  • microprocessor 25A cannot initiate a command to signal adapter 20A.
  • Microprocessor 25A can only responds to commands from signal adapter 20A.
  • a command from signal adapter 20A requires an in kind response from microprocessor 25A in the sense that READ command from signal adapter 20A requires a response READ command from microprocessor 25A, or the like.
  • An exception to this general rule is that microprocessor 25A can response to any command from signal adapter 20A with a control command to initialize or reset signal adapter 20A. This capability allows microprocessor 25A to specify and modify the operation model of signal adapter 20A at anytime when signal adapter 20A is communicating with microprocessor 25A.
  • microprocessor 25A sends a control command to signal adapter every time when signal adapter 20A initiates a connection to microprocessor 25A, thereby initializing signal adapter 20A.
  • the control command can be used to select the communication method between signal adapter 20A and network gateway 12, initialize and reset signal adapter 20A, connect signal adapter 20A to network gateway 12, disconnect signal adapter 20A from network gateway 12, and place signal adapter 20A into a low power consumption sleep state.
  • Initializing signal adapter 20A includes specifying communication types, e.g., RS-485, RS-232, USB, MODEM, etc.
  • control command can preferably be used to acquire the communication capability of microprocessor 25A, select the communication speed between signal adapter 20A and microprocessor 25A, select the MODEM type when signal adapter 20A communicates with microprocessor 25A via a MODEM, and determine the security state of the apparatus controlled and/or monitored by microprocessor 25A.
  • signal adapter 20A can preferably read the security code of the apparatus from microprocessor 25A, read the telephone number from microprocessor 25A when the communication is through a MODEM, and read the network address of network gateway 12 if the communication between signal adapter 20A and network gateway 12 is through RS-485 or ether net. It should further be understood that if the object property table is stored in microprocessor 25A or a memory accessible to microprocessor 25A, the PROP_DESP term in the object property table is preferably mapped to signal adapter 20A when signal adapter 20A is initialized.
  • the setup commands are initiated by signal adapter 20A to modify certain communication modes of microprocessor 25A.
  • one function of the setup commands is setting up or changing the network address of microprocessor 25A.
  • Another function of the setup function is implementing or changing security codes in microprocessor 25A.
  • the READ command enables signal adapter 20A to read object data, e.g., an object in the object property table, from microprocessor 25A.
  • object data e.g., an object in the object property table
  • microprocessor 25A can send data to signal adapter 20A in several data packets.
  • microprocessor 25A notifies signal adapter 20A that there is at least an addition data packet following the one being sent to signal adapter 20A by setting a particular bit, e.g., the MORE bit D7, in the return READ command to one .
  • signal adapter 20A Upon receiving the return READ command with the MORE bit D7 set to one, signal adapter 20A initiates an additional READ command to read additional data from microprocessor 25A. This reading process continues until microprocessor 25A sets the
  • a write command referred to as WRIT by way of example, enables signal adapter 20A to send data regarding object 35 in the object property table to microprocessor 25A. If the object is a function, the WRIT command sends the input parameter to microprocessor 25A. Upon receiving the input parameter, microprocessor 25A generates an output parameter in Data_Field_2 of the object 35. The output parameter or the pointer to the output parameter Data_Field_2 is transmitted to signal adapter 20A when signal adapter 20A sends a READ command to microprocessor 25A.
  • Signal adapter 20A can also initiate a command, referred to as RDEV by way of example, to poll an event from microprocessor 25A.
  • RDEV a command
  • signal adapter 20A and microprocessor 25A has a master-slave relationship with respect to each other.
  • microprocessor 25A preferably is capable of taking actions in response to the event, e.g., activating the fire suppression sprinkler, in accordance with a predetermined program in microprocessor 25A without instruction from signal adapter 20A.
  • microprocessor 25A Upon receiving the RDEV command from signal adapter 20A, microprocessor 25A reports the event to signal adapter 20A.
  • signal adapter 20A may ignore the event and/or report the event to network 15 via network gateway 12.
  • signal adapter 20A periodically sends RDEV commands to microprocessor 25A to poll the events.
  • the RDEV commands poll the events in the object property table according to a predetermined order.
  • Microprocessor 25A reports the events to signal adapter 20A in an order determined by the event priority and the event polling sequence of signal adapter 20A.
  • a command referred to as WREV by way of example, enables signal adapter 20A to set the value of the enable bit (D7) in the ECB, thereby determining whether microprocessor 25A is permitted to report the event associated with the ECB to signal adapter 20A.
  • microprocessor 25A is a slave with respect to signal adapter 20A, the event is not reported to signal adapter 20A by the initiation of microprocessor 25A.
  • Microprocessor 25A reports the event to signal adapter 20A upon receiving the RDEV command from signal adapter 20A.
  • the object property table can be stored in any memory location accessible to signal adapter 20A or microprocessor 25A.
  • the object property table can be stored in microprocessor 25A, signal adapter 20A, network gateway 12, or a server (not shown in Fig. 1) on network 15.
  • the object property table mapping commands provide access to the object property table from anywhere in the communication system between network 15 and microprocessor 25A.
  • the object property table mapping commands transmit the pointers pointing to the object property table to a desired location in communication system shown in Fig. 1, e.g., signal adapter 20A, network gateway 12, a server on network 15, etc.
  • the object property table mapping commands transmit the contents the object property table to a desired location in communication system shown in Fig. 1, e.g., signal adapter 20A, network gateway 12, a server on network 15, etc.
  • signal adapter 20A can send a command, referred to as RDPR by way of example, to access the object property table.
  • RDPR command maps- the description section of the object property table from microprocessor 25A to signal 20A. This mapping process is preferably performed each time when signal adapter 20A is initialized or reset.
  • the object property table can preferably be modified, thereby allowing the system to be upgraded or updated.
  • microprocessor 25A is programmed to control a different apparatus, it is also desirable to modify the object property table accordingly.
  • a new object property table is installed in communication system 10.
  • the object property table is stored in signal adapter 20A, it can be modified by downloading the information from network 15 to signal adapter 20A.
  • signal adapter 20A downloads the modification from network 15 and modifies the object property table through the IAP commands described infra.
  • IAP In-Application re-Programming
  • communication protocol 30 supports in-application re-programming (IAP) in microprocessor 25A.
  • IAP in-application re-programming
  • microprocessor 25A is capable of modifying its programming codes during the execution of an application.
  • Communication protocol 30 of the present invention enables the IAP of microprocessor 25A to be initiated from network 15 or from network gateway 12. This network IAP initiation feature is referred to as WeblAP.
  • microprocessor 25A preferably includes a memory structure 40 as shown in Fig. 4.
  • Memory structure 40 includes an application memory block or array 42 and an IAP memory block or array 44 independent of each other.
  • IAP memory array 44 includes IAP management codes 45.
  • IAP management code block 45 can include software codes stored in IAP memory array 44 or hardware circuitry coupled to IAP memory array 44.
  • application memory array 42 and IAP memory array 44 include programmable non-volatile memory such as, for example, FLASH memory, electrically erasable and programmable read only memory (EEPROM) , etc.
  • EEPROM electrically erasable and programmable read only memory
  • IAP memory array 44 includes a non-volatile memory for storing the IAP management codes in block 45 and a volatile memory for the IAP operation.
  • a memory array controller 46 controls the access to application memory array 42 and IAP memory array 44.
  • FIG. 5 is a flow chart describing an IAP process 100 in accordance with the present invention.
  • a user on network 15 can request an IAP by sending the request and new programming codes to network gateway
  • Network gateway 12 relays the IAP request and the new programming codes to signal adapter 20A.
  • signal adapter 20A preferably has the information regarding the address, size, and type of the programming codes in microprocessor 25A. In accordance with the present invention, signal adapter 20A can access this information from microprocessor 25A through a READ command .
  • signal adapter 20A transmits an IAP request signal to microprocessor 25A to initiate IAP process 100 in a step 102.
  • Microprocessor 25A may have an IAP security code to safeguard its application system.
  • the IAP request signal preferably also has a security code therein. The security code in the IAP request signal is generally provided to signal adapter 20A by a user (not shown in Fig. 1) on network 15.
  • a security code in the IAP request signal is compared with the security code in microprocessor 25A. If the security codes do not match, IAP process 100 is terminated in a step 118. If the security codes match or microprocessor 25A does not have an IAP security code, microprocessor 25A sends a response to signal adapter 20A indicating the permission to continue IAP process 100 in a step 104. Furthermore, memory array controller 46 transfers a duplicate copy of the programming codes to be re-programmed from application memory array 42 to IAP memory array 44. Subsequently in a step 106, signal adapter 20A sends an erase signal to microprocessor 25A to erase the original copy of the' programming codes from application memory array 42 (shown in Fig.
  • signal adapter 20A sends programming codes to microprocessor 25A.
  • microprocessor 25A implements the new program codes into application memory array 42.
  • the new program codes are transmitted from signal adapter 20A to microprocessor 25A in data packets.
  • Each data packet has a bit, referred to as MORE bit by way of example, indicating whether there is additional programming codes following the current data packet.
  • microprocessor 25A reads the MORE bit to determine whether there are additional data packets for the programming code. If there is more data packet, IAP process returns to step 108.
  • the loop comprised of steps 108 and 111 repeats itself until signal adapter 20A finishes sending programming codes to microprocessor 25A.
  • signal adapter 20A After finishing sending programming codes to microprocessor 25A, signal adapter 20A sends a verification signal to microprocessor 25A in a step 112. In a preferred embodiment, microprocessor 25A sends the pointers to and the size of the newly implemented programming codes to signal adapter 20A in response to the verification signal. In an alternative embodiment, microprocessor 25A sends the content of newly implemented programming codes to signal adapter 20A in response to the verification signal. Signal adapter 20A verifies the implemented programming codes to determine whether it is correctly implemented. After the verification, signal adapter 20A sends a finish signal to microprocessor 25A and notifies microprocessor 25A the verification result in a step 114. In a step 115, microprocessor 25A receives the verification result from signal adapter 20A. If the programming code is not correctly implemented, signal adapter 20A resends an erase signal to microprocessor 25A to erase the incorrectly implemented programming codes from application memory array 42 in step 106.
  • IAP process 100 repeats steps 106, 108, 111, 112, and 114. If the verification indicates that the programming code is correctly implemented, microprocessor 25A releases the newly implemented programming codes in application memory array 42 in a step 116. Then, IAP process 100 terminates in step 118.
  • steps 106, 108, 111, 112, and 114 in IAP process 100 are repeated for a predetermined number of times, e.g., five, ten, or twenty, due to incorrect implementation, IAP process 100 will generate an error message and abort .
  • the duplicate copy of the programming codes to be re-programmed is stored in IAP memory array 44 for safekeeping while the new programming codes is implemented in application memory array 42 in steps 108, 111, 112, 114, and 115. If IAP process 100 is interrupted, e.g., by a power failure, network connection failure, etc., The duplicate copy stored in IAP memory array 44 is restored to application memory array 42. In addition, microprocessor 25A can continue the execution of the programming codes in IAP memory array 44 while the new programming codes are implemented in application memory array 42. If the programming codes are too large to be implemented in a single IAP process, IAP process 100 can includes several sub-processes.
  • IAP process 100 in accordance with the present invention allows efficient modification of the programming codes in microprocessor 25A. IAP process 100 is beneficial to keeping the programming codes updated and implementing any new programs, e.g. a new control program for operating an apparatus coupled to microprocessor 25A.
  • the communication protocol which is referred to as MCUNet by way of example, creates an object property table.
  • the mapping of the object property table enables the identification, description, controlling, monitoring, and modification of the objects, e.g., the temperature in an air conditioning unit, in the microprocessor.
  • the protocol establishes a master-slave relationship between the interface signal adapter and the microprocessor, thereby providing a reliable and robust communication link between the interface and the microprocessor.
  • the communication protocol also supports the IAP process in the microprocessor.
  • the communication between the microprocessor and a network can be established without modifying the software and hardware structures of existing microprocessors.
  • the designers of the microprocessors are not required to be familiar with the network protocol.
  • the protocol can be implemented with microprocessors, MCUs, CPUs, etc., of various capabilities, performances, bit numbers, and memory sizes.
  • the protocol of the present invention is simple, reliable, and cost efficient.
  • the communication protocol of the present invention can be readily implemented with microprocessors in a user's existing application systems.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Communication Control (AREA)

Abstract

A communication protocol (30) between a microprocessor (25a 25n) and a network interface (20a 20n) creates an object property table (33). The mapping of the object property table enables the identification, description, controlling, monitoring, and modification of the objects in the microprocessor from anywhere on a network coupled to the interface. The protocol (30) establishes a master-slave relationship between the interface and the microprocessor. The communication protocol (30) also supports the IAP (40) process in the microprocessor. Using the communication protocol (30), the communication between the microprocessor and a network, e.g., the Internet, can be established without modifying the software and hardware structures of the existing microprocessors.

Description

MICROPROCESSOR-INTERFACE COMMUNICATION PROTOCOL
FIELD OF THE INVENTION
The present invention relates, in general, to communication protocol and, more particularly, to communication protocol between a microprocessor and an interface .
BACKGROUND OF THE INVENTION
Electronic devices are widely used in various aspects of daily life. Many electronic devices, such as those found in mobile telephones, automobile control systems, vending machines, utility meters, security systems, medical monitoring systems, etc., include microprocessors such as, for example, embedded microcontroller units (MCUs) for performing different functions and processes. It is often desirable to connect the MCU in an electronic device to a network such as Internet, so that the operation of the electronic device can be remotely monitored and/or controlled.
One approach for connecting a microprocessor such as an MCU to a network is to program a network protocol, e.g., Transmission Control Protocol/Internet Protocol (TCP/IP) , into the MCU. An MCU with TCP/IP programmed therein can access Internet through a modulation and demodulation device (MODEM) . This approach normally needs an MCU of at least 16 bits.. It also needs a large memory, e.g., at least 32 kilobytes, and a high operating speed in order to achieve a satisfactory performance. Furthermore, the engineers who program the MCU chip must be familiar not only with the applications of the MCU but also with the TCP/IP protocol and related interfaces. Therefore, this approach usually requires a long development period, a high performance chip, and is cost inefficient.
Another approach for connecting a microprocessor such as an MCU to a network is to establish an off chip network interface, e.g., an interface developed by emWare, Inc. under the trademark "emGateway", and program a network interface compatible protocol, e.g., a protocol developed by emWare, Inc. under the trademark "emNet", into the MCU chip. An MCU with emNet programmed therein can access Internet via the network interface emGateway. Although emNet requires less memory than TCP/IP, this approach still requires the design engineers to be familiar not only with the application of the MCU but also with the emNet and related interfaces. The emNet is built on the concept of distributed memory architecture that shares variables, events, functions, and messages between the emGateway and the MCU. This shared memory concept adversely affects the application programming flexibility. Furthermore, the existing MCU chips in a user' s application systems may not satisfy the designer's expectation because of chip capability, memory, speed, etc. Therefore, this approach often also requires a long development period, a relatively high performance chip, and is cost inefficient.
Accordingly, it would be advantageous to have a cost efficient method for communicating between a microprocessor and a network. It is desirable for the method to be simple and reliable. It is also desirable for the method to be compatible with different types of microprocessors in terms of capabilities, performances, costs, etc. It would be of further advantage for the method to be compatible with a user's existing microprocessor chips.
SUMMARY OF THE INVENTION
A general aspect of the present invention is to provide a simple and cost efficient process for communicating between a microprocessor and a network. A particular aspect of the present invention is to provide a communication protocol between the network and microprocessors with wide spectra of applications, capabilities, performances, bit numbers, memory sizes, etc. A further aspect of the present invention is that the communication process and protocol can be readily implemented with an existing microprocessor chip.
In order to achieve these and other aspects of the present invention, a method for communicating between a microprocessor and a network is implemented by coupling a microprocessor interface or a signal adapter between a network interface or gateway and the microprocessor. The signal adapter communicates with the network gateway in accordance with a local network protocol. A microprocessor-interface communication protocol is implemented for the communication between the microprocessor and the signal adapter. By way of example, the microprocessor-interface communication protocol is referred to as MCUNet . The protocol establishes a master-slave relation between the signal adapter and the microprocessor. The microprocessor- interface communication protocol of the present invention is preferably compatible with the programming language, e.g., Java, C, C++, an assembly language, etc., of the microprocessor. The signal adapter functions as an intermediary between the network and the microprocessor.
A signal in the network typically follows a network protocol. For example, a signal in the Internet typically follows Transmission Control
Protocol/Internet Protocol (TCP/IP) . In accordance with the present invention, a signal in the network is sent to the microprocessor through the network gateway and the signal adapter. The network gateway coverts the signal from TCP/IP to the local network protocol. The signal adapter identifies, interprets, and reformats the signal received from the network gateway into a microprocessor acceptable signal, e.g., a signal in a format compatible with Java, C, C++, an assembly language, etc. Depending on the signal, the signal adapter can execute the reformatted signal and/or send the reformatted signal to the microprocessor following the microprocessor-interface communication protocol. The signal adapter can also ignore the reformatted signal.
Depending on the signal received from the signal adapter, the microprocessor can either execute or ignore the received signal. If the execution of the signal by the microprocessor requires the microprocessor to send a return signal back to the network, the return signal is sent to the signal adapter according to the microprocessor-interface communication protocol. The signal adapter identifies, interprets, and reformats the return signal in accordance with the local network protocol and sends it to the network gateway. The network gateway converts the signal into the network protocol and sends it to the network .
The microprocessor-interface communication protocol in accordance with the present invention provides an object-oriented method and treats parameters in the microprocessor as objects. Through the mapping of an object property table, the objects in the object property table can be identified, described, or modified. The object property table can be stored in the microprocessor, in the signal adapter, in the network gateway, or in a server connected to the network. During operation, the object property table can be mapped from one place, e.g., the microprocessor, to another place, e.g., the signal adapter. In accordance with a preferred embodiment of the present invention, the objects in the object property table are identified through object names and accessible through pointers. The process of mapping object property table from the microprocessor to the signal adapter, or vice versa, passes the pointers according to the mapping instructions .
An optional feature of the microprocessor- interface communication protocol in accordance with the present invention is to support in-application re- p_rogramming (IAP) in the microprocessor. To start an IAP process, the signal adapter sends the IAP request signal to interrupts the application in the microprocessor. The programming codes are subsequently transmitted to the microprocessor. The microprocessor implements the new programming codes into an application memory block in the microprocessor.
The microprocessor-interface communication protocol of the present invention can establish communications between networks and microprocessors of various capabilities, performances, bit numbers, and memory sizes. It is compatible with microprocessors having as little as four bits. It occupies significantly less memory on the microprocessor compared with prior art communication protocols. It does not require significant modifications of the software structure and the physical structure of existing microprocessors in a user's application systems. The designers of the microprocessors are not required to be familiar with the network protocol, the local network protocol, or the microprocessor-interface communication protocol. Using the protocol in accordance with the present invention, the applications in the microprocessor can be efficiently modified and upgraded by downloading new programming codes from the network .
BRIEF DESCRIPTION OF THE DRAWINGS
Fig. 1 is a block diagram of a microprocessor- network communication system in accordance with the present invention;
Fig. 2 is a functional block diagram illustrating a microprocessor-interface communication protocol in accordance with the present invention; Fig. 3 is a block diagram of an object in an object property table in accordance with the present invention;
Fig. 4 is a block diagram illustrating a memory structure in a microprocessor for In-Application re- Programming in accordance with the present invention; and
Fig. 5 is a flow chart illustrating an In- Application re-Programming process in accordance with the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
Various embodiments of the present invention are described herein below with reference to the figures, in which elements having similar functions are labeled using the same or related reference numerals in the figures. It should be understood that the scope of the present invention is not limited to those embodiments shown in the figures and described herein below. Figure 1 is a block diagram illustrating a microprocessor-network communication system 10 in accordance with the present invention. By way of example, Fig. 1 shows communication system 10 between a network 15 and a plurality of microprocessors 25A, 25B, ..., and 25N. In accordance with the present invention, communication system 10 is capable of establishing the communications between network 15 and any number of microprocessors, e.g., one, two., three, four, and so on. Microprocessors 25A-25N include any kinds of processing units such as, for example, digital signal processors (DSP) , central processing units (CPU) , microcontroller units (MCU), etc. Microprocessors 25A- 25N can be coupled to various kinds of electronic systems (not shown) such as, for example, smart devices, utility meters, refrigeration systems, home security systems, medical monitoring systems, vending machines, navigation systems, etc. for monitoring and/or controlling the operations of those electronic systems . Communication system 10 establishes communications between network 15 and microprocessors 25A-25N through a network gateway 12 and a plurality of interfaces or signal adapters 20A, 20B, ..., and 20N. By way of example, signal adapters 20A-20N can be microprocessor, communication peripheral, field programmable gate array (FPGA) , programmable logic device (PLD) , .system on chip (SOC) , application specific standard product (ASSP) , application specific integrated circuit (ASIC), DSP, CPU, MCU, etc. Signal adapter 20A is coupled to microprocessor 25A via a signal transmission line 24A. Likewise, signal adapter 2OB is coupled to microprocessor 25B via a signal transmission line 24B, and signal adapter 20N is coupled to microprocessor 25N via a signal transmission line 24N. Signal adapters 20A-20N establish communications between network gateway 12 and respective microprocessors 25A-25N. In a preferred embodiment, each of signal adapters 20A-20N and corresponding microprocessors 25A-25N is located adjacent to each other and close to respective electronic systems (not shown) coupled to corresponding microprocessors 25A-25N.
By way of example, Fig. 1 shows network interface or gateway 12 being coupled to network 15 via a signal transmission line 14 and coupled to signal adapters 20A, 2OB, ..., and 2ON via corresponding signal transmission lines 16A, 16B, ..., and 16N. This is not intended as limitations of the present invention. In a preferred embodiment, network 15, e.g., an Internet browser with TCP/IP, a web page, a database, a graphic user interface (GUI) , a custom application program interface, etc., and network gateway 12 are installed in a single system, e.g., an information server, a database server, a personal computer, a personal digital assistant (PDA) , a set-top box (STB) , an Internet appliance (IA) , etc. Alternatively, the communications between network gateway 12 and network 15 can be either wired or wireless. The communications between network gateway 12 and signal adapters 20A-20N can also be either wired or wireless. Examples of wireless communication include radio frequency (RF) communication, the Bluetooth (having a frequency of approximately 2.4 giga-Hertz) communication, and infrared communication. Wired communication can be either serial or parallel signal transmissions. Examples of serial signal transmissions include asynchronous data transmissions following the RS-232, RS-485 serial communication standard published by the Electronic Industries Alliance (EIA) , universal serial bus (USB) , controller area network (CAN) , consumer electronics bus (CEBus) , etc. The serial signal transmissions are typically more cost efficient and more reliable than parallel signal transmissions. However, the parallel signal transmissions are usually faster than the serial signal transmissions. Signal transmission lines 24A-24N between signal adapters 20A- 20N and microprocessors 25A-25N are generally wired transmission lines. Like signal transmission lines 16A-16N between network gateway 12 and signal adapters 20A-20N, signal transmission lines 24A-24N can be any kind of serial or parallel signal transmission lines. In a preferred embodiment, at least one of signal transmission lines 24A-24N includes a three-wire serial synchronous communication protocol referred to as a Serial Peripheral interface (SPI) and developed by Motorola, Inc. In another preferred embodiment, at least one of signal transmission lines 24A-24N includes a multi-master bus referred to as an Inter-Integrated Circuit (I2C) bus and developed by Philips Semiconductors, Inc. In yet another preferred embodiment, at least one of signal transmission lines 24A-24N includes a serial bus developed by National Semiconductor Corporation under the trademark MICROWARE. Figure 2 is a functional block diagram illustrating a microprocessor-interface communication protocol 30 in accordance with the present invention. By way of example, communication protocol 30, which is referred to as MCUNet, governs the command and data transmissions between interfaces or signal adapters 20A-20N and respective microprocessors 25A-25N shown in Fig. 1. In accordance with protocol 30, signal adapters 20A-20N and respective microprocessors 25A-25N have a master-slave relationship, with signal adapters 20A-20N being the masters and microprocessors 25A-25N being the slaves. A master can initiate a process in a slave by sending a signal to the slave, and the slave sends signals back to the master only in response to the request from the master.
In order to efficiently present the principle and true spirit of the present invention, communication protocol 30 is described herein below as a communication protocol between signal adapter 20A and microprocessor 25A. It should be understood that this is not intended as a limitation on the applications of communication protocol 30 with respect to other systems in accordance with the present invention. According to the master-slave relationship between interface or signal adapter 20A and microprocessor 25A, signal adapter 20A sends command signals to microprocessor 25A. By way of example, a command is transmitted from signal adapter 20A to microprocessor 25A through a change in the voltage level in the command transmission line. In one preferred embodiment in which microprocessor 25A is referred to as operating in an interruption mode, microprocessor 25A interrupts the application therein upon receiving the command signal from signal adapter 20A. Microprocessor 25A executes or ignores the command signal depending on its nature and priority. After responding to the command signal, microprocessor 25A resumes the application interrupted by the command signal. In another preferred embodiment in which microprocessor 25A is referred to as operating in a polling mode, microprocessor 25A periodically polls the voltage levels at the command signal line. The polling can be performed at a certain time in every predetermined time interval. Typically, the polling is performed when no application is being executed in microprocessor 25A. When a command signal from signal adapter 20A is polled, microprocessor 25A executes or ignores the command signal depending on its nature and priority. After responding to the command signal, microprocessor 25A proceeds to the next application in microprocessor 25A.
Communication protocol 30 has a multiple layer model as shown in Fig. 2. Specifically, protocol 30 includes an application layer 32, a data transmission layer 34, and a physical layer 36. Application layer 32 performs the functions of defining device object properties, mapping object property tables, and processing commands. Data transmission layer 34 performs the functions of controlling data transmission and trouble shooting. Generally, the trouble shooting process is preferably able to identify the mistakes in the signal transmission between signal adapter 20A and microprocessor 25A. Examples of such mistakes include signal transmission timeout mistakes, microprocessor clock signal mistakes, data packet size mistakes, signal transmission sequence mistakes, etc. Physical layer 36 determines the physical communication model, e.g., SPI, I2C, MICROWARE, etc., and signal levels. Object property definition is achieved using various types of objects, which include constants, variables, events, functions, and files. Object property definition includes identifying an apparatus (not shown) or a parameter of the apparatus that is monitored and/or controlled through microprocessor 25A, which uses communication protocol 30 to communicate with signal adapters 20A. Examples of apparatuses that can be monitored and/or controlled through microprocessor 25A in accordance with the present invention include, but are not limited to, personal communication system, television, high fidelity audio equipment, home entertainment system, refrigerator, home cooling and heating system, home security system, irrigation system, automobile control system. Application layer 32 in protocol 30 describes an object, e.g., temperature, humidity, pressure, air quality, volume, bass, treble, brightness, contrast, etc., through various types of objects including constants, variables, events, functions, and files.
OBJECT PROPERTY TABLE MAPPING The description of the object is preferably achieved through an object property table. In accordance with the present invention, various objects described infra fill the object property table. Using the object property table associated with an object, signal adapter 20A communicates with microprocessor 25A regarding the monitoring and controlling of the object. Particularly, the object property table allows the mapping of the parameters/objects related to the controlling and monitoring of the object from microprocessor 25A to signal adapter 20A and, if desired, further to network gateway 12 and to network 15. In one preferred embodiment, the mapping scheme maps pointers to the objects to signal adapter 20A. In another preferred embodiment, the mapping scheme maps the contents of the object to signal adapter 20A. The mapping scheme significantly increases the efficiency and speed of the communication between network 15 with microprocessor 25A through network gateway 12 and signal adapter 20A.
The object property table includes a descriptor segment and a content segment . In a preferred embodiment, the descriptor segment includes two words. By way of example, each word is two bytes in length. The first word has a symbol PROP_NUM by way of example and indicates how many objects there are in the content segment of the object property table. The second word has a symbol PORP_DESP by way of example and describes the type of data in the object property table. An example of how PROP_DESP indicates data type of the name of the object is shown in Table 1.
It should be noted that the data type is not limited to those described above, other types of data, e.g., hexadecimal, binary coded decimal (BCD), alphanumeric code, etc., can also be used in accordance with the present invention. If more than four data types need to be defined, at least a portion of the reserved bits (D15-D4) can be used in conjunction with the bits D3D2 to define the data types. Further, the data types can be defined using any bits in the
PROP_DESP. Using PR0P_NUM, the user can create an index to objects in the object property table. The index establishes the order of the objects, thereby facilitating the management of the objects. TABLE 1
Figure imgf000016_0001
The content segment of the object property table 5 contains objects. The number of objects in the content segment is indicated by PROP_NUM in the descriptor segment in the object property table. Because of the object oriented mapping method in accordance with protocol 30 of the present invention, different objects 0 in the content segment of the object property table preferably have the same structure . Figure 3 illustrates an exemplary structure of an object 35 in the object property table in accordance with the present invention. In a preferred embodiment, object 5 35 includes six terms, which are object type description (OB_TYPE) , address pointer (0B_ADDR) , object memory type (OB_MEMO) , object data attribution (0B_ATTR1 and OB_ATTR2) , object data size (OB_SIZE) , and object name (OB_NAME) . These six terms form a 0 description section 33 of object 35. The byte length and the function of each term in object 35 are described in Table 2 by way of example . As shown in Fig. 3, a plurality of data fields including an event control byte (ECB) , Data_Field_l, and Data_Field_2 form a data section 37 are generally located in microprocessor 25A. It should be understood that this is not a limitation on the present invention. In accordance with the present invention, the data fields can be stored in any memory accessible by microprocessor 25A. In addition, the present invention is not limited to establishing three data fields as shown in Fig. 3. Depending on the applications of microprocessor 25A, any number of data fields, e.g., one, two, four, five, etc., can be established. The data types of Data_Field_l and Data_Field_2 include unsigned and signed binary, unsigned and signed word, unsigned and signed double word, floating point data, ASCII, UNICODE, etc. Figure 3 also shows that description section 33 (OB_TYPE, OB_MEMO, OB_ADDR, 0B_ATTR1, OB_ATTR2, OB_SIZE, and OB_NAME) is stored in signal adapter 20A and data section 37 (ECB, Data_Field_l, and Data_Field_2) is stored in microprocessor 25A. However, this is not intended as a limitation on the present invention. Description section 33 can also be stored anywhere in communication system 10 (shown in Fig. 1) where signal adapter 20A can access, e.g., in microprocessor 25A, in network gateway 12, or in a server connected to network 15 shown in Fig. 1. Likewise, data section 37 can be stored in any memory accessible to microprocessor 25A. Depending on the object type, OB_ADDR can point to different addresses as described herein below. 0B_NAME serves to identify each object 35 in the object property table . TABLE 2
Figure imgf000018_0001
A constant is generally used for describing fixed parameters objects such as, for example, the name, serial number, model or edition, number, protocol, etc. of the apparatus. In this context, the constant functions as an object identifier. By way of example, when microprocessor 25A is used to control an air conditioning system, the constant can be used to identify its model number, manufacturer name, serial 0 number, etc. The constant can also include parameters for describing other object characteristics as defined by the user. The constant is preferably a read only data in order to maintain its constancy.
The constant needs to fill only one data field, 5 e.g., Data_Field_l . Thus, Data_Field_2 is blank when object 35 is a constant. In one preferred embodiment, 0B_ADDR points to Data_Field_l, which stores the value of the constant, 0B_ATTR2 stores the code of the constant name, and 0B_NAME is blank. In this embodiment, 0B_ATTR1 describes the data type of the constant value stored in Data_Field_l and 0B_SIZE is set to be the size of Data_Field_l . In another preferred embodiment, OB_ADDR points to 0B_NAME, which stores the value of the constant, 0B_ATTR2 stores the code of the constant name, and Data_Field_l is blank.
In this embodiment, 0B_ATTR1 describes the data type of the constant value stored in 0B_NAME and 0B_SIZE is set to be zero. In yet another preferred embodiment, where the constant is represented by its value only, 0B_ADDR is pointed to Data_Field_l, which stores the value of the constant, and 0B_NAME is blank. In this embodiment, 0B_ATTR1 describes the data type of the constant value stored in Data_Field_l, 0B_ATTR2 is blank, and 0B_SIZE is set to be the size of Data_Field_l . In an additional embodiment, where the constant is also represented by its value only, 0B_ADDR is pointed to 0B_NAME, which stores the value of the constant, and Data_Field_l is blank. In this embodiment, 0B_ATTR1 describes the data type of the constant value stored in OB_NAME, 0B_ATTR2 is blank, and OB_SIZE is set to be zero.
A variable typically represents those quantities that do not have fixed values, e.g., temperature, humidity, current, voltage, time, etc. A variable has only one data field, e.g., Data_Field_l . Thus,
Data_Field_2 can be left blank when object 35 is a variable. 0B_ADDR points to Data_Field_l, which stores the value of the variable, and 0B_ATTR1 describes the data type of the variable stored in Data_Field_l . OB SIZE is set to the size of Data Field 1. In one preferred embodiment, OB_NAME stores the name of the variable and 0B_ATTR2 is left blank. In another preferred embodiment, OB_ATTR2 stores the code of the variable name and 0B_NAME is left blank. The type of object 35 can also be an event. When an event happens, microprocessor 25A may report it to network 15 via signal adapter 20A shown in Fig. 1. By way of example, an event may be the triggering of an alarm in a home security system, a temperature surpassing a user defined temperature upper limit in an air conditioning system, a carbon monoxide concentration over a safe limit, a noise level passing a certain decibel level, etc. An event is represented by the ECB in object 35. In a preferred embodiment, bit D7 in the ECB indicates whether the event can be reported to signal adapter 20A and, therefore, is referred to as an enabling bit. For example, when the enabling bit D7 is one, the reporting is enabled and the event can be reported to signal adapter 20A. On the other hand, when the enabling bit D7 is zero, the reporting is disabled. The enabling bit D7 can be set either by network gateway 12 through signal adapter 20A or by microprocessor 25A. Bit D6 indicates whether the event is triggered by a change in certain parameters, e.g., temperature, humidity, carbon monoxide concentration, noise decibel, etc., and is sometimes referred to as a parameter bit. The parameter bit D6 is set by microprocessor 25A. There are two situations in which the parameter bit D6 is zero. One is that the event is not associated with a parameter, and the other is that the event is not triggered by the parameter associated therewith or the parameter is not reported to signal adapter 20A. Microprocessor 25A sets the parameter D6 in the ECB to one when the event is triggered by a parameter and that parameter is to be reported to signal adapter 20A with the event. When microprocessor 25A reports an event triggered by a parameter. The parameter is stored in Data_Field__l . Microprocessor 25A sends an address pointer of Data_Field_l when microprocessor 25A reports the event to signal adapter 20A. Bits D5, D4, and D3 are reserved for future development. Bit D2 is a user defined bit. Bit DI is referred to as a connection bit and indicates whether the event requires signal adapter 20A to be connected to network gateway 12 when the event happens . By way example, the connection bit DI being one indicates that the reported event requires signal adapter 20A to be connected to network gateway 12, thereby enabling signal adapter 20A to report the event to network 15 through network gateway 12. If signal adapter 20A is already connected to network gateway 12 when the event is reported to signal adapter 20A, the connection bit DI in ECB is ignored. Bit DO is referred to as an event status bit. The event status bit DO is set to one upon the triggering of the event. After reporting the event to signal adapter 20A and receiving a confirmation signal from signal adapter 20A in a subsequent event polling command, microprocessor 25A resets the event status bit DO to zero.
Like that of the variable, the name of the event can be stored in 0B_NAME and the code of the event name can be stored in 0B__ATTR2. OB_ADDR points to ECB. An event has at most only one data field, e.g., Data_Field_l . Thus, Data_Field_2 can be left blank when object 35 is an event. When the parameter bit D6 in ECB is zero, there is no parameter reporting to signal adapter 20A. In this situation, 0B_ATTR1 and Data_Field_l can be blank. When the parameter bit D6 in ECB is one, there is a parameter reporting from microprocessor 25A to signal adapter 20A. The parameter can be stored in Data_Field_l . 0B_ATTR1 indicates the data type of the parameter stored in Data_Field_l . 0B_SIZE indicates the size of Data_Field_l .
A function includes an input parameter and an output parameter. Signal adapter 20A transmits an input parameter to microprocessor 25A. Microprocessor 25A receives the input parameter, executes the input parameter, and transmits an output parameter to signal adapter 20A. In a preferred embodiment, the input parameter is a write only data and the output parameter is a read only data with respect to signal adapter 20A. Because it includes both input and output parameters, the function generally requires two data fields. Data_Field_l can store the input parameter and Data_Field_2 can store the output parameter. 0B_ADDR is points to Data_Field_l . 0B_ATTR1 and 0B_ATTR2 indicate the data types of the input and output parameters, respectively. 0B_SIZE is divided into two segments. The first segment indicates the size of Data_Field_l and the second segment indicates the size of Data_Field_2. 0B_NAME stores the name of the function. A file in object 35 can be any kinds of file, e.g. text file (.txt), binary file (.bin), hexadecimal file (.hex), executable file (.exe), image file (.gif), word document file (.doc), hypertext mark language file (.html), etc. Because the file requires only one data field, e.g., Data_Field_l, Data_Field_2 can be blank during the file transmission. OB_ADDR is points to Data_Field_l . 0B_ATTR1 indicates the data type of the file in Data_Field_l, and OB_SIZE indicates the size of the file in Data_Field_l . In one preferred embodiment, OB NAME stores the name of the file and OB ATTR2 is left blank. In an alternative preferred embodiment, OB_ATTR2 stores the code of the file name and OB_NAME can store the file name or be left blank.
PROTOCOL DATA PACKET After mapping the object property table, information regarding a particular object 35 is preferably transmitted between signal adapter 20A and microprocessor 25A in the form of data packets. A data packet transmitted between signal adapter 20A and microprocessor 25A in accordance with communication protocol 30 preferably includes a size segment, a command segment, and a data segment. The size segment indicates the size of the data packet in terms of bytes. The command segment controls the signal transmission between signal adapter 20A and microprocessor 25A. In one preferred embodiment, the command segment has five bytes : one byte for the command, two bytes for command parameter, and two bytes for command subparameter. The command parameter and command subparameter serves to supplement the command byte for correct and efficient command transmission and execution. The data segment contains the information to be transmitted between signal adapter 20A and microprocessor 25A. The byte length of the data segment is variable depending on the amount of the information to be transmitted.
COMMAND
Signal adapter 20A and microprocessor 25A has a master-slave relationship. Only signal adapter 20A can initiate commands. Microprocessor 25A responds the commands transmitted from signal adapter 20A. If microprocessor 25A does not respond a command from signal adapter 20A, signal adapter 20A preferably repeats transmitting the command to microprocessor 25A until microprocessor 25A responds. After a predetermined number of command transmissions without response from microprocessor 25A, signal adapter 20A detects a timeout mistake. In accordance with a preferred embodiment, the commands between signal adapter 20A and microprocessor 25A belong to several categories: control commands, setup commands, read/write commands, event polling/reporting commands, object property table mapping commands, and In- Application re-Programming (IAP) commands.
A command byte includes two parts, command type and command status. By way example, bits D4-D0 make up the command type, and bits D7-D5 make up the command status. The commands include control commands, setup commands, read commands, write commands, etc. In a preferred embodiment, the command status includes a MORE bit (D7) , an ERROR bit (D6) , and an ONLINE bit (D5) . The MORE bit (D7) indicates whether the current data packet includes all data to be transferred. The value in the ERROR bit (D6) is set in a response command, indicating whether the initial command has been successfully received and executed. The ONLINE bit (D5) indicates whether signal adapter 20A is connected to network 15 via network gateway 12.
Because of its slave status, microprocessor 25A cannot initiate a command to signal adapter 20A. Microprocessor 25A can only responds to commands from signal adapter 20A. Generally, a command from signal adapter 20A requires an in kind response from microprocessor 25A in the sense that READ command from signal adapter 20A requires a response READ command from microprocessor 25A, or the like. An exception to this general rule is that microprocessor 25A can response to any command from signal adapter 20A with a control command to initialize or reset signal adapter 20A. This capability allows microprocessor 25A to specify and modify the operation model of signal adapter 20A at anytime when signal adapter 20A is communicating with microprocessor 25A. Preferably, microprocessor 25A sends a control command to signal adapter every time when signal adapter 20A initiates a connection to microprocessor 25A, thereby initializing signal adapter 20A. In a preferred embodiment, the control command can be used to select the communication method between signal adapter 20A and network gateway 12, initialize and reset signal adapter 20A, connect signal adapter 20A to network gateway 12, disconnect signal adapter 20A from network gateway 12, and place signal adapter 20A into a low power consumption sleep state. Initializing signal adapter 20A includes specifying communication types, e.g., RS-485, RS-232, USB, MODEM, etc. between signal adapter 20A and network gateway 12, specifying the data transmission capacity and speed between signal adapter 20A and microprocessor 25A, specifying the polling rate, specifying the security codes, etc. Further, the control command can preferably be used to acquire the communication capability of microprocessor 25A, select the communication speed between signal adapter 20A and microprocessor 25A, select the MODEM type when signal adapter 20A communicates with microprocessor 25A via a MODEM, and determine the security state of the apparatus controlled and/or monitored by microprocessor 25A. Through the control command, signal adapter 20A can preferably read the security code of the apparatus from microprocessor 25A, read the telephone number from microprocessor 25A when the communication is through a MODEM, and read the network address of network gateway 12 if the communication between signal adapter 20A and network gateway 12 is through RS-485 or ether net. It should further be understood that if the object property table is stored in microprocessor 25A or a memory accessible to microprocessor 25A, the PROP_DESP term in the object property table is preferably mapped to signal adapter 20A when signal adapter 20A is initialized.
The setup commands are initiated by signal adapter 20A to modify certain communication modes of microprocessor 25A. For example, one function of the setup commands is setting up or changing the network address of microprocessor 25A. Another function of the setup function is implementing or changing security codes in microprocessor 25A.
The READ command enables signal adapter 20A to read object data, e.g., an object in the object property table, from microprocessor 25A. In the case that the data is too large to be packaged in one data packet, microprocessor 25A can send data to signal adapter 20A in several data packets. In this case, microprocessor 25A notifies signal adapter 20A that there is at least an addition data packet following the one being sent to signal adapter 20A by setting a particular bit, e.g., the MORE bit D7, in the return READ command to one . Upon receiving the return READ command with the MORE bit D7 set to one, signal adapter 20A initiates an additional READ command to read additional data from microprocessor 25A. This reading process continues until microprocessor 25A sets the
MORE bit D7 in the return READ command to zero when there is no additional data to be sent to signal adapter 20A.
A write command, referred to as WRIT by way of example, enables signal adapter 20A to send data regarding object 35 in the object property table to microprocessor 25A. If the object is a function, the WRIT command sends the input parameter to microprocessor 25A. Upon receiving the input parameter, microprocessor 25A generates an output parameter in Data_Field_2 of the object 35. The output parameter or the pointer to the output parameter Data_Field_2 is transmitted to signal adapter 20A when signal adapter 20A sends a READ command to microprocessor 25A.
Signal adapter 20A can also initiate a command, referred to as RDEV by way of example, to poll an event from microprocessor 25A. As discussed supra, signal adapter 20A and microprocessor 25A has a master-slave relationship with respect to each other. When an event takes place, e.g., a fire alarm is triggered, microprocessor 25A preferably is capable of taking actions in response to the event, e.g., activating the fire suppression sprinkler, in accordance with a predetermined program in microprocessor 25A without instruction from signal adapter 20A. Upon receiving the RDEV command from signal adapter 20A, microprocessor 25A reports the event to signal adapter 20A. Depending on the nature of the event, signal adapter 20A may ignore the event and/or report the event to network 15 via network gateway 12. Preferably, signal adapter 20A periodically sends RDEV commands to microprocessor 25A to poll the events. Preferably, the RDEV commands poll the events in the object property table according to a predetermined order. Microprocessor 25A reports the events to signal adapter 20A in an order determined by the event priority and the event polling sequence of signal adapter 20A. A command, referred to as WREV by way of example, enables signal adapter 20A to set the value of the enable bit (D7) in the ECB, thereby determining whether microprocessor 25A is permitted to report the event associated with the ECB to signal adapter 20A. Because microprocessor 25A is a slave with respect to signal adapter 20A, the event is not reported to signal adapter 20A by the initiation of microprocessor 25A. Microprocessor 25A reports the event to signal adapter 20A upon receiving the RDEV command from signal adapter 20A.
In accordance with the present invention, the object property table can be stored in any memory location accessible to signal adapter 20A or microprocessor 25A. For example, the object property table can be stored in microprocessor 25A, signal adapter 20A, network gateway 12, or a server (not shown in Fig. 1) on network 15. The object property table mapping commands provide access to the object property table from anywhere in the communication system between network 15 and microprocessor 25A. In one embodiment, the object property table mapping commands transmit the pointers pointing to the object property table to a desired location in communication system shown in Fig. 1, e.g., signal adapter 20A, network gateway 12, a server on network 15, etc. In another embodiment, the object property table mapping commands transmit the contents the object property table to a desired location in communication system shown in Fig. 1, e.g., signal adapter 20A, network gateway 12, a server on network 15, etc.
In the case that the object property table is stored in microprocessor 25A, signal adapter 20A can send a command, referred to as RDPR by way of example, to access the object property table. In a preferred embodiment, the RDPR command maps- the description section of the object property table from microprocessor 25A to signal 20A. This mapping process is preferably performed each time when signal adapter 20A is initialized or reset.
In addition, the object property table can preferably be modified, thereby allowing the system to be upgraded or updated. When microprocessor 25A is programmed to control a different apparatus, it is also desirable to modify the object property table accordingly. Alternatively, a new object property table is installed in communication system 10. In the case when the object property table is stored in signal adapter 20A, it can be modified by downloading the information from network 15 to signal adapter 20A. In the case when the object property table is stored in microprocessor 25A or a memory accessible to microprocessor 25A, signal adapter 20A downloads the modification from network 15 and modifies the object property table through the IAP commands described infra.
In-Application re-Programming (IAP) COMMANDS
In a preferred embodiment, communication protocol 30 supports in-application re-programming (IAP) in microprocessor 25A. Through IAP, microprocessor 25A is capable of modifying its programming codes during the execution of an application. Communication protocol 30 of the present invention enables the IAP of microprocessor 25A to be initiated from network 15 or from network gateway 12. This network IAP initiation feature is referred to as WeblAP.
To perform IAP, microprocessor 25A preferably includes a memory structure 40 as shown in Fig. 4. Memory structure 40 includes an application memory block or array 42 and an IAP memory block or array 44 independent of each other. IAP memory array 44 includes IAP management codes 45. IAP management code block 45 can include software codes stored in IAP memory array 44 or hardware circuitry coupled to IAP memory array 44. In accordance with a preferred embodiment of the present invention, application memory array 42 and IAP memory array 44 include programmable non-volatile memory such as, for example, FLASH memory, electrically erasable and programmable read only memory (EEPROM) , etc. In accordance with an alternative embodiment, IAP memory array 44 includes a non-volatile memory for storing the IAP management codes in block 45 and a volatile memory for the IAP operation. A memory array controller 46 controls the access to application memory array 42 and IAP memory array 44.
Figure 5 is a flow chart describing an IAP process 100 in accordance with the present invention. A user on network 15 can request an IAP by sending the request and new programming codes to network gateway
12. Network gateway 12 relays the IAP request and the new programming codes to signal adapter 20A. In order to perform IAP process 100, signal adapter 20A preferably has the information regarding the address, size, and type of the programming codes in microprocessor 25A. In accordance with the present invention, signal adapter 20A can access this information from microprocessor 25A through a READ command . First, signal adapter 20A transmits an IAP request signal to microprocessor 25A to initiate IAP process 100 in a step 102. Microprocessor 25A may have an IAP security code to safeguard its application system. The IAP request signal preferably also has a security code therein. The security code in the IAP request signal is generally provided to signal adapter 20A by a user (not shown in Fig. 1) on network 15. In a step 103, a security code in the IAP request signal is compared with the security code in microprocessor 25A. If the security codes do not match, IAP process 100 is terminated in a step 118. If the security codes match or microprocessor 25A does not have an IAP security code, microprocessor 25A sends a response to signal adapter 20A indicating the permission to continue IAP process 100 in a step 104. Furthermore, memory array controller 46 transfers a duplicate copy of the programming codes to be re-programmed from application memory array 42 to IAP memory array 44. Subsequently in a step 106, signal adapter 20A sends an erase signal to microprocessor 25A to erase the original copy of the' programming codes from application memory array 42 (shown in Fig. 4) . In a step 108, signal adapter 20A sends programming codes to microprocessor 25A. Through IAP management code 45, microprocessor 25A implements the new program codes into application memory array 42. The new program codes are transmitted from signal adapter 20A to microprocessor 25A in data packets. Each data packet has a bit, referred to as MORE bit by way of example, indicating whether there is additional programming codes following the current data packet. In a step 111, microprocessor 25A reads the MORE bit to determine whether there are additional data packets for the programming code. If there is more data packet, IAP process returns to step 108. The loop comprised of steps 108 and 111 repeats itself until signal adapter 20A finishes sending programming codes to microprocessor 25A. After finishing sending programming codes to microprocessor 25A, signal adapter 20A sends a verification signal to microprocessor 25A in a step 112. In a preferred embodiment, microprocessor 25A sends the pointers to and the size of the newly implemented programming codes to signal adapter 20A in response to the verification signal. In an alternative embodiment, microprocessor 25A sends the content of newly implemented programming codes to signal adapter 20A in response to the verification signal. Signal adapter 20A verifies the implemented programming codes to determine whether it is correctly implemented. After the verification, signal adapter 20A sends a finish signal to microprocessor 25A and notifies microprocessor 25A the verification result in a step 114. In a step 115, microprocessor 25A receives the verification result from signal adapter 20A. If the programming code is not correctly implemented, signal adapter 20A resends an erase signal to microprocessor 25A to erase the incorrectly implemented programming codes from application memory array 42 in step 106.
Thus, IAP process 100 repeats steps 106, 108, 111, 112, and 114. If the verification indicates that the programming code is correctly implemented, microprocessor 25A releases the newly implemented programming codes in application memory array 42 in a step 116. Then, IAP process 100 terminates in step 118.
If steps 106, 108, 111, 112, and 114 in IAP process 100 are repeated for a predetermined number of times, e.g., five, ten, or twenty, due to incorrect implementation, IAP process 100 will generate an error message and abort .
In one preferred embodiment, the duplicate copy of the programming codes to be re-programmed is stored in IAP memory array 44 for safekeeping while the new programming codes is implemented in application memory array 42 in steps 108, 111, 112, 114, and 115. If IAP process 100 is interrupted, e.g., by a power failure, network connection failure, etc., The duplicate copy stored in IAP memory array 44 is restored to application memory array 42. In addition, microprocessor 25A can continue the execution of the programming codes in IAP memory array 44 while the new programming codes are implemented in application memory array 42. If the programming codes are too large to be implemented in a single IAP process, IAP process 100 can includes several sub-processes. Each sub-process re-programs a portion of the programming codes stored in a memory block in application memory array 42. IAP process 100 in accordance with the present invention allows efficient modification of the programming codes in microprocessor 25A. IAP process 100 is beneficial to keeping the programming codes updated and implementing any new programs, e.g. a new control program for operating an apparatus coupled to microprocessor 25A.
By now it should be appreciated that a protocol for communicating between a microprocessor and an interface has been provided. In accordance with the present invention, the communication protocol, which is referred to as MCUNet by way of example, creates an object property table. The mapping of the object property table enables the identification, description, controlling, monitoring, and modification of the objects, e.g., the temperature in an air conditioning unit, in the microprocessor. The protocol establishes a master-slave relationship between the interface signal adapter and the microprocessor, thereby providing a reliable and robust communication link between the interface and the microprocessor. The communication protocol also supports the IAP process in the microprocessor. Using the communication protocol of the present invention, the communication between the microprocessor and a network, e.g., the Internet, can be established without modifying the software and hardware structures of existing microprocessors. The designers of the microprocessors are not required to be familiar with the network protocol. The protocol can be implemented with microprocessors, MCUs, CPUs, etc., of various capabilities, performances, bit numbers, and memory sizes. Thus, the development time and cost of a microprocessor-network system in accordance with the present invention are significantly reduced compared with prior art microprocessor-network communication systems. The protocol of the present invention is simple, reliable, and cost efficient. In addition, the communication protocol of the present invention can be readily implemented with microprocessors in a user's existing application systems.

Claims

1. A method for communicating between a microprocessor and a signal adapter, comprising the steps of : establishing an object property table by setting up a data field and a pointer; filling an object into the object property table; and mapping the object property table from the microprocessor to the signal adapter.
2. The method as claimed in claim 1, wherein the step of filling an object into the object property table includes the steps of : storing a constant in the data field; and pointing the pointer to the data field.
3. The method as claimed in claim 1, wherein the step of filling an object into the object property table includes the steps of: storing a variable in the data field; and pointing the pointer to the data field.
4. The method as claimed in claim 1, wherein the step of filling an object into the object property table includes the steps of: storing a file in the data field; and pointing the pointer to the data field.
5. The method as claimed in claim 1, wherein: the step of establishing an object property table further includes setting up an event code byte; and , the step of filling an object into the object property table includes the steps of: storing an event in the event code byte; and pointing the pointer to the event code byte.
6. The method as claimed in claim 5, wherein the step of filling an object into the object property table includes storing a parameter associated with the event in the data field.
7. The method as claimed in claim 1, wherein: the step of establishing an object property table further includes setting up a second data field; and the step of filling an object into the object property table includes the steps of: transmitting a first parameter from the signal adapter to the microprocessor;
storing the first parameter in the data field; pointing the pointer to the data field; and storing a second parameter in the second data field in response to the first parameter in the data field.
8. The method as claimed in claim 1, wherein: the step of establishing an object property table further includes setting up an object name field; and the step of filling an object into the object property table includes using the object name field to identify the object.
9. The method as claimed in claim 1, wherein: the step of establishing an object property table further includes setting up an object memory type field; and the step of filling an object into the object property table includes using the object memory type field to describe a memory type and a memory access type of the object.
10. The method as claimed in claim 1, wherein: the step of establishing an object property table further includes setting up a size field; and the step of filling an object into the object property table includes using the size field to describe a size of the data field.
11. The method as claimed in claim 1, wherein the step of mapping the object property table includes mapping a pointer pointing to the object property table to the signal adapter, the pointer enabling the signal adapter to access the data field in the object property table.
12. The method as claimed in claim 1, further comprising the step of establishing a master- slave relationship between the signal adapter and the microprocessor with the signal adapter being a master and the microprocessor being a slave, the master initiating a command to the slave and the slave responding the command from the master.
13. The method as claimed in claim 12, further comprising the steps of: sending a first command from the signal adapter to the microprocessor; and sending a response command to the signal adapter in response to the first command.
14. The method as claimed in claim 13, wherein the step of sending a response command to the signal adapter includes sending a control command to the signal adapter.
15. The method as claimed in claim 14, wherein the step of sending a control command to the signal adapter includes initializing the signal adapter.
16. The method as claimed in claim 14, wherein the step of sending a control command to the signal adapter includes resetting the signal adapter.
17. The method as claimed in claim 12, further comprising the step of sending a setup command from the signal adapter to the microprocessor.
18. The method as claimed in claim 17, wherein the step of sending a setup command further includes establishing a network address of the microprocessor.
19. The method as claimed in claim 17, wherein the step of sending a setup command further includes implementing a security code in the microprocessor.
20. The method as claimed in claim 1, further comprising the step of transmitting a program code to the microprocessor to performing In-Application re-Programming.
21. A communication protocol between a microprocessor and an interface, comprising the steps of: establishing a master-slave relationship between the interface and the microprocessor with the interface being a master and the microprocessor being a slave; periodically transmitting an event polling command from the interface to microprocessor; and transmitting a response command from the microprocessor to the interface in response to the event polling command.
22. The communication protocol of claim 21, wherein the step of transmitting a response command includes transmitting a control command to the interface.
23. The communication protocol of claim 21, wherein the step of transmitting a response command includes the step of reporting an event to the interface.
24. The communication protocol of claim 21, wherein the step of reporting an event further includes reporting a parameter that triggers the event to the interface.
25. The communication protocol of claim 21, further comprising the steps of : establishing an object property table including an object name, an object address pointer, an object memory type, and a data field; and mapping the object property table to the interface .
26. The communication protocol of claim 25, wherein: the step of establishing an object property table further includes pointing the object address pointer to the data field; and the step of mapping the object property table includes creating the object name, the object address pointer, and the object memory type in the interface .
27. The communication protocol of claim 25, wherein the step of establishing an object property table further includes setting up an event code byte and pointing the object address pointer to the event code byte .
28. The communication protocol of claim 25, wherein the step of establishing an object property table further includes setting up object attribution field for describing a data type of data field.
29. The communication protocol of claim 25, wherein the step of establishing an object property table further includes setting up a second data field.
0. The communication protocol of claim 21, further comprising the steps of performing In-Application re-Programming in the microprocessor.
31. An object property table, comprising: a description section stored in a first memory location and including: an object type descriptor; an object memory type; and an object address pointer; and a data section stored in a second memory location and including a first data field.
32. The object property table of claim 31, wherein the object address pointer points to the first data field.
33. The object property table of claim 31, wherein the object type descriptor defines an object type selected from the group consisting of constant, variable, function, file, and event.
34. The object property table of claim 31, wherein the data section is stored in a memory location accessible by a microprocessor.
35. The object property table of claim 34, wherein the description section is stored in a memory location accessible by a signal adapter coupled to the microprocessor.
36. The object property table of claim 34, wherein the description section is stored in a memory location accessible by network gateway coupled to the microprocessor via a signal adapter.
37. The object property table of claim 34, wherein the description section is stored in a memory location accessible by a server on network coupled to the microprocessor via a signal adapter.
38. The object property table of claim 31, wherein the data section further includes an event code byte .
39. The object property table of claim 31, wherein the description section further includes an object attribution field describing a data type of the first data field in the data section.
40. The object property table of claim 31, wherein: the object type descriptor in the description section defines a function; and the data section further includes a second data field, the first data field storing an input parameter of the function and the second data field storing an output parameter of the function.
PCT/US2001/043952 2000-11-28 2001-11-16 Microprocessor-interface communication protocol WO2002044925A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
AU2002225723A AU2002225723A1 (en) 2000-11-28 2001-11-16 Microprocessor-interface communication protocol

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US72494400A 2000-11-28 2000-11-28
US09/724,944 2000-11-28

Publications (1)

Publication Number Publication Date
WO2002044925A1 true WO2002044925A1 (en) 2002-06-06

Family

ID=24912521

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2001/043952 WO2002044925A1 (en) 2000-11-28 2001-11-16 Microprocessor-interface communication protocol

Country Status (2)

Country Link
AU (1) AU2002225723A1 (en)
WO (1) WO2002044925A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2242207A3 (en) * 2002-10-02 2012-10-03 Mitsubishi Electric Corporation Communication adapter apparatus
CN113311931A (en) * 2021-06-08 2021-08-27 合肥磐芯电子有限公司 Double-reset vector 8-bit MCU (microprogrammed control Unit) architecture convenient for IAP (inter Access Point) and method thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4210780A (en) * 1978-03-27 1980-07-01 The Mitre Corporation Multiple access digital communications system
US5323393A (en) * 1992-11-18 1994-06-21 Canon Information Systems, Inc. Method and apparatus for obtaining and for controlling the status of a networked peripheral

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4210780A (en) * 1978-03-27 1980-07-01 The Mitre Corporation Multiple access digital communications system
US5323393A (en) * 1992-11-18 1994-06-21 Canon Information Systems, Inc. Method and apparatus for obtaining and for controlling the status of a networked peripheral

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
GUSTAVSON ET AL.: "Scalable coherent interface: Links to the future", IEEE, 1992, pages 322 - 327, XP010027159 *
WEBCHIP TECHNOLOGY WHITE PAPER, 7 November 2001 (2001-11-07), pages 1 - 13, XP002908382 *
WEBCHIPSERVER USER'S MANUAL, September 2001 (2001-09-01), pages 1 - 35, XP002908383 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2242207A3 (en) * 2002-10-02 2012-10-03 Mitsubishi Electric Corporation Communication adapter apparatus
CN113311931A (en) * 2021-06-08 2021-08-27 合肥磐芯电子有限公司 Double-reset vector 8-bit MCU (microprogrammed control Unit) architecture convenient for IAP (inter Access Point) and method thereof

Also Published As

Publication number Publication date
AU2002225723A1 (en) 2002-06-11

Similar Documents

Publication Publication Date Title
US7287062B2 (en) Home network system and method for operating the same
EP1029406B1 (en) Method of reprogramming memories in field devices over a multidrop network
US20020124007A1 (en) Network server and database therein
US6182130B1 (en) Method for enhancing the performance of a network
US8073439B2 (en) Control system and method for operating a transceiver
USRE43677E1 (en) Apparatus for restoring network information for home network system and method thereof
US20060136899A1 (en) Method for programming/updating software using USB OTG
US20130080585A1 (en) Method for transmitting data via a canopen bus
WO1992016904A1 (en) Binder interface structure
KR20040103352A (en) Home network system
US6922598B2 (en) System and method for transferring home appliance control data
US20090073972A1 (en) Address management method and message transmitting and receiving method in network control system
WO2013097481A1 (en) Method and system for identifying file type
CN1960276B (en) Remote control system and method
CN113655737B (en) Vehicle-mounted electronic controller rapid upgrading system and method transmitted through CAN
WO2002044925A1 (en) Microprocessor-interface communication protocol
WO2002044837A2 (en) Local network communication protocol
US6718397B1 (en) Network adapter for providing initialization and protocol translation between a microprocessor and a network interface
CN111654529A (en) Remote monitoring method and device for vapor phase drying equipment
Demirbaş et al. Arm Based Modbus TCP Distributed Input-Output Device Design with Updatable Firmware Via Modbus TCP Communication Protocol
CN112765076B (en) MODBUS data processing method, device, equipment and computer readable storage medium
EP1481296B1 (en) Household appliance with communication unit for external control
WO2002044836A2 (en) Microprocessor-network communicaiton method and apparatus
KR102200205B1 (en) Iot system using protocol converting apparatus and operating method thereof
US20240152479A1 (en) Method for transmitting data according to a protocol comprising a class of communication interface objects of the serial port type, and electronic device executing said method

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NO NZ PL PT RO RU SD SE SG SI SK SL TJ TM TR TT TZ UA UG UZ VN YU ZA ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GH GM KE LS MW MZ SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
REG Reference to national code

Ref country code: DE

Ref legal event code: 8642

122 Ep: pct application non-entry in european phase
NENP Non-entry into the national phase

Ref country code: JP

WWW Wipo information: withdrawn in national office

Country of ref document: JP