??? 09/02/04 07:05 Read: times |
#76796 - RE: wild pig Responding to: ???'s previous message |
hi,
to put device into power-down mode you need set bit PD of PCON register: ORL PCON,#00000010b or just MOV PCON,#2 To exit from power-down mode you should either reset MCU or provide level-activated external interrupt. Be careful: - interrupt must be configured as level activated one (it is because an interrupt edge detector does not work with OSC stopped); - interrupt must be enabled (both EA and EX0 or EX1 should be set); - pay attention on Watchdog. If this timer is used then "ping" it just before come to power-down mode. And "ping" it once again inside ISR of the external interrupt. By the way, here is some interest information (just in case you ask it next time). When interrupt is configured as level activated one then hardware does not clear its interrupt flag. In fact, in this mode hardware just translates external input signal on pin /INT0 and /INT1 to bits IE0 and IE1. So if you clear these bits and try to exit from an interrupt`s ISR it has no effect: the ISR will be ececuted once again as long as the external input level is low and the interrupt is enabled and not blocked with other interrupts. But when MCU is come up from power-down mode, hardware works with different way. The interrupt is held low long enough for the oscillator to stabilize. When the interrupt is brought high, the interrupt is serviced. If you plane to use a button to provide external interrupt to MCU then pay attention on that I said above because "bounce effect" of contacts may present you some surpizes with level-activated interrupt. Regards, Oleg |
Topic | Author | Date |
wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
Ridiculous! | 01/01/70 00:00 | |
Perfectly reasonable! | 01/01/70 00:00 | |
A Case In Point | 01/01/70 00:00 | |
Even more ridiculous! | 01/01/70 00:00 | |
Calm down, calm down! | 01/01/70 00:00 | |
RE: Calm down, calm down! | 01/01/70 00:00 | |
RE: Calm down, calm down! | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: going wild | 01/01/70 00:00 | |
RE: going wild | 01/01/70 00:00 | |
LOL..LOL | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
What battery? | 01/01/70 00:00 | |
RE: What battery? | 01/01/70 00:00 | |
RE: What battery? | 01/01/70 00:00 | |
RE: What battery? | 01/01/70 00:00 | |
RE: What battery?![]() | 01/01/70 00:00 | |
RE: What battery? | 01/01/70 00:00 | |
RE: What battery? | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 | |
RE: wild pig | 01/01/70 00:00 |