Quote Originally Posted by aratti View Post
To do that you need to re-wire your circuit and use portB.0 as your push-button detector. (now you are using portB.0 for I2C communication)

Once you have done that, you will need to learn how to use and activate the interrupt on portB.0, because this will wakeup your sleeping MCU.

I strongly suggest you to look at Darrel Taylor instant interrupt and experiment a while with it and then use it to improve your program.

Have a look @ http://darreltaylor.com/DT_INTS-14/hello.html

Al.
i found out. and it works great pic goes to sleep when u dont press bottoms after 1 mnt.using PB.0 for int and some beeps when wake up, so it works ok thank you aratti for helping me.im new in pbp i still donno about timers adc many things and no assembler at all lol