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

LCP932 Power Consumption

Hi, I have a delay function that for some reason every time I included in my project it causes the micro controller to use extra power. With out the function I read 20 micro amps in total power down mode, but with the function I read 4.4 miliamps in the same mode. I use this delay function to energize a relay for about 50 miliseconds. Is there any other method I could use to replace this function with? Or even better, why is this function "I assume" causing the micro to concume so much power.
Thanks.

void delay (int x) small reentrant { //0 to 4,294,967,295
int i;

for (i = 0; i < x; i++) { ;
}
}

Parents
  • Hans-Bernhard Broeker, I excuse myself for not being clear. I meant to say that after including the delay function and calling it to energize the relay, the micro goes into total power down mode. At this point I am getting a reading of 4.25 mili amps. To troubleshoot this better I let program as it is and physically disconnected the relay from the circuit. So the micro now configures the port, sets the internal on chip osc. and calls the function where it energizes the relay's coil for about 50 msec (where the delay function is included) and then it enters Total power Down mode. I am getting a reading of almost zero (low current). How could the relay consume so much power...please do not take it the wrong way, but I do not know, but I could be almost sure now, that the relay is somehow taking this extra energy. Do you have any ideas how this could happen.

Reply
  • Hans-Bernhard Broeker, I excuse myself for not being clear. I meant to say that after including the delay function and calling it to energize the relay, the micro goes into total power down mode. At this point I am getting a reading of 4.25 mili amps. To troubleshoot this better I let program as it is and physically disconnected the relay from the circuit. So the micro now configures the port, sets the internal on chip osc. and calls the function where it energizes the relay's coil for about 50 msec (where the delay function is included) and then it enters Total power Down mode. I am getting a reading of almost zero (low current). How could the relay consume so much power...please do not take it the wrong way, but I do not know, but I could be almost sure now, that the relay is somehow taking this extra energy. Do you have any ideas how this could happen.

Children