Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Can you help me with Power down modes plss, I realy need it!

Status
Not open for further replies.

Uridan

Newbie level 4
Joined
Jun 11, 2009
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,343
Hi

I programmed the micro to read some analogue data from sensors and switch some relays and send data via Uart to a RF module .

All I need now is to set the micro in Power down mode since I am running the system on solar and batties.

I set the PCON register to

PCON |= 0x02 // sets the micro to PD (Power down) mode

Now Is there a way to reset the program from the start by using watchdog or doesn't watchdog work on PD mode ?

I have no clue on how to work with interupts so can you help me program the micro to go on PD mode once it sends the data via UART, and waits for 60sec until the interupt invokes the PD mode and resets the program of the micro to start again from the begining ?

I am using C language via :µVision 2 (keil) and the AT89C51AC2.

N.B I have read the datasheet but I got pretty much lost :(!

Thanks
Regards
Edmund
 

According the datasheet, the Watchdog will work only in IDLE mode (PCON|=1). in powerdown mode only a RESET and External Interrupt will wake up the uC. (all of this from page 73 of doc4127.pdf) thus the watchdog will not work in this mode...

hoe it helps
 

Re: Can you help me with Power down modes plss, I realy need

Hi Kurenai_ryu

Thanks for the reply. So in other words I can't make the micro wake up automatically while on power down mode.

What kind of external interupt can I make to wake up the micro while on power down mode?

I am asking this because the micro will be left working alone sending data every 60 sec, and will be powered by a battery, so to save maximum power I need to set it in power down mode for those 60 sec that it will not be working.

thanks
Ed

Added after 3 hours 3 minutes:

Ok so I decided to use IDLE mode since timers would still be active on that power mode. (even though I wish to used power down mode to reduce max power for the system)

I still wish to used watchdog register since I want the program to restart once the watchdog timer is invoked.

Can someone provide me with a simple program (C language) for an 89C51 microcontroller? where once PCON |= 0x01 is done a loop will occure for 60 sec using TIMER mode and once timer is done the watchdog is invoked and the CPU is reset and will start from the bigining

Any help would be verrrry appreaciated :)

Thanks
Ed
 

Using the internal timers will need to wake up the microcontroller every 50ms and thus it have to wake-up 1200 times to get 60sec...

how about an external watchdog? (I never used one of this, but they exists!) you can found some at maxim... they can reset the micro at least 1 a second.

Hope it helps..
 

Re: Can you help me with Power down modes plss, I realy need

What do you mean by waking up 1200 times ?

I saw some examples that used a loop with a counter and once the counter is invoked the interupt will occur and the program will leave the loop and thus the micro will wake up. Though I have no idea how to implimant it in keil C language.

Thanks for the replies Kurenai_ryu.

Ed
 

Re: Can you help me with Power down modes plss, I realy need

i use a couple of 'wake' int sources. One is an RTC which has a vast timing capacity, and another is one of Maxims thermostat devices.

Regardless, if your interrupting to exit a powerdown mode, consider that execution doesn't actually begin until the int line is released. This differs from the idle mode.

The difference in consumption between idle and power down is substantial for my battery operated devices. I painstakingly reasearch each function looking for low power devices. I will use the LP4052 whenever I can, but also use the 5131 for USB and extended waking capacity via the keyboard interface port. This latter device's program revolves around the need to put it to sleep as soon as possible.

Consider that some of the RTCs have an idle current under 1uA, provide a time stamp, operate on I2C, may contain some memory buffer, and in a mini surface mount package takes up little space.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top