1. I want to set the PIC into SLEEP mode
Use the following lines of code
@ sleep
@ nop
@ nop
This will give indefinite sleep time
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
Configure your PIC to generate an 'interrupt on port change'. You need not enable the interrupt. When the port change occurs, the PIC will execute the statements after sleep.
3. The LCD screen should remain ON for the next 5 mins, displaying the desired result.
Use some kind of timing code to achieve this; either using for loops or timer.
4. The LCD should then turn-off after 5 mins, i.e. the PIC should go back into the SLEEP mode.
Go back to number 1
Bookmarks