I have a microcontroller pic18f2550 and I use mplab c18 compiler and I want a source code example that demonstrate all possible ways to use the sleep mode ( watch dog timer , port change , interrupt ,...etc) and the source code operation is verified by a simulator like proteus or any other one , note that , in my applications , i use all the controller features like analog to digital converter and usart ,internal or external oscillator,....., so I want using the sleep mode (power saving usage) not affect the available features of the micro-controller during normal operation