On Thu, 14 Sep 2000 19:53:12 -0700, you wrote: >Hello: > >Is it impossible to maintain port/pin states through sleep cycles on = this >part? Is there inevitably a glitch each reset (wake from sleep)? I = hoped >to power up a peripheral through an io pin, go to sleep while the device >works, wake, check device's output, then turn it off. But it doesn't = work, >as it seems that although the port register does remain unchanged the = TRIS >register is set on wake. Could this be true? If so, how useless (and >frustrating). > >Advice? Comments? Criticisms? Anything! Thanks! Unfortunately, one major drawback of all c5x parts is that you can only wake from sleep by a reset, so you will get a glitch on the outputs. The other downside is that you always have a reset start-up delay, even though it's not necessary with an RC oscillator, so that glitch is far longer than it needs to be, and causes much higher avarage current draw than necessary when you only want to wake for short periods. The 12C6X parts have neither of these limitations.=20 Presumably your peripheral draws little power, so you could switch power to it with a PNP transistor or small mosfet with either a pretty high-value base/gate pullup or a capacitor to hold it while the PIC is asleep.=20 -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics