??? 03/26/08 16:05 Read: times |
#152565 - Problem waking up from power down mode:AT89S52 |
Hi all 8052 Gurus,
I have made a digital clock using an AT89S52 and a DS12C887 RTC chip. It seems to work well. However, to conserve power I want to use the power down mode. The /IRQ line of the DS12C887 is connected to the /INT0 of the micro. I am using edge triggered /INT0 here. However after I go to power down mode, nothing happens and my ISR for /INT0 does not get called. My LCD basically freezes as the system waits indefinitely for the /IRQ from the RTC. I have tried to analyse the problem and my observations are as follows: 1. The pulse for the /IRQ may be too small to properly initiate /INT0 in the micro. However upon consulting the DS12C887 datasheet I found that the /IRQ line is kept low as long as the /IRQ bit does not get read by the micro. The code to read that bit is within my ISR. But I will read it only after my ISR gets called, which is not happening here at the first place :-( So I have ruled out this possibility. 2. The current sinked(sourced?) to the /IRQ pin may not be enough. I have a doubt here. Since the /IRQ pin is active low, when asserted the micro should source current, right? Current should flow from the micro into the RTC chip because the pin is low. Am I right? In such a case, is it a case of too low current? Can this be solved by using a triggering a transistor through its base so that a high current flows in its collector and then that high current is used to drive the /IRQ pin on the micro? 3. I tried making the /INT0 on the micro as level triggered. But even that is not solving the problem. 4. I tried using idle mode and thankfully idle mode works with my DS12C887. However I am more interested in power down mode as idle mode does not give me as much savings as power down mode. My clock is battery powered. Any help/pointers will be greatly appreciated. Thanks in advance for taking out time to reply to my post! Cheers, Seemanta |