Hi,

I have PIC18F4525 connected to a LCD (16X2).

1. I want to set the PIC into SLEEP mode.

2. I want the LCD screen to turn-on when a push-button, connected to the PIC, is pressed. This means that the PIC should be switched out of SLEEP mode.

3. The LCD screen should remain ON for the next 5 mins, displaying the desired result.

4. The LCD should then turn-off after 5 mins, i.e. the PIC should go back into the SLEEP mode.


I would really appreciate if you guys can give me suggestions on how to write a code for this.

Thanks !