Tuesday, April 3, 2012

[nslu2-linux] I2C bus problem

 

I have a NSLU2 thst is being used to control a heating system. I have brought out the i2c bus (the one that drives the clock chip) just like the wiki pages say, and amongst the various devices on that bus there are some Texas PCF8575 I/O Expander chips, for listening to push buttons, lighting leds and, in particular, for operating relays that will turn boilers off and on.

Now the doco for the PCF8575 quite definitely states that upon power-on (specifically before the power supply has risen to 1.2V) the chip resets itself so that all the outputs are High (i.e. +ve, provided you provide a suitable pullup-resistor). And I have arranged one of those outputs so that when it is high it inhibits all those relays, so no boilers come on until the system has booted and the control program has started. The doco says clearly that after reseting these outputs to high they remain in that state until the i2c bus dictates otherwise.

Nevertheless, the relays are coming on as soon as power is plugged in, before the slug even begins its boot process. So what is happening? I cannot see how the i2c bus stuff in Slogos can have awoken that early and, in any case, it does not even know the bus address of these devices. So can it be the manner in which the power comes on? Note that I have bypassed the 'on' button (again according to the wiki), so the slug is on so long as its power supply is plugged it (and plugging it in starts the boot process).

Helpful suggestions welcomed.

__._,_.___
Recent Activity:
.

__,_._,___

No comments:

Post a Comment