Have a wierd issue with an RTC and a couple temperature sensors connected to my m168. What I've got is a little box that keeps track of power outages and fridge/freezer temperature (father-in-law's cabin has frequent power outages and he wants to keep track of em and see if he should toss the fridge contents or not). There's a DS1306 RTC connected to the SPI bus (close to AVR) and a couple LM95071 SPI temperature sensors connected to the same bus at the end of ~5' or so of cable with a cap on the power pins. In most cases, everything is working great. I periodically store the current values to EEPROM and then on bootup I check if there was a previous record being worked on and if so assume that there was a power outage, complete the record with the current values and start a new one.
The problem is that after a "power outage", the temperature sensors and RTC seem to sometimes boot up in wierd states. I've even stuck in 10+ second delays before communicating with them and it doesn't seem to fix it. It's almost like the first reads can sometimes be screwed up. To fix it, I inserted some dummy reads to both sensors and the RTC and it seems to have fixed the RTC issues, but still the temperature sensors can sometimes get confused. Either everything works fine, or they'll just spit out something like -1 degrees until I power cycle again.
I'm wondering if anyone else has seen wierd issues like this. I'm wondering if it's problems with the power being supplied in a non-instant fashion, as it's currently being run from a wall-wart through a regulator. Would I be better off powering the chips from one of the AVR pins so I can apply power after the AVR is up and running and the power has been stabalized? Anyone else seen similar behaviour or have suggesstions?