The invention relates to a system comprising a plurality of electronic devices connected to a bus in operational use, to a device for use in such a system and to a method of configuring the addresses of the devices in such a system.
Consider a plurality of, say, eight or more devices, e.g., integrated circuits or electronic apparatus comprising an integrating circuit, that are to be controlled via a bus, e.g., an I2C bus, an SPI bus or a parallel I/O bus, etc. If the bus lacks in its protocol a mechanism for assigning addresses to the devices, it becomes tedious to assign unique device addresses to each and every device connected to the physical bus. It usually takes a significant number of programmable pins at each of the devices, or a few multi-level pins, or special selection circuitry, to solve the problem of assigning unique device addresses to circuits connected to such bus. In all these cases the PCB layout becomes more cumbersome, especially if the relation between position and address is to be known, as is the case, for instance, in matrix-oriented display devices or light emitting devices.
The invention provides an efficient approach to the solution of configuring a system comprising a plurality of electronic devices connected to a bus in operational use of the system. In the system of the invention, the devices are also connected or connectable to one another, during configuring respective addresses for respective ones of the devices, so as to form a daisy-chain. Each of the devices comprises a bus interface for communicating with the bus, an input and an output. During configuring, each next one of the devices in the daisy-chain has its input connected to the output of a preceding one of the devices. Each respective one of the devices has respective means for determining the respective address. The means of each next device is operative to determine a next address based on an offset with respect to a previous address received from the preceding device, and to supply the next address at its output. The offset can be unity or another value, or can, e.g., be programmed in per device, e.g., manually or, preferably, via the bus or via another communication medium, before configuring the addresses.
In an embodiment of the system, a pair of successive ones of the devices is interconnected in the daisy-chain through a bit transmission channel, and each next one of the devices has a first shift register for receiving the previous address and a second shift register to supply the next address. The bit channel can simply be a single wire so as to keep the system's interconnections simple.
In a further embodiment, at least a specific one of the devices comprises further means configured to connect the input of the specific device to the output of the specific device upon detection of a failure in the means, first-mentioned, to determine the address of the specific device. This further means then functionally locks the specific device out of the daisy chain in the address configuration mode. For example, in case of a hardware implementation of the means to determine the specific address, a malfunctioning of the power supply to the device's circuitry or specifically to the means first-mentioned, may cause a switch to connect the specific device's input and output.
The invention also relates to an electronic device for use in such a system. Such a device comprises an interface to a bus; an input and an output; and means operative to determine a first digital quantity based on a second digital quantity received at the input and on an offset with respect to the second digital quantity, and operative to supply the first digital quantity at its output. Again, the offset can have pre-determined value, e.g., unity. In an embodiment, the input is a serial bit input, and the output is a serial bit output, so as to keep the interconnections between the devices simple. The device then has a first shift register for serially receiving the second digital quantity and a second shift register to serially supply the first digital quantity.
The invention further relates to a method of configuring a system having a plurality of electronic devices connected to a bus in operational use of the system. Each of the devices has a bus interface and an input and an output. For configuring respective addresses for respective ones of the devices, the method comprises connecting each next one of the devices with its input to the output of a preceding one of the devices so as to form a daisy-chain; determining for each next device a next address based on an offset with respect to a previous address received from the preceding device; and supplying the next address at the output of the next device.
Such a method may be commercially relevant to the system operator who needs to re-configure the system more than once. For example, the system is comprised in a lighting system for a stage performance, an exhibition, or another public event. In this scenario, each device comprises a lighting fixture that can be individually controlled via the bus. Each event may require another configuration of devices (different numbers of devices, different sequence of devices, changing the physical locations of the same devices, etc.). As another example, the system allows a modular configuration wherein the invention enables the automatic address assignments per configuration.
The invention is explained in further detail, by way of example and with reference to the accompanying drawing, wherein:
Throughout the Figures, similar or corresponding features are indicated by same reference numerals.
Accordingly, for N=8 different addresses already 3 extra pins, pins 202, 204 and 206 are needed.
The invention addresses the problem of how to automatically assign, preferably consecutive, addresses to devices 102-108 in a bus configuration as discussed above, and provides an alternative solution as is discussed below with reference to
During a reset carried out for devices 502-510 in parallel, controller 608 is put into an “Init” state. In this state, register 604 is loaded with bits having the logic values present at input 602, and register 608 is loaded with all logic ones. This means the first device in the daisy-chain (here device 502), having its input 602 connected to ground, will get all zeroes in its register 604. All other devices 504-510, having their inputs 602 connected to the output 616 of the previous device in the chain, will all have logic ones in their register 604, since all registers 608 contain only logic ones, resulting in a logic one at output 616, independent of the contents of register 604, due to the construction of selector 614.
As soon as the reset period is finished, controller 606 goes to a “Wait Start” state. When signal “start” is asserted, controller 606 will change state to a “Store Addr” state, in which a signal “load” is asserted. As a consequence of this, register 608 will be loaded with the current value of register 604 incremented by a certain value, e.g., unity, and register 604 gets at the same time initialized with hex value 0×01, i.e., a decimal 1.
At this point the programmable address bits of device 502 are defined and will always have the value logic one, whereas the programmable address bits of the other devices 504-510 in the chain are still all logic ones.
During the next clock cycle, controller 606 will move to the “Shift Addr” state. In this state, the signal “shift” is asserted, causing the bits in register 604 to be shifted from the input 602 to the MSB position. Since the least-significant bit (LSB) was initialized with a logic one (see 0×01), there will always be a logic one eventually shifting into the MSB position of register 604. During the shifting process the value of register 608 remains unchanged. While the logic one in register 604 is shifting, selector 614 will supply the values of the bits in register 608 to output 616, starting with the MSB of register 608. Selector 614 is a priority decoder: the most significant logic one in the bits of register 604 determines which bit of register 608 is routed to output 616. That is, the logic one of the bits in register 604 with the higher bit rank among all logic ones in register 604 determines the routing.
Since each of devices 504-510 is connected to its predecessor, register 604 will be filled with the programmable bits of its predecessor during the shift action, except for first device 502, whose register 604 will always stay filled with logic zeroes. As soon as the MSB of register 604 turns a logic one, controller 606 will leave the “Shift Addr” state and return to the “Wait Start” state. The whole cycle will be executed again on reception of the next start command. The start command is to be derived from the device's interface to bus 108. As an example, one can think of the start condition inherently present in the I2C protocol, but it should normally be possible to derive such command from any applicable bus protocol when a transmission is initiated.
In other words, per cycle of operations, representing the sequence of the states “Store Addr” (with the “start” command), “Shift Add” (with “shift” command), and “Wait Start”, the register 608 of a next one of devices 502-510 is adopting the value represented by the bits in register 608 of a previous one of devices 502-510, incremented by an offset of, e.g., unity in this example. The bits of an address of a device to be forwarded to a next device in the chain are shifted out of the device and into the next device under serial clock control so as to be able to use only a single bit transmission channel (e.g., a single wire). Other offsets may be chosen. For example, devices 502-510 may be using only such offsets and initialization values so as to generate only even or only odd addresses. As another example, the addresses of consecutive ones of devices 502-510 may adopt successive addresses formatted in the Gray code, so that successive addresses only differ by a single bit. This may be interesting to a system of devices that are to be activated or deactivated in the order wherein they have been connected to bus 108.
The programmable bits of devices 502-510 in the chain will thus get defined device after device, in the order wherein they have been concatenated in daisy-chain 511, upon each start of a transmission. Since the first device already gets defined at the start of the first transmission, it can be immediately addressed and communicated with. By organizing the transmission scheme in such a way that the order of addressing is equal to the order in the chain, no time will be lost for the address assigning process itself and no overhead is wasted in bus controller 512.
By observing the output of last device 510 in the chain controller 512 will be able to determine when it is addressing the last device. The output will be a logic high until register 608 does not contain all logic ones anymore. So, when a logic low is detected the device is addressed. This is only true, of course, if the aforementioned transmission scheme has been executed. Controller 512 will now be able to check whether all devices 502-510 are present.
It should be noted that the programmable address combination of all logic zeroes cannot be used. The combination of all logic ones can be used, but if used, the detection of last device 512 by observing output 616 is no longer possible. In another embodiment, an additional register (not shown) can be used to store the programmed address of register 608. Register 608 can then be emptied while shifting out the bits, and register 604 can be filled by shifting in the bits at input 602. Output 616 is then to be connected with the MSB of register 608, so that selector 614 can be omitted.
The invention can be used in any application where a need exists for automatic address assigning of many circuits hooked up to a bus, whereby the addresses are solely determined by the order of the devices in the daisy-chain. As such the invention can be used in LED based lighting applications wherein the devices are light fixtures having LEDs for controllable lighting. Furthermore the invention can be used in LCD backlighting wherein the backlighting is segmented using the system discussed above, and wherein a device is controlled via the bus interface to emit light controllably. Similarly, the invention can be used in a flat panel display ambient lighting configuration. Furthermore the invention can be used in automotive lighting, wherein a plurality of light sources must be controlled from a single vehicle control unit. The invention also can be used in general Point of Load controllers, where its modular approach is beneficial to implement scalable and flexible systems.
In
Before executing the address configuration as discussed above in a system wherein components 604, 608, 610, 612, and 614 have been implemented in (programmable) software, it may be advisable for the operator to roughly know the number of devices in the daisy-chain. The operator can then use bus controller 512 to set the size of registers 604 and 608 and the input range and output range of selector 614 so as to accommodate the number of bits necessary to carry out the address configuration scheme for this particular number of devices.
When the automatic address assignment mechanism is used in system 500 and one of devices 502-510 breaks down during address configuration or has broken down beforehand, the address assignment may not be successfully completed. If one or more of devices 502-510 is broken, at least the devices downstream of the last broken device in the chain will be lost from the point of view of controller 512, although the downstream devices are still available and operational with respect to bus 108.
Below, a way is described to avoid problems if one or more of devices 502-510 connected in the daisy chain malfunctions with regard to the address generation.
When using the address generation mechanism, discussed above, in a long chain of devices, first device 502 with its input connected to ground will take address 1 in the chain (1 added to the device base address, for example 0×41 in a 6 bit configurable device). Next device 504 connected in the chain will see a 1 at the input and will configure itself with address 2 in the chain (0×42 in the same previous example). Device 504 will supply at its output address 2 and next device 506 will configure itself with address 3 and so on. The output of last device 510 will be connected to controller 512. As soon as a zero is detected by controller 512, controller 512 will know that the address assignment has finished and can start addressing devices 502-510 in operational use of system 500.
Assume that, after proper initialization, one of devices 502-510, e.g., device 506 in the middle of the chain, breaks down, the following problems may occur. If the malfunctioning is such that the supply (VDD), powering the components involved in the automatic address configuration and in the interface to bus 108, is still available, device 506 will still get an address. Device 506 will be accessible by controller 512 and controller 512 will be able to detect (e.g., via register access) that device 506 is not longer properly working (e.g., it is not emitting light in the case of a luminaire). In this case the broken device does not disturb the proper addressing operation of system 500.
If device 506 breaks down in such a way that the circuitry involved in the automatic addressing configuration and in the interface is not powered anymore, the output 616 of device 506 will be grounded. Then devices 508 and 510 downstream after the broken one will start again the count-up address mechanism. In the worst case scenario, half of the devices have the same addresses as the other half (or are not addressable at all) and generate a bus addressing conflict. The addressing by controller 512 becomes a problem and system 500 as a whole becomes inoperative. To solve this problem, a mechanism can be implemented to connect input 602 of failed device 506 to output 616 of failed device 506.
With this solution, if an IC in system 500, e.g., a luminaire is broken, the chain will not be broken by the failed device. If the device is only partially broken, the power supply VDD remains available but cannot cause device 506 to function in operational use, e.g., device 506 does not emit light in the case of a luminaire application. The address assignment will still work and controller 512 will be able to detect afterwards that device 506 is not properly working, and can reprogram the other devices in order to get the total light flux output as in the situation wherein all devices in the system properly work. Accordingly, for a specific one of devices 502-506, the input of the specific device is connected to the output of the specific device if a malfunctioning is detected in the circuitry determining the address of the specific device, or in the circuitry supplying the address of the specific device at output 616 of the specific device.
Number | Date | Country | Kind |
---|---|---|---|
07112871.4 | Jul 2007 | EP | regional |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/IB2008/052861 | 7/16/2008 | WO | 00 | 1/14/2010 |