This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

89S52 Power Down Mode.

89S52 External Interrupts.
Hi all...
i am making a project for driving a dc motor clock and anticlock wise using L293D which is connected to port 3^3(pin 2 of L293D) and port3^4(Pin 7 of L293D) and 89s52, 20x4 character lcd, keypad, 7.4v li-ion battery.
using 7805 to stepdown 7.4v to 5v which is futher applied to my circuit.
at initial stage i have kept my lcd off, so as button 1 is pressed from keypad the lcd goes on and again waits for user input from keypad to drive dc motor clock or anticlock wise.
but when i even put my lcd to off, my 89s52 is in active mode which consumes my battery. to solve this problem i want to add power down mode to my controller. so i added
Code:

PCON |= 0x02;    // Enter Power Down Mode
count++;         // External Interrupt or Reset Wakes-up MCU


to enter power down mode.
but now i am not aware of how to exit power down mode as i am very new to electronics and programming. can anybody please help me with the code to exit Power down mode.

i want something like as if when button 1 is pressed to on the lcd, it should exit power down mode and lcd gets on.

Parents Reply Children