1. Field of the Invention
The present invention relates systems containing devices on a serial network and more particularly to a method and apparatus for discovery and enumeration of sequentially networked devices.
2. Description of the Prior Art
In a system of devices that are networked, it is often desirous to uniquely identify each device on the network. Some methods of setting the identity (ID) of the device involve setting jumpers on the devices circuit board or programming a number in the memory of the device. Some devices have a push button that will allow the ID to be set. All of these techniques require some intervention by an operator and therefore are cumbersome and subject to the possibility of an error in procedure. It is therefore desirous to automate the process of ID assignment. Some systems perform auto enumeration (auto addressing) using the “Bus Shunt Technique’ or BSM. This technique requires significant additional circuitry including current sources and differential amplifiers. Another technique for auto addressing is the “Extra Wire Daisy Chain” This method actually uses two connections in addition to the communication wire for every device. These wires are used to inefficiently convey information as to which device is in turn to get its ID. This method requires the wiring harness to contain an additional wire.
The present invention automates the process of assigning unique IDs to sequentially networked devices. In addition the invention allows for the discovery of the number of devices on the network as well as the type of these devices. The present invention does not require any additional wires in the wiring harness. A single wire communication scheme with a standard bit format compatible with most microprocessor UARTs is typically used as a serial bus or serial communications network. The system and method of the present invention allows rapid and accurate self-identification of nodes on the network.
Each node has a switch that can disable all downstream communications. Nodes power-up with the switches closed. A controller broadcasts for all switches to be opened. Then the controller repetitiously orders each node with unassigned ID to take the current ID, close its switch and respond. This process continues until all nodes have an ID. Network terminations can be switched in either automatically, or by command from the controller wherever the end of the network is during the ID process.
Attention is now directed to one or more figures that illustrate features of the present invention.
Drawings and illustrations are provided to aid in understanding the present invention. The scope of the present invention is not limited to what is shown in the figures.
The present invention automates the process of assigning unique IDs to sequentially networked devices. In addition the invention allows for the discovery of the number of devices on the network as well as the type of these devices. In an automotive application, the physical interface typically is a LIN transceiver. The present invention can be employed on any communication network using any number of communications protocols or I/O transceivers. The description for a single wire communications scheme follows.
In the normal state, each node (device on the network) is able to communicate to any other device on the network. It is understood that there may be higher level protocols in place specifying at which time a particular node is allow to transmit, but electrically any node that does transmit will have its message seen by all the nodes on the system. Generally the first device is a master device and remaining devices are slaves.
To enumerate the devices, a command is sent from the master controller (PC or MCU etc.) telling the devices to open their respective switches. This command is considered a broadcast or global command because all devices carry out the command regardless of their respective IDs. It is preferred to send out this command several times (typically 3) with the devices designed to wait a small amount of time before carrying out this function (typically around 1 sec.) This allows for the contingency that if one or more of the devices misses the command, the communications link is not severed before additional requests can be seen downline. After the prescribed timeout, all of the devices outputs are switched off from communicating to the next device downline. In addition opening their respective switches, the devices reset their IDs to null. A zero ID is typical, but any number can be used to identify the device as not having an ID. It could also simply be marked by a flag in software, or by any other marking technique.
Next the controller sends a command (another broadcast command) asking for the first unassigned device on the system to take the device ID of ‘one’ (or any other unique ID number such as the number N, where N is a positive integer). The first device is the only device capable of seeing this command, because all subsequent devices have been cut off from communications. The device can either automatically respond that it took the ID, or the system can be designed to require a specific query by the controller. Either way, after the ID is assigned, the switch at the first node is then closed to allow communications to the next device (second device). The switch closure could happen automatically after ID assignment, or could be commanded by the controller. At this point both the first and the second device in the system will be able to ‘see’ communications coming from the master controller (or each other). The controller then commands any device on the system that does not have an ID to take the next unique ID. Typically, the next ID will be ‘two’. The commend can contain the next unique ID. The first and second device both see this command, but since the first device already has an ID, the second device is the only device that will accept the command. Again, after the assignment of an ID, the switch is closed to allow the next stage to be in communication (the third device in this example). This process continues until no device responds to taking the next unique ID. That indicates that all the devices have been assigned an ID. In practice it is preferred to have a process of timeouts and retries to make sure that a communication wasn't simply missed. At this point in the process, all devices on the network have been uniquely enumerated (given an ID) and can be individually commanded.
In addition to assigning addresses, the master controller has also learned the number of devices on the system. This allows for topologies in which the number of devices may be variable. The controller can use the knowledge of the number of devices, along with queries of the specific devices, to adapt the system or assign resources etc. For example, in a vehicle, perhaps one device is an optional inside cabin temperature sensor. The device could be placed anywhere in the chain of communications. Once the all of the devices are enumerated, the controller knows how many devices it needs to query. It can then ask each device what it is. The optional cabin temperature sensor would respond when queried and the controller would then know the unique ID that was assigned to the cabin temperature sensor. In a case like this, the enumeration and discovery process would not need to be done on a regular basis such as each time the vehicle was started. It could be done at the factory, or perhaps by a mechanic after repairs or maintenance had been done. In other types of systems where the changes to the number of devices or the device order on a network are more dynamic, it is necessary to perform the enumeration and/or discovery process anytime that all connected devices had to be guaranteed communication.
A particular advantage to the discovery technique of the present invention is to know where to place a termination component. For example, some types of communication links require that a termination resistor be placed on the communications line at the last device. A device could be provided with a programmable termination. The termination component could be enabled on a device by command of the master. Using the discovery technique of the invention, the master would know which device was the last one (or perhaps the last and middle one etc.), and could command only it to enable its termination. Another possibility is for the termination to be enabled on all devices during the command to open all switches. Then as devices are enumerated, the device just preceding the present device can be commanded to disable its termination. This would have the effect of making sure there was a continuous termination during the entire enumeration process.
While the examples presented relate to a single serial wire network, the method of the present invention may be applied onto serial parts of more complex network topologies. In particular, large networks may have parallel and serial parts. The enumeration and discovery technique of the present invention can be used with more complex protocols to discover and enumerate such a network. In that case, the serial part would be run separately several times in each of the parallel parts.
Embodiments of the invention may contain nodes that are directly connected to more than just two other nodes. In this case, a node may contain more than one switch. An example might be at a branch node in the network. Here a serial path could split into two or more other serial paths. This particular node could have two or more switches. The method used in this case would be very similar except that it would be employed down one of the serial paths until all the nodes on that path were identified and then be applied down the next serial path until all of the nodes on that path were identified. Such a node with more than one switch could identify itself to the controller once it takes an ID. The controller would then know to command it to close only one switch at a time, or the node CPU could be programmed to handle this task as if the entire network downstream were serial.
Several descriptions and illustrations have been provided to aid in understanding the present invention. One with skill in the art will realize that numerous changes and variations may be made without departing from the spirit of the invention. Each of these changes and variations is within the scope of the present invention.
This application is related to, and claims priority from, U.S. provisional patent application No. 61/725,531 filed Nov. 13, 2012. Application 61/725,531 is hereby incorporated by reference in its entirety.
| Number | Date | Country | |
|---|---|---|---|
| 61725531 | Nov 2012 | US |